====== Arimaa ====== TODO: Description * [[https://arimaa.com/arimaa/|Official website]] * [[https://boardgamegeek.com/boardgame/4616/arimaa|BoardGameGeek page]] Inventor: Aamir Syed, Omar Syed ===== Rules ===== See https://arimaa.com/arimaa/learn/rulesIntro.html for the official rules See https://youtu.be/-l028j_eqZE for an unofficial but good explanation of the rules ==== Goal ==== Achieve one of the following at the end of your turn to win: * Goal (get a rabbit to the last rank from your perspective) * Elimination (capture all opposing rabbits) * Immobilization (leave the opponent with no legal moves) Useful Notes: * You can also achieve these for your opponent, in which case they win immediately without needing to move. If multiple victory conditions are fulfilled at once, the one higher in the list takes precedence, and the player who just moved wins ties * These are only checked at the end of each turn: if they only exist during the turn but not when the turn is complete, they don't count ==== Pieces and Board ==== The two sides are Gold (plays first) and Silver (plays second). Each side has 16 pieces to begin the game in 6 different piece types. The pieces move and operate identically with 3 caveats: rabbits are uniquely referenced in the victory conditions, rabbits cannot move backwards, and all 6 pieces are ranked in a strength hierarchy from strongest to weakest as below: - Elephant - Camel - Horse - Dog - Cat - Rabbit So the Elephant is the strongest piece and the rabbits are the weakest It may help to remember the strength hierarchy that it tends to mirror the size of the real life animals (one can find real horses which are as heavy as camels, or dogs that are smaller than cats, but if you don't look at outliers, it is quite intuitive) The pieces are abbreviated by their first letter, with the exception of Camels which are abbreviated "M" to avoid conflict with Cats. Capital letters are used in notation for Gold pieces, and lowercase letters for Silver pieces The board (8x8) has 4 marked squares on it, known as trap squares or traps. Individual squares can be referred to with algebraic notation, as in chess (so a1 is always in the lower left from Gold's perspective) General regions of the board can be referred to with compass directions from Gold's perspective. Cardinal directions (most commonly East or West) refer to halves of the board and serve a similar purpose to the chess terms "Kingside" and "Queenside". Ordinal directions refer to quarters of the board. For example, "The East" is the area e1-e8-h8-h1-e1 and "The Northwest" is the area around the c6 trap, regardless of which player you are ==== Setup ==== In turn, Gold and then Silver set up in the same manner. This is not simultaneous: Silver can and should take Gold's setup into account in deciding how best to set up themselves Place the following 16 pieces in any arrangement on the two ranks closest to you (the 1st and 2nd ranks for Gold, the 7th and 8th ranks for Silver): * 1 Elephant * 1 Camel * 2 Horses * 2 Dogs * 2 Cats * 8 Rabbits Input Tips: * Clicking on an already-placed piece removes it from your setup so you can add it back in elsewhere * Clicking on an empty square in your setup area automatically adds the strongest piece you have yet to place * After setting up, you must click "Complete move" to mark the move as complete, and then "Submit" to actually play the move. This is useful if you want to edit your setup before marking it as complete * The "Quick setup" button sets up your Rabbits and major pieces in the 99of9 setup, a balanced setup which is a good starting point if you're unsure of where to start ==== Gameplay ==== Each turn, one has 4 steps to spend. You are not required to use all of them, though you must change the position somehow (so you can't pass), and it's usually best to use them all. Listed below are the actions which you can spend your steps on, and automatic effects which apply after each action. You may take these actions in any combination so long as you don't exceed the 4 step limit === Basic Move === Move a piece 1 step orthogonally Cost: 1 step Useful notes: * Rabbits can't move backwards * ie, Gold rabbits can't move south, and Silver rabbits can't move north * Frozen pieces can't move * Pieces can only move to empty spaces with a basic move * Pieces can move into trap squares, even if they immediately fall in (see trapping section) * Pieces cannot move diagonally === Pushing or Pulling === Move a friendly piece and an orthogonally adjacent strictly weaker opposing piece together Cost: 2 steps Useful Notes: * You may push and pull either in-line or in right angles; it doesn't have to be in a straight line * You may not push and pull in the same action; you must do one or the other, and can only do another push or pull if the resulting position makes it legal * You may not push or pull friendly pieces, only opposing pieces * The friendly piece used must be strictly stronger than the opposing piece it is pushing or pulling * The friendly piece and opposing piece involved must be orthogonally adjacent at the start of the maneuver * The friendly piece must NOT be frozen at the start of the maneuver (though it may be so at the end) == Pushing == - Move the opposing piece to an orthogonally adjacent empty space - Move your piece to the vacated square == Pulling == - Move your piece to an orthogonally adjacent empty space - Move the opposing piece to the vacated square === Automatic Effects === * These apply automatically after each action without any player volition: they either happen or don't according to the board state regardless of player wishes * They apply indiscriminately to both friendly and opposing pieces * They do not cost actions == Freezing == A piece is frozen and cannot move if the following conditions ALL apply: * There is at least 1 strictly stronger opposing piece orthogonally adjacent * There is no friendly piece (of any strength) orthogonally adjacent Equivalently, a piece is not frozen and can move if at least 1 of the following conditions apply: * There are no opposing pieces orthogonally adjacent * The only opposing pieces orthogonally adjacent are of equal or weaker strength * There is at least 1 friendly piece (of any strength) orthogonally adjacent Useful notes: * Being frozen does not stop a piece from freezing other pieces * While a frozen piece cannot move itself, it can be pushed and pulled by opposing pieces. See the section on pushing and pulling for more details * A piece may voluntarily move into a position where it is frozen, or be pushed or pulled there by the opponent, or have opposing pieces maneuver around it to fulfill the conditions for freezing == Trapping == A piece falls into a trap (ie, is captured and removed from the board) if the following conditions ALL apply: * It is on a trap square (c3, c6, f3, f6) * There is no friendly piece (of any strength) orthogonally adjacent Useful notes: * It is perfectly legal (and sometimes good) to allow one's own pieces to fall into traps * Since automatic effects are only applied after each action, one can push or pull into a trap, regardless of whether either piece immediately falls into the trap ==== Repetition ==== You may not repeat the same position with the same player to play 3 times Equivalently: Delayed Situational Superko Most of the time, this is equivalent to saying you can undo the opponent's move once, but if they choose to redo their move, you can't undo it a second time, because that would create the position before their move for the 3rd time Useful notes: * AP will prevent you from playing an illegal repetitions but cannot always detect when your only remaining moves are all illegal due to repetition, in which case you may need to resign manually ===== Endless Endgame ===== Inventor: clyring Endless Endgame differs from Standard Arimaa only in the randomized setup, and in that Gold gets only 2 steps on their first turn, otherwise it plays identically. It is designed to send the players directly into endgame positions: the most tactical stage of Arimaa The name "Endless Endgame" refers to the cyclic nature of the "Endless Endgame Event" for which it was invented, though it certainly creates an endless supply of endgames to play no matter the context - Randomly choose for Gold 1-8 rabbits, 0-2 cats, 0-2 dogs, 0-2 horses, and 0 or 1 camels, add 1 elephant, and arrange them all at random on the first two ranks (ie where Gold would normally set up) - If there are anywhere from 4-12 pieces placed by step 1, continue to step 3, else go back to step 1 and repeat - Randomly choose either rotational symmetry, or reflectional symmetry, and set up Silver pieces on the last two ranks accordingly (ie, shogi-style symmetry, or western chess-style symmetry) - Gold takes only 2 steps on their first turn, and thereafter play continues as per usual with 4 steps per turn ===== Handicap ===== Traditionally, most handicap games of Arimaa have been played by uwate (the stronger player) intentionally walking some of their pieces into their home traps on their first move. Thanks to Perlkönig, though, AP has a Freestyle Setup variant which allows uwate to set up with reduced material in the first place without recourse to such workarounds. Freestyle Setup is far more flexible, though. For example, I prefer to replace pieces with rabbits rather than sac them outright. This keeps the same army size for both players, which arguably makes for a more interesting imbalance ===== Strategy and Tactics ===== This page will mainly focus on widely applicable concepts, but there are a variety of more in-depth resources available, some of which are listed below * [[https://a.co/d/0aRREVLS|Arimaa: Strategy and Tactics]], a book by Jean Daligault, aka chessandgo * [[http://arimaa.com/arimaa/mwiki/index.php?title=Category:Unique_wins_in_2&pageuntil=Unique+wins+in+2%2F2022-03#mw-pages|Unique Win in 2 Puzzles]], a massive collection of puzzles automatically generated from real games monthly. In my experience, the links labeled "image" are the best way to use them due to deprecation of certain web technologies ==== Piece Alignment ==== Pieces are most efficiently used to fight opposing pieces exactly 1 rank weaker. More than 1 rank weaker, and it's inefficient, equal or greater rank, and it's ineffective (though sometimes a piece of equal rank is the right piece) Conversely, you DON'T want your pieces to fight opposing pieces exactly 1 rank stronger. More than 1 rank stronger, and your opponent is being inefficient, equal or weaker, and your opponent is fighting a losing battle This concept, also known as "the right piece", is a fundamental of how to decide where you want to move your pieces over the course of multiple turns, and applies from the opening to the endgame and all in between ==== Openings ==== Generally opening plans can be grouped into 3 categories, including neither lone elephant attacks (which shouldn't work as well as other strategies against good resistance) nor focusing on defense - EMH Attack: arguably the most popular approach at the high level today, it aims to take control of an away trap or, failing that, gain some other advantage as ransom - EHH Attack: aims to take control of an away trap or, failing that, gain some other advantage as ransom - EH Attack: aims to fight for an away trap before either gaining some local advantage, or launching an MH Attack on the opposite wing once the opponent is tied up defending the EH Attack Note that if an EMH Attack and an EHH Attack are launched against eachother on the same wing, a local stalemate is good for the EHH Attack, as they have a camel free on the other wing to attack There is a lot of variety at the top level in which setups people prefer, but in the interest in providing some concrete suggestions, some solid options are given below ---- {{:games:arimaa_setup_99of9-cats-behind-traps-gold.png?400|}} The 99of9 setup (pictured here with cats behind traps) is a balanced setup which has been around for years. The minor pieces (cats and dogs) can be permutated as desired In Standard Setup games, the "Quick setup" button gives this setup ---- {{:games:arimaa_setup_rusty-gold.png?400|}} This setup does not have a widely agreed upon name, but it is the preferred setup for Gold of Rusty, a NN-based bot which is currently the strongest Arimaa entity, and has been used to great effect by browni3141, the current strongest human player Gold: ''Ee2, Mb2, Ha2, Hh2, Dd2, De1, Cb1, Cg2, Ra1, Rc1, Rc2, Rd1, Rf2, Rf1, Rg1, Rh1'' ---- TODO: give some Silver setups, including at least 1 EHH setup ==== Material Advantage ==== As in many games, more material is better in Arimaa, all else being equal. In Arimaa, however, all else is rarely if ever equal, and it is easier to find positional compensation for material than in chess, so being ahead in material must always be taken with a grain of salt, especially in unclear positions === Some Potential Sources of Positional Compensation === * Advanced rabbits and goal threats: the defender in such a situation often has to commit more material to defense than the attacker needs to keep them occupied, and eventually such threats turn into goals * Piece alignment and efficiency: if one player is more efficiently using their pieces, it is as if their opponent has less material than they really do * Positional complexity: Arimaa becomes increasingly tactical during the endgame, and strong players are often able to turn losing positions into very close races where a single mistake from their opponent can turn the game around === Harlog === Harlog is a material evaluation system which is very good at accurately judging trades, in exchange for moderate complexity Positive numbers indicate advantage for Gold, negative numbers indicate advantage for Silver * 1.00 is defined as the advantage of losing 1 rabbit in the opening * 1 dog in exchange for 2 rabbits in the opening is defined as completely equal (0.00) == When can I trust it? == Harlog should always be taken with a grain of salt, because positional factors can be extremely significant in Arimaa, but there are some times when it's probably more reliable than others It should be at its best when evaluating trades in the opening and early middlegame. This is both because it was most closely examined and tuned for accurate representation of opening trades, and because the more tactical endgame leaves even more room for positional compensation than the opening and middlegame. Indeed, it has been said that in Arimaa endgames, the number of pieces one has is more important than their strength. Harlog does take this into account, but, grain of salt It should be taken with extra skepticism regarding situations which won't come up in normal games (like more than 8 rabbits, 0 elephants for one side, more than 1 elephant for either side, and so on), since such situations were not the intended use case for it. It won't break or give obviously bogus answers, it's just reasonable to expect that it may accrue error as it gets further from its intended domain == How does it work? == Harlog assigns a value to each army, and then subtracts the Silver total from the Gold total to get the relative advantage - Each side gets credited for each of their non-rabbit pieces based on how many opposing pieces are strictly stronger than them - Each side gets a bonus which rewards both having more rabbits and having more total pieces - The difference between them gives the Harlog - Multiply by 7.995516184 to normalize to 1.00 being 1 rabbit lost (since the previous steps are all addition, this operation can be distributed to the individual steps, or performed at the end, and it's equivalent save for floating point error) * Value of non-rabbit pieces with 0 strictly stronger opposing pieces (ie, the elephants, in a normal position) * ''2.0 / 1.447530126'' * Value of non-rabbit pieces with n strictly stronger opposing pieces * ''1.0 / (n + 1.447530126)'' * Value of the bonus given r rabbits and n total friendly pieces (including the rabbits) * ''0.6314442034 * ln(n * r)'' ===== Notation ===== Several notation systems have been employed in the past, here we will treat a few of particular relevance to playing on Abstract Play Commonalities among most notation systems (including those treated here) is the use of ''EMHDCR'' to denote the gold pieces from strongest to weakest, and likewise ''emhdcr'' the silver pieces, and the use of ''x'' to denote capturing, as well as a reliance on algebraic coordinates as used in chess (always from Gold's perspective, as in chess). These will be assumed in the descriptions below, with ''piece'' and ''square'' referring to these specific symbols * ''?'' 0 or 1 of the preceding element (the default is that exactly 1 of the element is required) * ''|'' delimits elements from which you may only choose 1 * ''+'' 1 or more of the preceding element * ''()'' grouping symbol * ''\'' makes the next character literal It is sometimes desirable to notate the idea of a step being anything, as opposed to being passed. I am unaware of any notation systems which officially include that, but some people (including me) use ''qpss'' to denote that, after the token Sharp2015 uses for that ==== Abstract Play ==== === Setup === Comma-separated list of tokens of the form ''[piece][square]'' === Movement === Comma-separated list of tokens of the form ''(piece-moving)(origin-square)(destination-square)(\(x(piece-captured)(square-captured-on)\))?'' Passed steps are omitted ==== Lightvector ==== Designed as a formalization of how Arimaa players naturally tend to describe moves. It allows very succinct yet readable notation in many cases. While it is defined in terms of needing to generate all legal moves from a position, humans are very good at using heuristics to skip this step, so it's very comfortable to use even the more succinct forms of it While it may look complicated at first glance, just remember the general notational principles of piece abbreviations and algebraic coordinates, use your chess notation intuitions to put them together into space-separated tokens in a way that makes sense, and chances are it will be valid lightvector notation It does not define a notation for setup, presumably assuming it to just be a space-separated list of tokens of the form ''(piece)(square)'' Original post: http://arimaa.com/arimaa/forum/cgi/YaBB.cgi?board=talk;action=display;num=1230217856;start=63 === Movement === Space-separated list of tokens of the form ''(piece|square|(piece)(square))(square|(n|s|e|w)+|x)'', or in more abstract terms, ''(piece-specifier)(property)''. The ''(piece|square|(piece)(square))'' part is the piece specifier, and the ''(square|(n|s|e|w)+|x)'' part is the property Each token claims that at some point during the move, a piece satisfying the piece specifier satisfied the claimed property. If the move which satisfies all tokens with the fewest steps (and secondarily with the fewest moved pieces) is unique (considering moves which result in identical positions to be identical), then it is valid lightvector notation describing that move * A ''(square)'' property claims that at some point during the move, a piece satisfying the piece specifier ended a step on said square * A ''(n|s|e|w)+'' property claims that at some point during the move, a piece satisfying the piece specifier moved in those cardinal directions in that order, and that at that time all tokens with a ''(n|s|e|w)+'' property to the left in the move had been executed * A ''x'' property claims that at some point during the move, a piece satisfying the piece specifier was captured in a trap A "moved piece" for the purposes of lightvector notation is considered to be a piece of either color ending up on a different square at the end of the turn than it started on. Being captured in place does not count as being "moved", but being captured on a different square than starting the turn on //would// count, though still technically not for the capturing itself