Sample AI thinker using a basic Minimax algorithm with a naive heuristic which previledges center board positions.
More...
|
override void | Setup (string str) |
| Setups up this thinker's maximum search depth. More...
|
|
override string | ToString () |
| Returns the name of this AI thinker which will include the maximum search depth. More...
|
|
override FutureMove | Think (Board board, CancellationToken ct) |
| Perform a move. More...
|
|
override string | ToString () |
| Returns a short string description of the AI. More...
|
|
Sample AI thinker using a basic Minimax algorithm with a naive heuristic which previledges center board positions.
This is the same implementation used in the Implementing a simple Minimax player tutorial.
◆ Setup()
override void Setup |
( |
string |
str | ) |
|
|
inlinevirtual |
◆ Think()
Perform a move.
- Parameters
-
board | The game board. |
ct | A cancellation token. |
- Returns
- The move to be performed.
The main thread may ask the thinker to stop thinking. As such, this method should frequently test if a cancellation request was made to the cancellation token (ct ). If so, it should return immediately with no move performed, as exemplified in the following code:
if (ct.IsCancellationRequested) return FutureMove.NoMove;
- See also
- IThinker.Think
Implements AbstractThinker.
◆ ToString()
override string ToString |
( |
| ) |
|
|
inline |
Returns the name of this AI thinker which will include the maximum search depth.
- Returns
- The name of this AI thinker.
◆ defaultMaxDepth
const int defaultMaxDepth = 3 |
|
static |
The default maximum search depth.
The documentation for this class was generated from the following file: