ColorShapeLinks AI
An AI competition for the IEEE Conference on Games 2021
SequentialAIThinker Class Reference

Implementation of an AI that will always play in sequence, from the first to the last column. It will start by using pieces with its winning shape, and when these are over, it continues by playing pieces with the losing shape. More...

+ Inheritance diagram for SequentialAIThinker:
+ Collaboration diagram for SequentialAIThinker:

Public Member Functions

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

Additional Inherited Members

Detailed Description

Implementation of an AI that will always play in sequence, from the first to the last column. It will start by using pieces with its winning shape, and when these are over, it continues by playing pieces with the losing shape.

Member Function Documentation

◆ Think()

override FutureMove Think ( Board  board,
CancellationToken  ct 
)
inlinevirtual

Perform a move.

Parameters
boardThe game board.
ctA 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.


The documentation for this class was generated from the following file: