The game is connect four. You can play as follows:
- Each turn pick a column to play in by entering a number into the "Column" field
- Choose the bot/engine you wish to play against and click "Make Turn"
- The bot will calculate an answer and you will see the board with the bots turn made
The rules are:
- Columns may be played if there is space left in the column
- The human/user and the bot alternate in playing tokens
- The player that achieves to get a row, column or diagonal of their color wins
- The human/user plays as blue and starts the game
The different bots are:
- Bruteforce
- Calculates the next move taking into consideration all possible next gamestates
- Random*
- Plays randomly except when there are three in a row for the human. In which case the fourth token is placed to avoid loosing
- Bruteforce N%
- Plays as Bruteforce N% of the time. Otherwise plays as Random*
- Monte Carlo
- Semi-randomly simulates as much games as possible from the current gamestate and chooses the next gamestates according to which was best in the simulations
- Random
- Plays completely random
-
Note that due to the fact that a smooth game flow wants to be guaranteed, bruteforce uses
a pre-generated table to look up the first three turns. The displayed
calculation times are the times the engine would take if it calculated the moves on the
fly. The engine calculates the moves on the fly from the fourth turn on which results in
the longer waiting times.
For more information about the underlying techniques feel free to visit the
GitHub Repository.