“One day a biologist walked into my office at the University of Michigan and asked if I could help him with a combinatiorial problem. He wanted to investigate a theory of evolution for very small animals, beginning with one cell and growing just one cell at a time.” -- Frank Harary, “Achieving the Skinny Animal," Eureka, Summer 1982
Think you've mastered tic-tac-toe? Think again! Polyanimals! takes the classic game to a whole new level with geometric patterns that will challenge your spatial reasoning and strategic thinking.
What makes it special? Instead of just getting three in a row, you're racing to complete intricate patterns like Tippy, Elly, and Cross before your opponent does the same.
Meet the "animals" - these quirky geometric patterns are the heart of the game, named by mathematician Frank Harary who mapped out this fascinating variant in the late 1970s. The game has been called Harary's tic-tac-toe or animal tic-tac-toe.
The set of possible target animals to choose from, one of which will be the target in a given game, are as follows:
Click on any pattern to select it as your target for the game. Each pattern has unique strategic properties and varying numbers of possible orientations.
The board is a square grid of tiles, with size selectable from 3x3 to 10x10. For example, a 7x7 grid:
The game board consists of clickable squares where players place their pieces. Board sizes range from 3x3 to 10x10, with larger boards offering more strategic possibilities.
You can play against another human, challenge an AI, or watch AI players battle it out! Players take turns until one of them creates the target animal.
For example, in this case the human player (shamrock tiles) was able to successfully place the given target animal Tippy and win the game!
The game shows a completed board with the winning pattern formed by the player's pieces. The target animal "Tippy" has been successfully placed, resulting in a victory!
For Tippy, there are 4 such orientations:
The Tippy pattern can be rotated and reflected to create 4 unique orientations. Any of these orientations counts as a valid win condition.
For some, like Elly, there are 8:
The Elly pattern has 8 unique orientations due to its L-shape, allowing for more flexibility in placement compared to patterns like Tippy.
Others, like Cross and Boxy, may have just one unique orientation:
Some patterns like Cross and Boxy have only one unique orientation, making them more predictable but potentially easier to block.
Each AI player has a unique personality and playing style. Will you challenge the methodical Frank Harary, the aggressive Paul Erdős, or the unpredictable Squirrel?
The default players are Human (you) and Computer (Frank Harary). In all there are nine computer players to select from:
Each AI player has a unique personality and playing style, from the methodical Frank Harary to the unpredictable Squirrel. Choose your opponent based on your preferred challenge level!
Player 1 goes first, so in Human vs. Computer games, it's best for flexibility to have Human as Player 1 and Computer as Player 2. If you (the Human) want to let the Computer play first, that can be accomplished by clicking on PASS.
The arrow controls are back and step, for possibly going back and forth in the current timeline. This allows you to recapitulate the game if desired. If at any prior point in the timeline you select a different square than the one you had previously chosen in the current timeline, a "new timeline" message is generated and the game proceeds from that new branch. This allows you to take back moves.
In computer vs. computer mode, game play between the players is automatic and the controls are a little different:
Pro tip: When two deterministic AI's are playing each other, games often proceed straight to the conclusion. There is some randomness when presented with equivalent moves and the AI has to pick one randomly, but even then there are probably not that many different game paths given two players and a target pattern.
Polyanimals! is fundamentally a pattern recognition and strategic blocking game. Unlike traditional tic-tac-toe, the winning condition is more complex and varies by pattern, creating rich strategic possibilities.
Create a position where you can win in two different ways on your next turn. This forces your opponent to block one threat, allowing you to complete the other.
Use your pieces to interfere with your opponent's pattern while advancing your own. A well-placed piece can serve both offensive and defensive purposes.
For the player with the opening move, El is unstoppable on any board 3x3 or larger:
On a 4x4 or larger board, the player with the opening move can force a Tic win in three moves:
On a 4x4 or larger board, the player with the opening move can force an Elly win in four moves:
On a 5x5 or larger board, Knobby can also force a win in four moves:
Tippy is a forced win in four moves very much along the lines above for Knobby:
These four target patterns are known to be forced wins with optimal play on sufficiently large boards, but the strategies can be complex and are left as exercises for the player!
Snaky is unique among the polyanimals--it's unknown with mathematical certainty whether Snaky is a winner or loser and under what conditions (e.g. minimum board size). Harary (1982) conjectured that Snaky is a winner on a large enough board:
"My plausibility consideration for this assertion is that my former student, Dr. Geoffrey Exoo, won his last 20 games of Snaky achievement played on a sheet of graph paper."
If Harary's conjecture is true, then Snaky is the only winner among the hexominoes. There are no forced winners among heptominoes or greater.
Of course, this all is predicated on perfect, optimal play. With imperfect play on the part of the opponent, any pattern can be a winner!
That's about it for a quick start—give it a try! The AI's are generally pretty good at defense and offense but they are not perfect (even Paul Erdős makes mistakes!), so bring your A-game and see if you can outsmart them!
Remember: Polyanimals! rewards both tactical skill and strategic thinking. The best players combine pattern recognition, forward planning, and adaptability to their opponent's style.
For the mathematically curious, Polyanimals! offers fascinating insights into game theory and computational complexity.
In 1951, John Nash proved a remarkable result: in any finite, symmetric, perfect-information game, the first player has a guaranteed advantage. This means that with perfect play, Player 1 can either force a win or guarantee at least a draw. This applies to Polyanimals! as well!
The proof uses the elegant strategy-stealing argument: if Player 2 had a winning strategy, Player 1 could "steal" it by making an arbitrary first move, then following Player 2's strategy. This creates a contradiction, proving Player 1 must have the advantage.
Here's the fascinating part: no one knows what the optimal strategy actually is for most patterns in Polyanimals! This includes the AI players in this app - they're using sophisticated heuristics, but they're not playing perfectly.
Polyanimals! belongs to a class of games that are PSPACE-complete when generalized. This means:
This computational complexity explains why:
Some tantalizing unsolved problems:
The AI players in Polyanimals! augment their threat-based move analysis with a simplified form of Nash equilibrium evaluation. While not a true game theory application of Nash equilibrium (which would require analyzing the complete strategy space), this approach evaluates whether a move creates a stable advantage or gives the opponent opportunities to gain the upper hand. The AI considers moves that maintain this 'equilibrium' as generally preferable, as they don't allow the opponent to improve their position. This is essentially a heuristic that borrows the concept of strategic stability from Nash equilibrium theory but applies it in a more limited, move-by-move context.
Each AI player has a unique personality defined by configuration parameters that control their strategic behavior. These parameters include randomness levels, threat evaluation weights, search depths, and fork handling preferences. For detailed information about the default configuration values and how to create custom AI personalities, see Nash Configuration Defaults.
Vibe-coded with ChatGPT5/Cursor by Joe Knapp
Contact: jmknapp@gmail.com