kreibaum / pacosako

This code drives the pacoplay.com website where you can play Paco Ŝako.
http://pacoplay.com
MIT License
23 stars 3 forks source link

You put yourself in Ŝako heuristic should not trigger for moves that win the game #100

Closed kreibaum closed 1 year ago

kreibaum commented 1 year ago

See https://pacoplay.com/replay/416 for an example.

Thanks Yorick for reporting.

kreibaum commented 1 year ago

Code that sets this value is https://github.com/kreibaum/pacosako/blob/master/lib/src/analysis/mod.rs#L287

gives_opponent_paco_opportunity: !in_sako_before_move && in_sako_after_move,

kreibaum commented 1 year ago

Looks like fixing #104 also fixes this issue as a side effect, as I had to declare states that are already over as "not in Ŝako" in order to make #104 work. Closing this issue.