megalodon-chess / megalodon

Chess engine with the UCI protocol
https://megalodon-chess.github.io/megalodon/
GNU General Public License v3.0
14 stars 0 forks source link

Bug: Illegal move in version 0.3.0 #48

Closed rwbc closed 3 years ago

rwbc commented 3 years ago

I am still following progress of Megalodon (which isn't very easy due to lots of commits).

My last compilation of version 0.3.0 finally played much better than those before, but I still caught an illegal move already in game 1. (played 6 games vs. Alouette 0.14)

BTW the source for 0.3.0 had the wrong version number in uci id, it still showed 0.2.6.

[Event "Test@CuteCGdv"]
[Site "RWBC-CAPPUCCINO Win7U64 Q8200 2.33Ghz + Nvidia GT 710"]
[Date "2021.04.01"]
[Round "1"]
[White "Megalodon_030-64"]
[Black "Alouette_014-64"]
[Result "0-1"]
[ECO "A86"]
[GameDuration "00:00:41"]
[GameEndTime "2021-04-01T12:09:43.455 Mitteleuropäische Sommerzeit"]
[GameStartTime "2021-04-01T12:09:01.765 Mitteleuropäische Sommerzeit"]
[Opening "Dutch"]
[PlyCount "32"]
[Termination "illegal move"]
[TimeControl "40/120"]
[Variation "Leningrad Variation"]

1. d4 {book} f5 {book}
2. c4 {book} Nf6 {book}
3. g3 {book} g6 {book}
4. Bg2 {-0.89/5 2.45} Ng4
5. f3 {+0.08/5 2.50} Nf6
6. Bg5 {-0.44/5 2.55} Nh5
7. g4 {-0.08/5 2.62} h6
8. gxh5 {+0.96/5 2.67} hxg5
9. hxg6 {+1.29/5 2.74} Nc6
10. g7 {+13.46/5 2.83} Bxg7
11. e3 {-0.21/5 2.90} O-O
12. Nd2 {-0.21/5 3.00} d6
13. f4 {-0.21/5 3.08} gxf4
14. Bd5+ {+1.70/5 3.20} e6
15. Bxc6 {+0.34/5 3.31} fxe3
16. Bf3 {+1.60/5 3.45} exd2+ {White makes an illegal move: g1e2}
0-1
rwbc commented 3 years ago

This bug seems still there in version 0.3.2 (my compilation)

Below is analysis from Megalodon 0.3.2 with feeding the pgn (while analysing) one ply before the illegal move happened:

dep score   nodes   time    (not shown:  tbhits knps    seldep)
  6  -2.70  11.1M   0:36.16 h2h4 g7d4 g1e2 d4b2 h1g1 g8h8 
  5  -0.05  1.15M   0:03.59 g1e2 d8h4 e2g3 g7d4 f3b7 
  4  -1.29  65805   0:00.22 g1e2 g8h8 e2f4 g7d4 
  3  -0.13  10705   0:00.02 e1f1 g7d4 f3b7 
  2  -1.29  527     0:00.00 g1e2 g7d4 
  1  +0.84  31      0:00.00 f3b7 
rwbc commented 3 years ago

I thought this was already fixed? BTW very strange moves with the Q from move 12 'til the illegal end.

[Event "Test@CuteCGdv"]
[Site "RWBC-CAPPUCCINO Win7U64 Q8200 2.33Ghz + Nvidia GT 710"]
[Date "2021.04.03"]
[Round "6"]
[White "Megalodon_033r2046-64"]
[Black "Zoe_01"]
[Result "0-1"]
[ECO "B20"]
[GameDuration "00:00:28"]
[GameEndTime "2021-04-03T12:10:02.072 Mitteleuropäische Sommerzeit"]
[GameStartTime "2021-04-03T12:09:33.278 Mitteleuropäische Sommerzeit"]
[Opening "Sicilian defense"]
[PlyCount "28"]
[Termination "illegal move"]
[TimeControl "40/60"]

1. e4 {book} c5 {book} 2. d3 {book} g6 {book} 3. f4 {book} Bg7 {book}
4. Be3 {+0.06/3 0.38s} Bxb2 {+1.85/6 2.96s} 5. Nd2 {-4.56/5 0.37s}
Nf6 {+3.05/5 2.02s} 6. Rb1 {-2.88/5 0.37s} Bd4 {-0.80/6 2.12s}
7. Bxd4 {-1.44/5 0.38s} cxd4 {-1.10/6 2.11s} 8. Ngf3 {+0.32/3 0.38s}
d5 {-1.00/6 3.22s} 9. exd5 {-1.18/5 0.39s} Nxd5 {+0.20/6 3.02s}
10. g3 {+1.24/3 0.38s} Nc3 {+2.00/6 3.58s} 11. Qc1 {-1.68/3 0.40s}
Nxb1 {+6.40/5 1.40s} 12. Qb2 {-3.39/5 0.42s} Nc3 {+4.30/6 1.90s}
13. Qxc3 {-3.18/5 0.41s} dxc3 {+14.70/5 0.54s} 14. Ne5 {-8.52/3 0.41s}
cxd2+ {+18.00/5 1.13s, White makes an illegal move: f1g2} 0-1
phuang1024 commented 3 years ago

I also experienced strange blunders with Megalodon. I think it should be fixed in 6dffa5b46afa2ab257df1cbfabb3e8641f94f7b7, which reduced the imbalance eval weight.