2021-07-15 05:05:03 +00:00
|
|
|
import game, simulation, ui
|
2021-03-24 17:54:50 +00:00
|
|
|
|
|
|
|
|
2021-07-12 22:46:06 +00:00
|
|
|
when isMainModule:
|
|
|
|
let config = parseArgs()
|
|
|
|
var b: Board
|
|
|
|
b.init
|
2021-11-01 22:44:21 +00:00
|
|
|
b.setState(config.state)
|
2021-10-22 17:34:43 +00:00
|
|
|
|
2021-07-13 22:54:54 +00:00
|
|
|
let legScores = b.getLegScores
|
2021-10-22 17:34:43 +00:00
|
|
|
let gameScores = b.randomGames(1_000_000)
|
|
|
|
|
|
|
|
echo b.showSpaces(1, 16)
|
2021-07-15 05:05:03 +00:00
|
|
|
echo "\nCurrent leg probabilities:"
|
|
|
|
echo legScores.showPercents()
|
2021-07-13 22:54:54 +00:00
|
|
|
echo "\nFull game probabilities (1M simulations):"
|
2021-07-15 05:05:03 +00:00
|
|
|
echo gameScores.showPercents()
|