ColorShapeLinks
An assignment for the AI course unit of the Bachelor in Videogames at Lusófona University
LoserSleeperAIThinker Class Reference

Implementation of an AI that will always lose because it takes too long to play. More...

Inheritance diagram for LoserSleeperAIThinker:
Inheritance graph
Collaboration diagram for LoserSleeperAIThinker:
Collaboration graph

Public Member Functions

FutureMove Think (Board board, CancellationToken ct)
 Perform a move. More...
 

Detailed Description

Implementation of an AI that will always lose because it takes too long to play.

Definition at line 14 of file LoserSleeperAIThinker.cs.

Member Function Documentation

◆ Think()

FutureMove Think ( Board  board,
CancellationToken  ct 
)
inline

Perform a move.

Parameters
boardThe game board.
ctA cancellation token.
Returns
The move to be performed.

The main thread may ask the AI 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 IThinker.

Definition at line 18 of file LoserSleeperAIThinker.cs.


The documentation for this class was generated from the following file:
FutureMove.NoMove
static FutureMove NoMove
Represent a "no move" decision, when an IA is unable to decide which move to perform,...
Definition: FutureMove.cs:28
FutureMove
Represents a move to be performed in the future.
Definition: FutureMove.cs:11