Simulates one complete 4D tic-tac-toe game with the given policies for
player X and player O. Returns a tsr_game object recording the move
sequence and outcome.
Arguments
- policy_x
Policy for player X. Either a built-in string or a function
(board) -> integer cell index.- policy_o
Policy for player O. Same forms as
policy_x.- seed
Optional integer. If supplied, RNG is seeded via
withr::local_seed(); global.Random.seedis unchanged.
Value
A tsr_game object: list with moves (integer vector of cell
indices, in order), winner (0/1/2), n_moves (integer),
policies (named character c(x, o)), final_board (a ttt_board),
to_move (integer vector — moving player at each ply).