-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leela misses "obvious" en passant captures #634
Comments
I just tried this position on my setup (Windows 10, GPU version of lczero.exe 0.10 running as UCI engine in Chessbase Reader) and with NN316 she finds 1...hxg3 in a couple of seconds, less than 1000 nodes. I then tried running from the command line as you did (something I've not tried before) and this was the result, again with NN316: C:\Temp>lczero.exe -w weights_316.txt.gz info string Rxe3 -> 0 (V: 50.76%) (N: 0.04%) PV: Rxe3 info depth 17 nodes 922 nps 80 tbhits 0 score cp 222 time 11536 pv h4g3 f1g2 g3f2 g2f2 a8h8 c1h1 d6f5 c2c3 h8e8 h1e1 f5d4 e1g1 d4f5 g1g5 |
I updated my weights from NN312 to NN316 and can confirm that NN316 finds hxg3 much faster. It takes a little more than 1 second on my (admittedly not very impressive) hardware. Here's the output after 1 second:
|
On NN312, Leela does not find hxg3 even after 10,000 nodes. Here's the output:
I had no idea the network was improving that fast. |
OK, sorry for wasting your time. Should I close this issue? |
The real problem is LZ needs to know the previous 8 moves leading up to a position. If you only give a FEN it will do weird things, especially in the case of en-passant because it ignores the FEN codes telling about that and instead relies on the previous 8 moves, which are missing here. |
@killerducky I can confirm that as well. Here's the output from NN312 starting from a position 8 half-moves before the one I initially gave:
Does this mean that if you're analyzing a game with LZ, you can't go back and forth within a variation or turn the engine on and off? |
I was playing around with Leela Zero today (platform: Linux, 64-bit, NVIDIA CUDA) and I noticed that it misses strong en passant captures in certain positions.
Here's an example. In the following position, after White plays 1. g4??, Black's best move is to take en passant and then capture the undefended e3-pawn, with a winning advantage. Instead Leela plays something else.
If White plays 1. g3 instead, Leela spots the right move very quickly:
On the other hand, Leela doesn't seem to have a problem finding en passant captures in very simple positions, for example:
Is this worth fixing? I assume it's just a matter of Leela not having much "experience" in positions where en passant captures are possible, so the problem will go away eventually. Still, "eventually" might be a very long time.
The text was updated successfully, but these errors were encountered: