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
603 stars 189 forks source link

Refinement of chasing rules #468

Open ianfab opened 2 years ago

ianfab commented 2 years ago

As a follow-up to #55, after the initial implementation improve the chasing rule implementation to address the cases that are not handled correctly yet.

Development branch: https://github.com/ianfab/Fairy-Stockfish/tree/chasing_full

xiangqishare commented 2 years ago

for example?

ianfab commented 2 years ago

What so far is not implemented are cases of blocking a root as well as some corner cases with pins and flying generals. There currently aren't any open questions about the rules, it is mostly about finding an efficient implementation. Hopefully the impact of the current limitations will anyway be small.

xkwang91 commented 2 years ago

The latest nnue version I downloaded from https://github.com/fairy-stockfish/Fairy-Stockfish-NNUE/releases/download/xiangqi-ae0082262b68/fairy-stockfish_x86-64-bmi2.exe, which was just released, still violates chasing rules. For example,

3k1n3/4P4/9/9/8R/8R/3r3CC/5p3/4p4/5K3 w - - 0 1

In the case, b should win. But by violating chasing rule, the game could not make progress.
Hopefully, the problem could be fixed in the next release.

PraseodymiumSpike commented 1 year ago

https://www.wxf-xiangqi.org/images/wxf-rules/2018_World_XiangQi_Rules_English2018.pdf putting this here for reference