Returns the estimated probability in [0, 1] that player wins from the
given position. Two methods are supported:
Usage
tsr_win_prob(
board,
player = NULL,
method = c("heuristic", "rollout"),
n = 200L
)Details
"heuristic"(default, real-time): mapstsr_evaluate()through a logistic calibrationp = plogis((score - a) / b). The coefficientsa,bare fit by adata-raw/script (S6) and stored as internal package data; provisional defaults are used until calibration is run."rollout"(offline accuracy): runsnpolicy-guided Monte-Carlo playouts using a light heuristic policy and returns the empirical win share. Slower in pure R; intended for offline analysis, not the live UI.
Terminal positions short-circuit: a win returns 1, a loss 0, a draw 0.5.
Examples
tsr_win_prob(tsr_new_board())
#> [1] 0.5
# \donttest{
tsr_win_prob(tsr_new_board(), method = "rollout", n = 2L)
#> [1] 0.5
# }