Stockfish do_move + undo_move

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Nils Magnusson

Re: Stockfish do_move + undo_move

Post by Nils Magnusson » Fri Jun 04, 2010 5:30 pm

mcostalba wrote:... there is a reason why it was changed from old UndoInfo to current StateInfo behaviour...it didn't occured by chance.
Hi Marco

Would you be so kind to elaborate on why you changed it?

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 7:17 pm

Re: Stockfish do_move + undo_move

Post by mcostalba » Fri Jun 04, 2010 6:00 pm

Nils Magnusson wrote:
mcostalba wrote:... there is a reason why it was changed from old UndoInfo to current StateInfo behaviour...it didn't occured by chance.
Hi Marco

Would you be so kind to elaborate on why you changed it?
Undo is much faster done in this way.

Please be so kind to take a look at the code in case you want to ask more regarding this subject. I am very glad to answer you, but I think that if you don't look the code _before_ my words remain just void words.

Reading the sources is a prerequisite to deeply discuss (or asking on) any SF subject. ;-)

Nils Magnusson

Re: Stockfish do_move + undo_move

Post by Nils Magnusson » Fri Jun 04, 2010 7:05 pm

Dear Marco

Thanks for your answer. I understand that you are probably bombarded with questions. I have browsed various parts of the SF source a few times. I must say I liked the coding style Tord, you and Joona use. To get the answer to my question in the from the source would have been a tedious process. I would have had to re-implement the Tord's method and benchmarked it against yours to see that there's a performance difference. Thank you for saving me the trouble. How much faster was it in nps? Probably not by much?

Post Reply