New Rules for Classic Games, by R. Wayne Schmittberger,
written in 1992, is exactly what it sounds like. "New Rules" contains
possible amendments to rules for Risk, Monopoly, Poker, Bridge, Scrabble,
Reversi/Othello*, Shogi, Go, and of course Chess.
Statistical education, publishing, sports analytics, and game theory - everything that makes math useful in real life. Now carbon negative!
Featured post
Textbook: Writing for Statistics and Data Science
If you are looking for my textbook Writing for Statistics and Data Science here it is for free in the Open Educational Resource Commons. Wri...
Showing posts with label chess. Show all posts
Showing posts with label chess. Show all posts
Tuesday, 2 July 2019
Friday, 20 July 2018
Chess Variant - Laser Chess / Khet / Deflexion
Khet, Deflexion, and Laser Chess are different names for the same game. The currently commercially available game is called Laser Chess, and it has a space theme. Deflexion, Khet, and Khet 2.0 have an ancient Egyptian theme. The themes and some of the suggested starting boards differ between versions, but the pieces and board are functionally identical. They have also introduced a couple of new starting positions and improved the accuracy of the laser, but otherwise kept the fundamentals the same.
Tuesday, 15 May 2018
I read this: Chess Variants and Games for Intellectual Development and Amusement
Chess Variants and Games for Intellectual Development and Amusement
by AV Murali is not a book about Chess. If it's about anything it's about
geometry, puzzles, and education. It’s like Hoyle’s Book of Games but instead
of well-established games, it has speculative and creative modifications to
chess.
Saturday, 14 April 2018
Simultaneous Strategy 2: Kung Fu Chess
Kung Fu Chess, as found at
https://www.kfchess.com/ is a remake of a much older PC game by
Shizmoo games, and has recently been adapted for online play.
Kung Fu Chess has the initial setup and
most of the same rules as the standard game of queen's chess that
everyone is familiar with. The primary difference is that instead of
one player moving one piece at a time, a player may move any of their
pieces at any time, provided that the peace in question has not been
moved in the last 10 seconds.
Simultaneous Strategy 1: Cosmic Blocks
In the chess-like game Cosmic Blocks, by Narcissa Wright, and available through the Discord server at https://discordapp.com/invite/szpznUj , players each start
with a 1-square base on an 11-by-21 grid. That base spreads
influence, represented by coloured shading of squares, to the 3-by-3
area surrounding the base. The goal is to spread this influence into
the opposing base.
Sunday, 28 January 2018
AlphaZero, Stockfish, and flexibility regarding chess variants.
Recently there was a high-profile set
of matches between reigning champion chess AI stockfish and a
newcomer called AlphaZero. AlphaZero was created with the same deep
learning System that created AlphaGo, an AI that beat the world's
best at the game Go. In the 50 matches that AlphaZero played as
white, it won 24 of them and drew on the other 26. In the 50 games
that it played as black it won three of them and drew on the other
47.
This advantage towards the white player
may seem startling, however it's not out of line with other matches
between artificial intelligence programs at the world-class level,
nor is it out of line between matches between world-class human
players. Stockfish, which evaluates positions in a chess game in
terms of pawns of advantage starts the game with an advantage towards
white of 0.1 pawns. AlphaZero, on the other hand, has no idea how
many pawns of advantage white has, because it looks at the game
holistically which is a radically different method of analysis
compared to other modern AIs.
Part of the reason I bring up issues of
artificial intelligence is to look at how well the these various
systems will carry over to different chess variants rather than just
the orthrodox version of the game.
Let's start with Stockfish: Stockfish
is a system very much like Deep Blue and many of the other ones that
came between it and Stockfish. The difference being that Stockfish is
open source, meaning anyone can examine the code and edit it. This
and many of the artificial intelligence programs that came before it
run on a minimax principle, meaning that they try to choose the move
on the assumption that their opponent will choose the best counter
move in response to it, thus they try to pick the move which has the
worst best counter-solution. (They try to minimize their opponent's
maximum move quality.
To simplify, consider this abstract
game. You have two options: Option A allows your opponent to score 5
points. Option B allows your opponent to choose between a move that
scores 6 points, and a move that scores 2 points. Assuming that your
opponent will choose their best move, your best choice is to select
Option A, because it limits their score to 5. The fact that Option B
provides the possibility for your opponent to score only 2 points is
irrelevant. This is the minimax principle.
Most of what a traditional chess AI
does when selecting a move is to evaluate a particular position is
worth in terms of some abstract score, such as 'number of pawns'. The
value of pieces is straightfoward: a pawn is worth approximately 1, a
bishop or knight is worth about 3, and a queen is worth roughly 9.
However the position of these pieces also matters. Having a piece in
the middle or able to reach the middle at any point is worth a
premium. A 'passed pawn', or one which has no opposing pawn directly
ahead of it, is worth more than it would otherwise be, because of its
greater potential to be promoted. The alpha-beta algorithm (not
related to AlphaZero) contains set of parameters which decide how
much each board piece is worth on each square. Different machine
learning methods such as neural networks can be used to determine
what these parameters should be.
For variants of chess that are very
close to the original game such as Chess 960 (a.k.a Fischer Random
Chess) or Really Bad Chess, which both feature 8 by 8 grids, 16
pieces per side, and only the orthodox six pieces, an AI using the
alpha-beta algorithm should be able to play such games with few if
any complications.
These AIs work even after pieces have
been removed from the game so variants that use fewer pieces don't
produce any difficulties either. In practice, variants with different
board sizes are different arrangements such as Martin Gardener's mini
chess or Romanchenko Chess (shown in the figure, source: Jocly) work
well too as long as the value of any squares beyond the board are
hard-coded to zero. This also means in practice that an alpha-beta
algorithm can produce a viable chess AI on a board that is not a
perfect square or rectangle. However it can increase the
computational load the non-viable squares are considered, as they are
in Jocly's implementation of alpha-beta on Romanchenko Chess.
Some systems, including Deep Blue, take
advantage of chess literature, specifically for the orthodox game
also take advantage of openings and their reputations methods for
winning particular and games such as when you have a rook and a
bishop against an opponent who just has a rook. However, after the
opening and before the end game it's pretty much alpha-beta all the
way. [1]
Variants that included new pieces such
as fairy chess, or non-linear board movement such as Smess, the
Ninny's Chess, can also be supported by AI programs that uses the
alpha-beta algorithm. However these programs will need additional
manual training to be able to evaluate the value of different pieces
and space.
AlphaZero works on an entirely
different principle; it does not assume that its opponent is the best
possible opponent, one which will make the best possible counter
move. Instead, AlphaZero evaluates a candidate position by simulating
games of weighted random moves starting from the position to be
evaluated. The evaluation is simply the proportion those random-move
games that win* from AlphaZero's side. It evaluates the position
this way for each move that it could make, and simply chooses the
move that results in the best win proportion.
In these simulation games that
AlphaZero uses, the weighting of the moves is based on moves that are
likely to lead to a win based on games that AlphaZero played against
itself. For example, AlphaZero may assign more weight towards a move
that takes a piece over one that doesn't. It may also assign greater
weight towards moves that give it control of the centre of the board.
But these weight assignments would not be the result of any human
supervision.
Similarly, AlphaZero has no concept of
chess theory such as openings or their refutations, and it doesn't
have a book of endgames to rely upon. AlphaZero was trained simply by
giving the system the rules of chess, and letting it play many games
against different versions of itself. It's reasonable to assume from
here that AlphaZero would be able to handle many chess variants
without any additional modifications other than informing it of the
new rules. Furthermore a very similar training system could be given
to nearly any chess variant to produce an AI program that could play
that particular game.
* More exactly, the evaluation is
(Proportion of Wins) + 1/2*(Proportion of Ties)
[1] Beyond Deep Blue: Chess in the
Stratosphere, Monty Newborn
Monday, 17 July 2017
Chess Variants - 960 and Really Bad Chess
Fischer chess, or chess 960, is like queen’s chess which is
the standard Orthodox game we know, except in 960, the starting position of the
pieces in the back rank is random. It can be played live with a standard chess
set, or online through Jocly or Lichess.
There are restrictions on the starting arrangements such as that
the king must be between the rooks and that one bishop must be on each colour
of square. All the restrictions leave 960 legal arrangements out of
8!/(2!2!2!1!1!) or 5040 unique ways to arrange two rooks, two knights, two bishops,
one king and one queen. Both players are given the same arrangements using the
files or columns on the board not mirrored for each player's perspective chosen
at random.
As far as chess variants go, ‘960’ it's pretty close to Queen’s
chess in that it is played with the the same number and types of pieces the
same 8 by 8 board and that aside from difference in starting Arrangements no
other rule changes are imposed. The
restrictions even ensure that castling in either direction is possible.
If chess 960 is chess done with poetic license then Really
Bad Chess (RBC) is done with artistic transgression. In Really Bad Chess, by Zach Gage (http://reallybadchess.com/presskit/
) and available on Android and Apple, play is done on an 8 by 8 board with one
king and a collection of pawns, knights,
bishops, rooks, and queens arranged into ranks per team. That's about all I can
say for certain about the starting state of a Really Bad Chess game.
The pieces each player receives are random, really random. The
average piece tends to be more powerful than they would be in a game of Queen’s
chess. At the lowest ranks/difficulties,
players typically start with three or four queens as well as a front rank
comprised mostly of bishops. At those same lower difficulties the opponent AI
would have a much less impressive collection of pieces.
That's one big difference between 960 and RBC: the players
are each given their own random set.
When playing against humans, both are treated to a random high-powered arsenal.
In ranked mode, games are against the AI and the difference in power is
determined by the difficulty setting. At rank/difficulty 0 the player starts
with a massive material advantage over the computer. At 100, this advantage is reversed. At 50, both
players are given equally strong pieces although the pieces are still different
for each player and they are still more powerful on average than in Queen’s
chess. For example each player could have two queens and roughly six knights.
Every win in ranked play against the AI increases the
difference of the next ranked game. Every loss does the opposite. The AI itself
gets no smarter which may be to simplify the concept of difficulty, and it
keeps the game reasonably fast because AI does not think to Greater depth at
high levels.
This is the first variant I've played where I'm not absolute
trash and I have the proof:
The AI tends to strongly value putting you in check and will
needlessly sacrifice pieces to do so sometimes. This strategy works well and it
partially sidesteps the issue of uneven material value. For example, in difficulties
less than 50 even trades for pieces are desirable. At difficulties above 50
they are not. But these material advantages are most important in the endgame. I
have played several matches above-50 where I have overcome the material
disadvantage and then some only to be checkmated in the mid-game. For example,
this game, in which I played as white:
There is an undo button that allows you to take back one move
against an artificial intelligence. The button only works to a depth of one
move, and it can only be done so many times. Undo uses can be recovered or
stockpiled by either watching video ads (5 per view), or direct purchase ($1.40
per 100). 100 undo uses are bundled with the premium version of the game. The
premium version settings are well worth the $4 if you're going to play 10 or
more matches. The default color scheme is hideous but you can change it with
premium.
One minor complaint is that the term ‘rank’ is used instead
of ‘difficulty’. Rank goes up as you win when logically such a number should
decrease. Rank 1 typically means ‘the best’, but not here.
A bigger problem is that pawns are always promoted to queens
when promoted. This is usually what I want but cases do exist when another
piece is better and the extra decision step isn't that cumbersome.
It's a lot of fun to go on a power trip and play matches with
a lot more non-pawn pieces than I would otherwise have. It speeds the game up
to the point of absurdity where 50% to 70% of pieces are moved to capture
another piece.
The undo button and the wide set of possible scenarios in
Really Bad Chess has been a fun tool for a casual player like me to practice
tactics, however impossible they would be in a real game. I'm a little worried
that games like this are teaching me to play chess incorrectly which will make
it harder to develop skill in the standard game. However I've never played
chess seriously and I'm in my thirties so the opportunity cost doesn’t seem too
steep.
Really Bad Chess is really good at making puzzles as well. It
has daily and weekly puzzles which are just matches with preset pieces.
Saturday, 8 July 2017
Chess Variant - Wave Chess
Wave chess is a variant of chess meant to be played over multiple games.
Each player starts the match with x1 and x2 'waves' respectively. They start the match by first playing a game of standard, orthodox Queen's Chess. In each game after the first, the loser starts with all their pieces and all their clock time, but with one fewer wave in reserve. The winner of the previous game plays with the pieces and time they had remaining after the previous game, but the winner does not lose a wave.
Each remaining winner's piece can be placed in any space that it could legally start at. For example, a player with one remaining rook can choose either corner to start that rook in. They can also place their remaining pawns anywhere in the front rank.
A player is considered to have lost or won a previous game regardless of whether they have lost by forfeit or checkmate. The loser of the previous game becomes the white player.
In a draw, both players lose a wave and begin their next game with all pieces and time, and the previous game's white player becomes the black player.
This variant extends the idea of material odds handicapping. In a single game, one common handicap is to forfeit one or more pieces at the beginning of the game. In wave chess, smaller incremental handicaps are possible by forfeiting pieces only for a player's first wave. Also, larger handicaps are possible by giving one player more waves.
The wave mechanic also reduces the incentive of forfeiting. A player from a lost position may still want to continue a game in order to reduce their opponent's material for the next game.
After the first non-draw game, subsequent draws become less likely because one player will start with a material advantage. I would expect that matches between strong, evenly matched opponents would start with one side beating the other with only a few pieces in the end game, followed by alternations between short games where the winner of the previous game manages to take a few pieces before being mated, and normal length games where the previous winner starts only a few pieces behind.
I would also expect that matches between badly mismatched players would result in the weaker player throwing wave after wave at the stronger player, which could make the game more exciting for both players. How many waves does it a take for a 1400-rated player to take down a single wave of a world class chess AI like Stockfish? How many waves of novice players, or randomly selected moves, can you withstand against?
One possible compromise between Queen's Chess and Wave Chess is to allow a winning player to regain x points of material between games.
As there are thousands of variants out there, it's plausible this has been done before. If someone reading this knows of a similar concept, I would love to know so I can send a link to it and give credit.
Each player starts the match with x1 and x2 'waves' respectively. They start the match by first playing a game of standard, orthodox Queen's Chess. In each game after the first, the loser starts with all their pieces and all their clock time, but with one fewer wave in reserve. The winner of the previous game plays with the pieces and time they had remaining after the previous game, but the winner does not lose a wave.
Each remaining winner's piece can be placed in any space that it could legally start at. For example, a player with one remaining rook can choose either corner to start that rook in. They can also place their remaining pawns anywhere in the front rank.
A player is considered to have lost or won a previous game regardless of whether they have lost by forfeit or checkmate. The loser of the previous game becomes the white player.
In a draw, both players lose a wave and begin their next game with all pieces and time, and the previous game's white player becomes the black player.
This variant extends the idea of material odds handicapping. In a single game, one common handicap is to forfeit one or more pieces at the beginning of the game. In wave chess, smaller incremental handicaps are possible by forfeiting pieces only for a player's first wave. Also, larger handicaps are possible by giving one player more waves.
The wave mechanic also reduces the incentive of forfeiting. A player from a lost position may still want to continue a game in order to reduce their opponent's material for the next game.
After the first non-draw game, subsequent draws become less likely because one player will start with a material advantage. I would expect that matches between strong, evenly matched opponents would start with one side beating the other with only a few pieces in the end game, followed by alternations between short games where the winner of the previous game manages to take a few pieces before being mated, and normal length games where the previous winner starts only a few pieces behind.
I would also expect that matches between badly mismatched players would result in the weaker player throwing wave after wave at the stronger player, which could make the game more exciting for both players. How many waves does it a take for a 1400-rated player to take down a single wave of a world class chess AI like Stockfish? How many waves of novice players, or randomly selected moves, can you withstand against?
One possible compromise between Queen's Chess and Wave Chess is to allow a winning player to regain x points of material between games.
As there are thousands of variants out there, it's plausible this has been done before. If someone reading this knows of a similar concept, I would love to know so I can send a link to it and give credit.
Thursday, 16 February 2017
I read this: Chess Variants - Ancient, Regional and Modern
Chess Variants - Ancient, Regional, and Modern by John Gollon is a book published in 1968 that describes 33 different versions of chess, and includes sample games for most of them. It is the closest source I have yet encountered to answering the 'why chess' questions.
In the author's words, it is intended to be a Hoyle's Book of Games, but for chess. It also asrved as a humbling reminder to look outside university resources sometimes. The Bennett library may have nearly every book one could want on statistics, but it has perhaps 10 on chess, and those are mostly about artificial intelligence.
There's a lot of useful information from this book, much of the subtler implications are beyond me. Here's the gist of what I learned:
In the author's words, it is intended to be a Hoyle's Book of Games, but for chess. It also asrved as a humbling reminder to look outside university resources sometimes. The Bennett library may have nearly every book one could want on statistics, but it has perhaps 10 on chess, and those are mostly about artificial intelligence.
There's a lot of useful information from this book, much of the subtler implications are beyond me. Here's the gist of what I learned:
I read this: Chess Metaphors: Artificial Intelligence and the Human Mind
Chess Metaphors: Artificial Intelligence and the Human Mind, by Diego
Rasskin-Gutman uses chess to explain concepts of intelligence both
organic and artificial. The first part of the book is about the human
mind, and cognitive models like schema and memory chunking, which I only
skimmed. The second
part discusses how an AI program can efficiently explore all the
relevant consequences of any given chess move.
In the AI portion, 'Metaphors' explained how minimax algorithms worked, and discussed the Alpha-Beta algorithm, a chess playing staple, in particular. Minimax algorithms are useful for zero-sum two player games, like chess and most other head-to-head games.
Algorithms of this type work by compiling a set of possible moves, and for each move a set of possible responses by the opponent. The consequences of the response (e.g. the board state) is evaluated for each considered response. The worst (from the perspective of the AI) board state possible is assumed to be the response, and the evaluation (e.g. how 'good' that board state is) is recorded as the value of making that move. This repeats for each possible move, such that the AI has the worst case that comes from each possible move (each max). It then chooses the move that produces the best of the worst cases (the minimax). If someone playing against this AI doesn't respond with that optimal response, all the better.
The algorithm described above would only work for looking one move (one ply) ahead for each team. To consider deeper strategies, the process is repeated in an exponential explosion of possibilities. Reasonably, many of these algorithms differ in their focus on finding ways to avoid evaluating unnecessary positions, which is what Alpha-Beta does.
What really surprised me is how simple the evaluations can be. A very common evaluation method is to assign a value for each piece and a value for each square that piece can move to. This implies that such an AI would be functional, although not optimal, for a wide range of chess variants. In fact, if only the orthodox pieces are used, no additional programming would be required other than alter the possible moves to the new board. An algorithm like alpha-beta could be applied 'out of the box' to variants that don't use new pieces. This would explain why the 'chess variants' app that has the smaller boards like Garner's Minichess, and rearranged boards like Chess960 uses Alpha-Beta.
Including new pieces would involve programming in their possible moves and assigning them a material value (e.g. worth 4 pawns). Therefore, adapting existing AI to many of the variations seen in John Gollon's "Ancient, Regional, and Modern" book should be feasible. There are many ways to tune the relative value of pieces and immediate movement ability, including pitting AIs with different parameter values against each other in an evolutionary pool.
Footnote: Judging by http://www.chessvariants.com/ and the chess variants subreddit, it's much easier to make a variant than to drum up support and playerbase for it.
To consider later: Smess (also available as an app):
https://boardgamegeek.com/boardgame/1289/smess-ninnys-chess
In this game, the pieces have very simple moves and the board itself defines the difference in moves.
In the AI portion, 'Metaphors' explained how minimax algorithms worked, and discussed the Alpha-Beta algorithm, a chess playing staple, in particular. Minimax algorithms are useful for zero-sum two player games, like chess and most other head-to-head games.
Algorithms of this type work by compiling a set of possible moves, and for each move a set of possible responses by the opponent. The consequences of the response (e.g. the board state) is evaluated for each considered response. The worst (from the perspective of the AI) board state possible is assumed to be the response, and the evaluation (e.g. how 'good' that board state is) is recorded as the value of making that move. This repeats for each possible move, such that the AI has the worst case that comes from each possible move (each max). It then chooses the move that produces the best of the worst cases (the minimax). If someone playing against this AI doesn't respond with that optimal response, all the better.
The algorithm described above would only work for looking one move (one ply) ahead for each team. To consider deeper strategies, the process is repeated in an exponential explosion of possibilities. Reasonably, many of these algorithms differ in their focus on finding ways to avoid evaluating unnecessary positions, which is what Alpha-Beta does.
What really surprised me is how simple the evaluations can be. A very common evaluation method is to assign a value for each piece and a value for each square that piece can move to. This implies that such an AI would be functional, although not optimal, for a wide range of chess variants. In fact, if only the orthodox pieces are used, no additional programming would be required other than alter the possible moves to the new board. An algorithm like alpha-beta could be applied 'out of the box' to variants that don't use new pieces. This would explain why the 'chess variants' app that has the smaller boards like Garner's Minichess, and rearranged boards like Chess960 uses Alpha-Beta.
Including new pieces would involve programming in their possible moves and assigning them a material value (e.g. worth 4 pawns). Therefore, adapting existing AI to many of the variations seen in John Gollon's "Ancient, Regional, and Modern" book should be feasible. There are many ways to tune the relative value of pieces and immediate movement ability, including pitting AIs with different parameter values against each other in an evolutionary pool.
Footnote: Judging by http://www.chessvariants.com/ and the chess variants subreddit, it's much easier to make a variant than to drum up support and playerbase for it.
To consider later: Smess (also available as an app):
https://boardgamegeek.com/boardgame/1289/smess-ninnys-chess
In this game, the pieces have very simple moves and the board itself defines the difference in moves.
Sunday, 9 October 2016
Why Chess? Part 2: Onitama and Charity Chess
'Why chess' is an ongoing exploration of chess and its alternatives. The question connecting these posts is "why did the game we know as chess become the predominant strategy game?" Last time I looked at versions with smaller boards and fewer pieces than the orthodox game, like Martin Gardner's mini chess.
------
Onitama
Onitama is a recently released chess-like board game. It is played on a 5x5 board between two players controlling 5 pieces each. Four of pieces are 'students' which function as pawns, and one is the 'master' which functions as the king. The goal is to either capture the opponent's master or place any piece on the starting square of the opponent's master.
The movement capabilities of the pieces are determined by five cards. Your opponent possesses two of these cards, you possess two, and the fifth card is a 'swap' card. Each of these cards contains a move set. For example, the 'boar' card allows a piece to move one space laterally, or forward.
Any of your pieces can be moved using either of your cards. However, when you make a move, the card you used is traded with the 'swap' card. For example, using the 'boar' to move means giving up the boar, and allowing you opponent to obtain it after they make a move. (In the case where a move could have been made with either of your cards, you decide which one to give up.)
Games of Onitama are typically short. It took 10-25 minutes for each of 7 games a friend and I played when we were learning it. The game box includes 17 cards, so we were quickly able to see many different combinations of cards.
In two of these games, there was no card to allow the most basic of moves - 1 forward. All forward motion had to be done either diagonally or with a 2-side-1-forward move. These two games played radically different, often adjacent opposing pieces were safe from each other.
Only one card, tiger, allows a 2-forward movement. To balance this card, it only allows 2-forward and 1-back; there is no side movement or 1-forward allowed. This card is incredibly powerful, but in the one game we played with it, it became 'too awesome to use'. That is, using it would mean handing over the ability to the opponent, which could be disastrous. However, never using it meant only having one card of movement options at any given time.
For the setup of the game, 17 cards seemed exactly right. We imagined other card possibilities, but most were either obviously stronger than an existing card (say, by containing all the moves of that card and more), obviously weaker (containing a subset).
What Onitama is, to me, is an efficient, elegant way to try games with sets of hypothetical chess pieces and see the implications first hand. It's easy to imagine a chess-Onitama hybrid using an 8x8 board and cards of the orthodox pieces and some popular fairy chess pieces. There would be some complications with rank and with there being different kinds of pieces instead of identical movers, but the potential is there.
There is a detailed discussion of this game on the boardgames subreddit. There is also heated argument about whether Onitama is better than chess on the boardgamegeek forums.
----
Charity chess
I've been learning to play the orthodox chess game at a website called Charity Chess. This website hosts correspondence style and live games, as well as provides articles and training exercises. The profit from the advertising revenue is split among five charities, in proportion of the weighted votes of registered players. The weight is determined by the amount of activity in the community, mostly from seeing ads but also from publishing articles that receive high peer ratings.
The community is small now, about 300 users, but it has the potential to be the best gamification of charity I have seen yet. Rather than trying to create a game from scratch and make that charitable, this group simply took an existing, proven game and attached ad revenue.
------
Onitama
Onitama is a recently released chess-like board game. It is played on a 5x5 board between two players controlling 5 pieces each. Four of pieces are 'students' which function as pawns, and one is the 'master' which functions as the king. The goal is to either capture the opponent's master or place any piece on the starting square of the opponent's master.
The movement capabilities of the pieces are determined by five cards. Your opponent possesses two of these cards, you possess two, and the fifth card is a 'swap' card. Each of these cards contains a move set. For example, the 'boar' card allows a piece to move one space laterally, or forward.
Any of your pieces can be moved using either of your cards. However, when you make a move, the card you used is traded with the 'swap' card. For example, using the 'boar' to move means giving up the boar, and allowing you opponent to obtain it after they make a move. (In the case where a move could have been made with either of your cards, you decide which one to give up.)
Games of Onitama are typically short. It took 10-25 minutes for each of 7 games a friend and I played when we were learning it. The game box includes 17 cards, so we were quickly able to see many different combinations of cards.
In two of these games, there was no card to allow the most basic of moves - 1 forward. All forward motion had to be done either diagonally or with a 2-side-1-forward move. These two games played radically different, often adjacent opposing pieces were safe from each other.
Only one card, tiger, allows a 2-forward movement. To balance this card, it only allows 2-forward and 1-back; there is no side movement or 1-forward allowed. This card is incredibly powerful, but in the one game we played with it, it became 'too awesome to use'. That is, using it would mean handing over the ability to the opponent, which could be disastrous. However, never using it meant only having one card of movement options at any given time.
For the setup of the game, 17 cards seemed exactly right. We imagined other card possibilities, but most were either obviously stronger than an existing card (say, by containing all the moves of that card and more), obviously weaker (containing a subset).
What Onitama is, to me, is an efficient, elegant way to try games with sets of hypothetical chess pieces and see the implications first hand. It's easy to imagine a chess-Onitama hybrid using an 8x8 board and cards of the orthodox pieces and some popular fairy chess pieces. There would be some complications with rank and with there being different kinds of pieces instead of identical movers, but the potential is there.
There is a detailed discussion of this game on the boardgames subreddit. There is also heated argument about whether Onitama is better than chess on the boardgamegeek forums.
----
Charity chess
I've been learning to play the orthodox chess game at a website called Charity Chess. This website hosts correspondence style and live games, as well as provides articles and training exercises. The profit from the advertising revenue is split among five charities, in proportion of the weighted votes of registered players. The weight is determined by the amount of activity in the community, mostly from seeing ads but also from publishing articles that receive high peer ratings.
The community is small now, about 300 users, but it has the potential to be the best gamification of charity I have seen yet. Rather than trying to create a game from scratch and make that charitable, this group simply took an existing, proven game and attached ad revenue.
Sunday, 28 August 2016
Why Chess? Part 1: Smaller Boards
Chess fascinates me; it's a
very pure board game, and it has existed in some recognizable form
for centuries. There's a couple of general questions I have about
chess that I return to occasionally, but haven't formally approached
until now.
1) Why is the game that
we consider chess the orthodox game and not some variant or
alternative?
2) How robust is existing
artificial intelligence to changes in chess?
Chess, at least in the
western world, fills a niche in the game market. It's a competitive
game between two players with no random chance and no physical
requirement. The rules of the game take an hour to learn, a day to
understand, a lifetime to master. In game design terms, chess has a
great deal of depth, but limited complexity.
It's not the only such game.
The game of Go, for example, has fewer rules, comparable depth, and
an effective and convenient method to handicap.
Also, what about variants of
chess? Would the game be less interesting or deep if the knight moved
in a 3-and-1 jump instead of a 2-and-1 jump? What if the board
dimensions were different? Chess has changed before, however slowly.
Is it just an accident of history that this is the particular game we
got, or is there something optimal about it?
I've been playing games of
different variations of chess starting with those available on the
Android app Chess Variants. Several of the variants avialable in this
app are games that use the same kinds of pieces as orthodox chess but
fewer of them, and on a smaller, simpler board. One clear pattern has
emerged after 50 plays across 3 variants: I'm horrible. I am
embarrassingly bad at chess compared to a computer opponent.
Mini chess (original).
The first variant I tried
was Martin Gardner's 5x5 variant, made in 1969. I played as white
(first) against an AI opponent (to be discussed in part 2) about 20
times. The result was 0 wins, 2 draws, and a heap of losses. The app
allows you to play as black, or even as both for local play, but I'm
stubborn.
The layout, shown in Figure
1, suggests a major advantage to black to a naive player like myself.
There are 7 possible moves white can make at the beginning of the
game. All of these moves let a piece be captured right away. What
else could explain my tremendous defeat?
Figure 1 – Martin Garner's
original Minichess
I looked up the game to see
if my suspicions on white's disadvantage were correct. They were not.
It turns out the Gardner's 1969 version of 5x5 chess is a weakly
solved problem. Each player can play perfectly and always draw or
win. If both are playing perfectly, the game ends in a draw.
Furthermore, the perfect play algorithm (also called the 'oracle'),
is a mere ~10 pages of if-then instructions.
The "weakly" in
weakly solved refers to the fast that a perfect strategy exists and
is known from the starting position of the game, but not necessarily
every position. So if you play sub-optimally to start a game, the
'oracle' doesn't necessarily cover your situation.
A paper by Mhalla, M., &
Prost, F. (2013) outlines this perfect strategy and talks about the
winning rates of each side in a sample of historical correspondence
games. The white player won slightly more of these games than black
did.
Mini chess (updated).
This is a 1989 update to
Gardner's 5x5 chess. It is identical except that the knight and
bishop have been swapped on the black side.
I played 5 games on this
version after playing the 1969 version. Games lasted longer and were
closer, but with a small sample and an experience confound, I'm not
confident in explaining why.
Micro Chess
This seems to be as minimal
as chess gets without being a chess puzzle instead of a game. The
layout, shown in Figure 2, only has one pawn per side. The pawn can
be moved two squares in its first move. However, the pawn cannot be
promoted to a queen. This seems reasonable as no player starts with a
queen.
There is a one move
checkmate for black:
White bishop to C2
Black knight to C3
White is in checkmate.
I was unable to win any
match at this (again as white) either, but I did reach a draw quite
often. My suspicion is that the knight is the most powerful piece,
and that this change in the relative strength of pieces could cause
an AI opponent to make poor trades if it was using piece valuations
from classic chess. No such luck.
The Alpha-Beta Algorithm
The AI used in this app
employs the alpha-beta tree algorithm, which is good for quick
computation, like on a phone, because it eliminates large sets of
possible actions quickly. It's also non-deterministic; it will choose
different actions in identical situations if there is no single
obviously best solution.
The alpha-beta algorithm is
not specific to chess. It could be used for any discrete choice
system, like Shogi or Go. However, it relies on a heuristic scoring
system. To use the algorithm, an AI needs a way to evaluate how good
or bad a consequence of that action is. Last time, I talked about
throwing off the AI by assuming it would under-value a knight. That
is, I was assuming that the value assigned to the consequence "lose
your knight" would be copied over from classic chess to micro
chess, and that this value could be exploited.
The Alpha-Beta algorithm
also has some tuning parameters that determine the quality of the
decisions made by it. By changing the number or depth (turns removed
from the current situation) of the possibilities that the algorithm
will evaluate. These parameters can be manipulated indirectly in the
Chess Variants app by a difficulty setting with four options: easy,
medium, hard, and fast.
The last setting, fast, was
the one I was using. In this case, the algorithm will evaluate
solutions until 1 second of processor time has been used. This means
the algorithm becomes harder to beat when it is provided more
processing power, so I can blame my equipment for my losses. The AI
may have been playing a close-to-perfect game on the simplified
boards, because the space of possible states was much smaller. I also
noticed that in orthodox chess matches, the AI got better as the game
progressed and pieces were removed from the board. I could frequently
take the opponent's queen without a sacrifice only to be crushed in
the end-game.
For existing pieces, the
value of retaining each piece, and having them in various positions
relative to an opposing king is well established by humans. That, I
suspect, is why Jocli, the platform used to make all these chess
variants online, only has variants that use pieces that exist in
orthodox chess and which alter the board - because the heuristics for
these (combinations of) pieces are well-established.
Next, I intend to look into
Chess 960, which is a variant played on an 8x8 board in which the
starting positions of non-pawn pieces are randomized. There are 960
possible starting arrangements that fit the restrictions (King is
between rooks, bishops are on opposite colours, black mirrors white,
etc. ), hence the name.
An AI may not be able to
adapt a few opening strategies from orthodox chess to chess 960, but
it fares well by treating any starting as a game already in progress
(even if that progress was impossible). If you introduced a common
chess puzzle piece, such as the grasshopper or princess, would an
entirely new set of heuristics be needed?
Relevant links:
Mhalla, M., & Prost, F.
(2013). Gardner’s minichess variant is solved. ICGA Journal,
36(4), 215-221.
https://jocly.com
The platform used for the Chess Variants app. Also playable in a web
browser.
https://en.wikipedia.org/wiki/Minichess
including Gardner's Minichess, and Microchess.
https://en.wikipedia.org/wiki/Fairy_chess_piece
list of unorthodox chess pieces used in puzzles and variants.
Still to explore:
Onitama
The Duke
Nightmare Chess
Alice Chess
The Encyclopedia of Chess
Variants, by David Pritchard
The Classified
Encyclopedia of Chess Variants, by
John Derek Beasley
Subscribe to:
Posts (Atom)






