Expand description
Utilities to generate a Board
in a random state.
Re-exports§
pub use crate::ai::solver::is_double_forced_draw;
Structs§
- Random
Board Iterator - Iterator over randomly generated boards. Yields all intermediate boards, including the start and end of each simulation.
Functions§
- board_
with_ moves - Play the given moves, starting from
start
. - random_
board_ with_ condition - Generate a
Board
by playing random moves untilcond(&board)
returns true. - random_
board_ with_ depth_ condition - Generate a random board such that
cond(board, depth) & !cond(board, depth-1)
. - random_
board_ with_ double_ forced_ draw - Generate a random board with a double forced draw in
depth
moves, meaning that no matter what either player does it’s impossible for someone to win. - random_
board_ with_ forced_ win - Generate a
Board
by playing random moves until a forced win indepth
moves is found forboard.next_player
, which may be different fromstart.next_player
. - random_
board_ with_ forced_ win_ for - Generate a
Board
by playing random moves until a forced win indepth
moves is found forplayer
. - random_
board_ with_ moves - Generate a
Board
by playingn
random moves onstart
. - random_
board_ with_ outcome - Generate a random
Board
with a specificOutcome
.