Stockfish do_move + undo_move

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Nils Magnusson

Re: Stockfish do_move + undo_move

Post by Nils Magnusson »

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 9:17 pm

Re: Stockfish do_move + undo_move

Post by mcostalba »

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 »

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?