official-pikafish / Pikafish

UCI xiangqi engine
http://pikafish.org
GNU General Public License v3.0
867 stars 162 forks source link

Perpetual chase #27

Closed nguyenpham closed 1 year ago

nguyenpham commented 1 year ago

Describe the issue

Pikafish perpetually chased and lost a game

Expected behavior

No perpetual chase

Steps to reproduce

Load the attached game and test the engine last 1-2 movesengine's

Anything else?

[Event "NNUE engines with diff threads"] [Site "My computer AMD"] [Date "2023.01.19"] [Time "23:28:38"] [White "Pikafish 1 thread 16MB"] [Black "CCStockfish 1 thread 16MB"] [Result "0-1"] [Termination "perpetual chase"] [ECO "E40"] [Opening "Pawn vs. Pawn"] [TimeControl "40/300+1"] [PlyCount "62"] [Variant "xiangqi"]

1.c4 g5 2.Che2 {E40: Pawn vs. Pawn} Nc7 3.Nc2 Ng7 4.Nd4 Rh9 5.Ng2 Ci7 6.Ri1 Bce7 7.Cb4 Ade8 8.Cd2 a5 9.Bce2 Ra6 10.Raa1 Rh6 11.Cb0 e5 12.Cc0 {End of opening} e4 13.Nxc6 Rd6 14.Cdc2 Nce6 15.xe4 Nf4 16.Rib1 Ngh5 17.Rb3 Ra9 18.g4 Rad9 19.Afe1 xg4 20.Cd2 Cd7 21.Cxd7 R9xd7 22.Nxf4 xf4 23.e5 Cxi3 24.Rh3 Ci0+ 25.Rh0 Ci1 26.e6 Rd5 27.Cc1 Ci3 28.Rh3 Ci0+ 29.Rh0 Ci3 30.Rh3 Ci0+ 31.Rh0 Ci3 0-1

Operating system

All

Pikafish version

Pikafish 2022

PikaCat-OuO commented 1 year ago

4kab2/4a4/3rb4/2N1P3p/p2r3n1/2P2p3/P8/4B4/R1C1A3c/3AK1BR1 b moves i1i3 h0h3 i3i0 h3h0 i0i3 This position is a draw. Cannon has Knight as real root ( Knight on h5 protects Cannon on i3 ). IMG_20230120_200054 By the way, the rule implementation of pikafish is based on your paper (https://sci-hub.se/10.3233/icg-180054), thanks for that.

nguyenpham commented 1 year ago

You are right! There is a bug in my new implementation. Thanks for using my paper.

xiangqishare commented 1 year ago

hello Do you have a plan to fully open source your EGTB of xiangqi?

nguyenpham commented 1 year ago

Not published yet since the current code is so ugly.

However, I have planned to create a new open source, just a matter of time.