evaneill / PandemiCpp

C++ implementation of pandemic board game for testing MCTS agents
2 stars 0 forks source link

infect_city() outbreak logic is probably wrong #6

Closed evaneill closed 4 years ago

evaneill commented 4 years ago

Board.infect_city(...) seems like it's wrong whenever a city is outbroken. In a few tests of Play.cpp the first outbreak (or what looks like the first outbreak) pretty much always loses them the game.

Bad logic here might be why setup() also doesn't work.

evaneill commented 4 years ago

it's calling a virtual neighbor infect card on outbreak, which is wrong. This doesn't take into account color

evaneill commented 4 years ago

Put a global (class scope) tracker in that's filled then erased during a new infect(...) function, which wraps around infect_city(...), as new cities are infected. Seems to produce desired outcome in new functionality test.

Won't erase this until playtesting seems successful, since this might be related.

evaneill commented 4 years ago

Put a global (class scope) tracker in that's filled then erased during a new infect(...) function, which wraps around infect_city(...), as new cities are infected. Seems to produce desired outcome in new functionality test.

Won't erase this until playtesting seems successful, since this might be related.

Seems to work. Under playtesting only observe outbreaks happening in appropriate fashion, as of 8230edfc4cfadcd0fabf0f7d0a0b2c2b1009eadc