lichess.org
Donate

Dead Draw Detector

Hi,

I am so exited to present you my Dead Draw Detector (github.com/miguel-ambrona/D3-Chess)!

After so many forum threads about drawn positions being unfairly classified by lichess, the last one being very recent: lichess.org/forum/lichess-feedback/bug-lichess-does-not-recognize-positions-where-it-is-impossible-to-lose-when-you-time-out

And after so many people arguing that an automated draw detection mechanism could not be implemented, I was challenged to give it a try. I think the results are quit promising!

I have tested the tool on a set of 5 million games from the lichess game database that were won on time by one of the players, finding that exactly 319 of them were unfairly classified. (You can find the list of games here: github.com/miguel-ambrona/D3-Chess/blob/main/examples/unfair.txt.) What is important is that the tool required an average of 1.7ms per position (and never more than 2s, in extremely rare positions), running on my personal laptop. I believe these numbers make it completely feasible for an online chess server to run this test after every game that ends in a timeout.

I was hoping to find some interesting positions in the database, although I was a bit disappointed.
These are my favorite two:

* PIL4PUtT#87: Here any underpromotion was better than queening (which leads to an automatic draw) although lichess gave the victory to Black.

* cZ8QxYP8: This game is just so crazy, with a surprising ending! (Again, unfair for one of the players.)

I would like to know your opinion on this and whether lichess would be interested in implementing this method. (Possibly after being revisited and polished.)

Also, I am new in C++, so if you are an expert and can give me some feedback on the way I implemented the tool, I would really appreciate it.

Finally, to get more people exited into this, I developed a very simple webpage where you can test the tool right away on any position of your choice: 103.125.219.211/d3-chess/

You may need to enable websockets in your browser (stackoverflow.com/questions/11768221/firefox-websocket-security-issue). If it is still not working, try to connect through http instead of https.

Cheers!
@Vertonghen The idea is that lichess would integrate this tool and, after every timeout, run the tool on the final position of the game to see whether the player with time on the clock can actually win (otherwise, it is a draw).
"Search interrupted (repeat the search with higher depth limit) (Total positions searched: 24153703)"

Looks promising. Anyway to change the depth limit on the webpage for a user?
#1 Nicely done ambrona, performing this research and gathering & presenting this data. Faced with the actual numbers I am curious what, if anything, Lichess will do (I'm not experienced enough to intelligibly speak about this).
Sounds cool. How about if it would only analyse per request, to minimize the load to the server? Ideally, nobody would make dishonest requests as there would be nothing to gain (you'd only make a request if you really believed the result could change).
@TBest What were you trying? I don't want you to fry the server I am using, so I have set a very small search limit. If you want to relax it, install the tool.

@Toadofsky Thanks so much! I am glad you enjoyed it. There is still a lot of room for improvement if you guys want to collaborate. But I felt the the numbers are already good to present it.

@ProposeBurgers Good idea! I have seen the same proposal in some forum threads, but they said that adding new functionalities is always something very delicate. Honestly, I don't think applying it to all games would be a problem. The only really difficult positions are those that involve blocked pawns and many bishops in the same square color, but those will never appear in real positions (besides, they could be handled independently).
I tried a slight edit to one of the examples. It should still be a dead draw. (Was curious how it would compere with the given example in terms of num pos searched.)

8/1k6/1p1pB3/pPpP4/P1Pp1p1p/3PbP1P/6K1/5B2 w - - 48 85

8/1k6/1p1pB3/pPpP4/P1Pp1p1p/3PbP1P/6K1/8 w - - 48 85 (the included example)

PS. Your limit is probably reasonable, just figured I would mention it :)

This topic has been archived and can no longer be replied to.