Matchsticks is a puzzle game for two players. Several matchsticks are placed in a line and players take turns removing one, two, or three matches from the table. You can't take any more than three matches on any one turn, you have to take at least one, and you can never put any back. The object is either to take the last match or force your opponent to take it. It's more of a puzzle than a game, for if one player knows the secret, it is either difficult or impossible for the other player to win, depending on how the game starts.
For this online version of the game, the computer "knows" the secret. It is a puzzle, therefore, to figure out how to beat it. When you discover the secret, you can play the game against an unwitting friend and flaunt your ability to win it repeatedly.
In "Human vs. Human," you may play a game with another person sitting at the same computer. In "Human vs. Computer," you can play against a computer simulated opponent. In "Computer vs. Computer," you can watch two computer simulated players play against each other. Simulated computer players never make mistakes.
There are three other settings that determine how the game should start and end. You can set whether the object of the game is to take the last match or avoid it (force your opponent to take it). You can set which player moves first. (In "Human vs. Computer" games, player 1 is the human and player 2 is the computer.) And you can set how many matches there should be at the beginning of the game (from 20 to 24).
When playing against the computer, some configurations may be impossible for the human player to win. The default game (take the last match, player 1 goes first, start with 21 matches) is solvable by a human player. For other configurations, you don't have this guarantee.
You can save your game by bookmarking the page in the game you want to come back to later. This works at any point in the game.
Cheating at this game is possible but discouraged as a general rule. However, on occasion it can be fun to play around with the game engine. The simplest way to cheat is to hit the "back" button on your browser when something happens that you don't like. You can also cheat by modifying the URL at a particular point in the game. Notice that the URL is comprised of name=value pairs, separated by ampersands. The letter(s) or number(s) before the equals sign is the name, and what comes after it is the value. If you modify some of the values you can change the state of the game. You can experiment if you like. Below are some specific things you can do.
To see if a certain game configuration is solvable in a "Human vs. Computer" game, use the same settings on a "Computer vs. Computer" game and see which computer player wins. If player 1 wins, then this same configuration can be solved in a "Human vs. Computer" game. If player 2 wins, it will be impossible.
To change the object of the game in midstride, change the value of t to 0 or 1. When set to 0, the object of the game is to take the last match; when set to 1, the object is to avoid the last match.