ColorShapeLinks AI
An AI competition for the IEEE Conference on Games 2021
|
This thinker always tries to make an invalid or illogical move. Used for testing purposes only. More...
Public Types | |
enum class | BadMove { AboveColumn , BelowColumn , Repeat , NoMove , Timeout , Uncooperative , Exception } |
Types of invalid or illogical moves this thinker can make. More... | |
Public Member Functions | |
override void | Setup (string str) |
Specify type of invalid move the thinker will make. More... | |
override FutureMove | Think (Board board, CancellationToken ct) |
Perform a move. More... | |
Public Member Functions inherited from AbstractThinker | |
override string | ToString () |
Returns a short string description of the AI. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from AbstractThinker | |
void | OnThinkingInfo (string info) |
Outputs thinking information. More... | |
Properties inherited from AbstractThinker | |
int | Rows [get] |
Number of board rows. More... | |
int | Cols [get] |
Number of board columns. More... | |
int | WinSequence [get] |
How many pieces in sequence to find a winner. More... | |
int | RoundsPerPlayer [get] |
Number of initial round pieces per player. More... | |
int | SquaresPerPlayer [get] |
Number of initial square round pieces per player More... | |
int | TimeLimitMillis [get] |
Time limit for the AI to play. More... | |
Events inherited from AbstractThinker | |
Action< string > | ThinkingInfo |
Event raised when thinkers produce information while thinking. More... | |
Events inherited from IThinker | |
Action< string > | ThinkingInfo |
Event raised when thinkers produce information while thinking. More... | |
This thinker always tries to make an invalid or illogical move. Used for testing purposes only.
|
strong |
Types of invalid or illogical moves this thinker can make.
Enumerator | |
---|---|
AboveColumn | Place a piece on a column above the number of existing columns. |
BelowColumn | Place a piece on a column below the number of existing columns, i.e., at -1. |
Repeat | Always try to place a piece in the same column. |
NoMove | Return a FutureMove.NoMove. |
Timeout | Always terminates with a timeout. |
Uncooperative | Refuses to terminate execution. |
Exception | Throw an exception. |
|
inlinevirtual |
Specify type of invalid move the thinker will make.
str | A string representation of BadMove values. |
ArgumentException | Thrown when an unknown option is given in str . |
Reimplemented from AbstractThinker.
|
inlinevirtual |
Perform a move.
board | The game board. |
ct | A cancellation token. |
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:
Implements AbstractThinker.