Onitama is a chess-like abstract strategy boardgame.
The game is played on a 5x5 board. Each player has five pawns, with the master pawn starting in the middle. At the begin of the game, 5 move cards are randomly selected out of the total of 16 animal moves. The goal is to capture the opponent's master pawn or to move on top of their master's starting position.
You can play against an AI with 3 difficulty levels, or "pass 'n play" against another human.
- Arrow keys, move the board cursor for pawn / destination selection.
- [o] / z to switch between move cards.
- [x] / x to select a pawn / destination.
During each turn the player chooses one out of two available move cards, and moves a pawn according to the chosen card. This move card will then be passed to the opposite player where it will become active next turn.
You can capture an opponent's pawn. By capturing the opponent's master pawn, or moving your master pawn to the opponent's master pawn starting space, you win the game.
Watch the short (3:24) instruction video on How To Play Onitama.
All movement cards
Internal AI improvements: faster moves, position key, benchmarks
AI: purge bad moves, award PV
Menu with opponent and difficulty selection
Negamax with alpha / beta pruning
Position and move evaluation
AI thinking indicator...
Take turns after each game
Naive AI player
Bugfix: moves shown on top of own pieces
Table with 16 cards
Use different indexes
Board as table
Place / remove stone
Show mini board
Show opponent mini board
Show 5th card
Shuffle cards to begin with
Select active card
Rotate cards when playing
Show valid moves
Limit to valid moves
Detect win condition
Nice! I have the physical version of this game, but it's nice to be able to play against an AI! He is not too clever, though, because I managed to win :D
But it's a nice and clear implementation of the game, nice work. I would love to have an advanced opponent, but that's probably quite hard to add!
I like this a lot. Managed to just barely beat the hard difficulty on a very weird set of cards with no up movement, but it was crazy hard, and the AI nearly got me a bunch of times. As in, I had only one move that didn't kill me or allow the enemy's master pawn to advance into a guaranteed win. I'd say your difficulty settings are spot-on!
[Please log in to post a comment]