1 unstable release
0.1.0 | Jul 10, 2022 |
---|
#940 in Game dev
27KB
665 lines
bruto
Bruto is an artificial opponent to play Quarto.
Quickstart
Type swap
and hit ENTER after starting the program. This tells the engine to make the first move, and will let you see an example move and display the board.
Text-based User Interface
The prompt player>
is displayed when it's your turn to enter a command or a move.
The following commands are supported:
exit
- exit the programswap
- switch sides with the opponentplay <ENGINE_NAME>
- select an engine as opponentbruto
- (the default) engine based on MCTSrando
- engine that plays random moves
Any input that isn't a valid command is assumed to be a move.
A move is encoded by a sequence of 6 characters of the form RCPPPP
, where R
stands for a lowercase character a..d
encoding a row, C
stands for a digit 1..4
encoding a column, and P
is either o
or x
encoding a choice for a binary property.
The RC
part of the move encodes the spot where the piece chosen in the previous turn is to be placed. In the first move of a game, there is no chosen piece yet, which is represented by RC
=..
.
The PPPP
part of the move encodes the piece which the opponent must place in the next turn. If the current move results in an end state (win/loss/draw), there is no such piece, which is represented by PPPP
=....
.