Skip to content
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

Goldfish v2.0.0 can't win endgame K+R vs K #45

Closed
tissatussa opened this issue Aug 27, 2024 · 5 comments
Closed

Goldfish v2.0.0 can't win endgame K+R vs K #45

tissatussa opened this issue Aug 27, 2024 · 5 comments

Comments

@tissatussa
Copy link

it just happened in a 5m+3s game : https://lichess.org/V1mabA1a
same bug as #25 ?

Repository owner deleted a comment from amir1387aht Aug 27, 2024
@bsamseth
Copy link
Owner

bsamseth commented Aug 27, 2024

Thanks for reporting! This should be fixed by #42. I'm doing a bit of polishing and testing before the next patch version, which will include this fix. Planning a new version and releasing 2.0 to lichess this week 🤞🏼

@tissatussa
Copy link
Author

tissatussa commented Aug 27, 2024

This should be fixed by #46

I will test a new version, i guess this 'erroneous behaviour' can simply be reproduced by letting the engine play any such position. Same for K+Q vs K ? I didn't try. It's really a pity such winning endgame is drawn this way, it shouldn't happen.

It's an 'utter' endgame phase with only one piece left. Sure, TBs exist for that, but i guess simply restricting the movement of the opponent King seems the proper approach. That way K+B+B vs K and even K+N+B vs K could result in a win also. Watch out for K+N+N vs K : many simple engines think it's an easy win, being 2 pieces up, but we know that's a draw .. unless an opponent (!) pawn lives on the g-line or so - a known exception. And don't let the engine give its last pawn too easily, normally a pawn should promote to win.

  • you'll solve it ;-)

@amir1387aht
Copy link

Guys Please Listen To Me. I Think Im Hacked, Please Don't Open That Link I Send, I Changed My Password But Please Don't Trust Links From Me Again, Thanks To Goldfish to Removed my Comment

@bsamseth
Copy link
Owner

I'll be honest and say I'll just rely on a TB for that. It could mean it takes way longer to get to mate, especially things like K+B+NvK, but there's so many edge cases to consider. Hopefully, correct draw detection is enough to avoid losing these won positions.

That said, maybe restricting opponent's king mobility could be a worthwhile move ordering heuristic in the late game. At least for now, I most enjoy optimizing search instead of improving evaluation.

I'll ping this issue once a new release is ready. Again, thanks for testing and reporting!

@tissatussa
Copy link
Author

I see you quickly created v2.0.1
I compiled that source and the engine plays well in CuteChess GUI.
It even made a draw (by repetition!) while being 2 pawns down :

goldfish-v2 0 1-draws

The White King can't approach its pawns, so these can never promote : draw !
Isn't this a nice example of the "Fix draw-by-repetition detection" #42 ?

@bsamseth
Copy link
Owner

bsamseth commented Aug 28, 2024

I was going to do some manual spot checks before pinging you, but I see you beat me to it! Thanks again 😊 That's a very fitting example, thanks for sharing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@tissatussa @bsamseth @amir1387aht and others