firstAvailableMovePlayer {rt3} | R Documentation |
Player that always takes the first move in the list of valid moves.
Description
Internally this player calls getMoves and then picks the first entry in the list of moves. A player is a function that takes a game state as input and returns a valid move index.
Usage
firstAvailableMovePlayer(gameState)
Arguments
gameState |
The gameState that the player should act on. |
Value
moveIndex Index to a valid move as returned by the getMoves function.
Examples
gameState <- startGame()
move <- firstAvailableMovePlayer(gameState)
[Package rt3 version 0.1.2 Index]