miguel-ambrona / D3-Chess

Chess Unwinnability Analyzer is an implementation of a decision procedure for checking whether there exists a sequence of legal moves that allows a certain player to checkmate their opponent in a given chess position.
https://chasolver.org
GNU General Public License v3.0
51 stars 8 forks source link

Performance of full algorithm #9

Closed dlbbld closed 2 years ago

dlbbld commented 2 years ago

I have implemented the CHA spec in Java.

The full algorithm is correct, thus very slow.

For example, deciding the starting position requires one minute.

Now in the C++ implementation, I found the logic to reward the previous move (using “pastProgress” in the “find_mate” in dynamic.cpp), which the PDF, however, does not specify.

Using this logic, it takes below one second. Only using this logic, the performance of the full algorithm is in a practical range.

Can you please check? Thanks.

miguel-ambrona commented 2 years ago

I added a footnote in the PDF to explain that the logic is important.