Outcome probabilities
outcome_probs.Rd
Convert outcome distributions from eXtreme Gammon to probabilities
Details
Both eXtreme Gammon and GNU Backgammon report estimated outcome probabilities in a cumulative way: The number under "wins" is the probability of winning an ordinary game, a gammon or a backgammon. Sometimes it can be convenient to have discrete probabilities.
Examples
# XGID=-a-BaBC-A---eE---c-e----B-:0:0:1:00:0:0:0:0:10
# 4-ply winning chances, reported in a cumulative fashion:
cum_probs <- c(61.94, 24.09, 1.04, 38.06, 8.54, 0.42)
outcome_probs(cum_probs)
#> win_single win_gammon win_bg lose_single lose_gammon lose_bg
#> 37.85 23.05 1.04 29.52 8.12 0.42