Bundle Classic AI algorithms: graph search, adversarial game search, optimization and tabular reinforcement learning (-lib ai)
Minimax
Depth-limited minimax with alpha-beta pruning over a GameState. Deterministic: ties resolve to the first move in GetMoves() order.
Example
searcher := Minimax->New(9);
best := searcher->FindBestMove(state);Operations
FindBestMove #
Finds the best move for the player to move.
method : public : FindBestMove(state:GameState) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| state | GameState | position to search |
Return
| Type | Description |
|---|---|
| Int | best move id, or -1 when no moves exist |