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 194 forks source link

fairy-stockfish is not good at capture the flag win rule. #831

Closed Kei-Toba closed 5 days ago

Kei-Toba commented 1 week ago

I modified minishogi rules like this. And I found fairy-stockfish overlooks caputure-flag rules. How should I rewrite this to solve the issue?

# based on minishogi
[miniflagi:shogi]
maxRank = 5
maxFile = 5
# In this position, black wins in 3 moves. a4a3 d5e5 a3a2 c2c1 a2a1
startFen = lp+n+Lp/kP1S1/2P1b/2G1+N/4K[] b - - 0 1
pieceDrops = true
capturesToHand = true
promotionRegionWhite = *5
promotionRegionBlack = *1
nFoldValue = loss
nFoldValueAbsolute = true
# userdefined
flagPiece = k
flagRegionWhite = *5
flagRegionBlack = *1
flagPieceSafe = true
ianfab commented 5 days ago

I don't see an issue here. On my notebook it takes depth 17 and about 250ms to find the mate in 3, so it seems to match your expectation. It can of course always be better, but unless there is a very clear cut evaluation or search problem there is not really a big point in investigating. However, please make sure to use the latest development version if you are using this config and not the last release, just in case that might be your issue.