Returns a numeric scalar; positive values favour player. Terminal states
map to a large signed sentinel scaled to prefer faster wins.
Usage
mxo_evaluate(
game,
player = mxo_to_move(game),
w = NULL,
w_timeline = 1,
terminal_score = 1e+06
)Arguments
- game
An
mxo_gameobject.- player
Integer scalar, the perspective player (
1Lfor X,2Lfor O). Integer-valued numeric scalars are accepted; missing, fractional and other values are rejected before evaluation. Defaults to the player to move.- w
Numeric vector of length
kgiving the per-m-line weights. The default is exponential:1, 8, 64, ....- w_timeline
Numeric multiplier applied to m-lines whose direction traverses the timeline axis (axis class
"timeline"or"mixed"). Default1. Larger values amplify cross-timeline tactics.- terminal_score
Magnitude of the terminal sentinel. Default
1e6.
Examples
g <- mxo_new_game()
mxo_evaluate(g)
#> [1] 0