fairy-stockfish / Fairy-Stockfish

chess variant engine supporting Xiangqi, Shogi, Janggi, Makruk, S-Chess, Crazyhouse, Bughouse, and many more
https://fairy-stockfish.github.io/
GNU General Public License v3.0
617 stars 193 forks source link

Different score for forced mate vs maybe mate in bughouse #147

Closed antoyo closed 4 years ago

antoyo commented 4 years ago

Hi. I was wondering if you could change the score for a mate in the bughouse variant, depending on whether it is a forced mate (reached only with contact checks) vs a "maybe" mate (that is, a mate that could be blocked if the opponent receive a new piece). If no completely sure it makes sense because that kinda involve time and sitting could lead to a similar outcome, but anyway.

For the score, here's two ideas:

The idea of using - N is to favor mates in one vs longer mates.

What do you think of this?

ianfab commented 4 years ago

Thanks for your suggestion. Yes, I agree that this makes sense, since it should help the engine to decide correctly when having the choice between a conditional and an unconditional mate, and also when choosing between a completely winning position without a forced mate and a conditional mate.

To get conditional checkmates we need to search virtual piece drops in the first place, therefore I suggest to merge this thread into https://github.com/ianfab/Fairy-Stockfish/issues/122, so I am closing this one, and we can continue discussion there.

On the branch for virtual piece drops I also already experimented with scores for conditional/virtual mates, see https://github.com/ianfab/Fairy-Stockfish/commit/998ef03e51eda1d6abf02272aa94c52acde44e91, but as mentioned in the aforementioned thread the implementation is not stable yet.