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

A human thinker for testing the console app. More...

+ Inheritance diagram for HumanThinker:
+ Collaboration diagram for HumanThinker:

Public Member Functions

override void Setup (string str)
 Setup thinker. More...
 
override FutureMove Think (Board board, CancellationToken ct)
 Perform a move. More...
 

Additional Inherited Members

Detailed Description

A human thinker for testing the console app.

Member Function Documentation

◆ Setup()

override void Setup ( string  str)
inlinevirtual

Setup thinker.

Parameters
strString containing setup parameters, should be parsed by the concrete AI thinker.

By default, this method does nothing and its implementation by the concrete thinkers is entirely optional.

See also
ColorShapeLinks.Common.AI.AbstractThinker.Setup

Reimplemented from AbstractThinker.

◆ 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;

This method asks the human to play.

See also
ColorShapeLinks.Common.AI.IThinker.Think

Implements AbstractThinker.


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