The following are the references for negamax.
NegamaxPlayer* = ref object of Player depth*: intsource line: 216
this is the AI player to be used with the
turn_based_game
library
method get_move*(self: NegamaxPlayer, game: Game): string =source line: 221
Get the chosen move from the algorithm in the context of a
turn_based_game
libraryGame
.
proc negamax*(game: var Game, depth: int): string =source line: 176
This is the main negamax algorithm.
depth
determines the number of plies for the algorithm to look ahead.returns a string
move
from thegame
's list of available possible moves. If there are not moves possible, it will return an empty string.
Appendices