Bundle Classic AI algorithms: graph search, adversarial game search, optimization and tabular reinforcement learning (-lib ai)
GameState
A two-player, zero-sum game position. Moves are integers chosen by the implementation (board cells, column ids, etc.). Evaluate scores the position from the MAXIMIZING player's perspective (positive = good for the maximizer); IsMaximizing reports whose turn it is.
Operations
Apply # virtual
Applies a move, producing the successor position.
method : public : virtual : Apply(move:Int) ~ System.AI.GameStateParameters
| Name | Type | Description |
|---|---|---|
| move | Int | move id |
Return
| Type | Description |
|---|---|
| GameState | successor state |
Evaluate # virtual
Scores the position from the maximizing player's perspective.
method : public : virtual : Evaluate() ~ FloatReturn
| Type | Description |
|---|---|
| Float | positive = good for the maximizer |
GetMoves # virtual
Gets the legal moves for the player to move.
method : public : virtual : GetMoves() ~ Int[]Return
| Type | Description |
|---|---|
| Int | move ids (empty when terminal) |