domino14 / macondo

A crossword board game AI, written in Go
https://domino14.github.io/macondo
GNU General Public License v3.0
48 stars 10 forks source link

crash on sim #350

Closed domino14 closed 3 weeks ago

domino14 commented 3 weeks ago
new game
name 1 winter winter
name 2 josh josh sokol
rack jo 
commit 8G JO
rack acehors
gen 
sim --plies 5 --stop 99
sim show
commit 9B CHOREAS
rack esoiry?
gen
gen 11
sim -plies 5 -stop 99
macondo> sim -plies 5 -stop 99
Simulation started. Please do `sim show` and `sim details` to see more info
{"level":"info","starting-node-count":0,"message":"nodes"}
macondo> panic: runtime error: index out of range [11] with length 11

goroutine 117 [running]:
github.com/domino14/macondo/montecarlo.(*AutoStopper).copyForStatCutoff(0xc00008e230, 0xc000106120)
        /Users/runner/work/macondo/macondo/montecarlo/stopping_condition.go:73 +0x2d3
github.com/domino14/macondo/montecarlo.(*AutoStopper).shouldStop(0xc00008e230, 0x80, 0xc000106120, 0x5)
        /Users/runner/work/macondo/macondo/montecarlo/stopping_condition.go:112 +0x129
github.com/domino14/macondo/montecarlo.(*Simmer).Simulate.func4()
        /Users/runner/work/macondo/macondo/montecarlo/montecarlo.go:437 +0x245
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/runner/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 38
        /Users/runner/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:75 +0x96
domino14 commented 3 weeks ago

fixed by #352