I must confess, I tried something similar (but simpler) for move ordering. (Moves with last moving piece were scored a bit less.) The rejection of the idea was cheapEvert wrote: ↑Tue Jun 12, 2018 7:16 pmI'd do it the same way I handle the 50-move counter, or castling rights.smcracraft wrote: ↑Tue Jun 12, 2018 6:08 am Curious about how others have implemented calculation of how many times each piece has moved since the beginning of the game.
The concern is when a piece has been captured in a make move and then uncaptured and updating the array.
How did you solve this?
Question remains, why do you want this information? If it's for something evaluation or move ordering related, you're probably on the wrong track.
whether or not a piece has moved and how many times
Moderators: hgm, Rebel, chrisw
-
- Posts: 175
- Joined: Fri Oct 22, 2010 9:47 pm
- Location: Austria
Re: whether or not a piece has moved and how many times
-
- Posts: 1564
- Joined: Thu Jul 16, 2009 10:47 am
- Location: Almere, The Netherlands
Re: whether or not a piece has moved and how many times
I guess we all tried something like this in the beginning. 40 years ago when I wrote my first engine in assembler each piece contained a flag signalling whether it had moved or not, and during the opening phase I gave preference to move with pieces that had not moved before. However, I soon found out that it helped nothing at all and that it was only redundant code slowing things down. At that time speed was very important, as I recall my first engine did 700 n/s on a 2 MHz. Intel 8080.nionita wrote: ↑Tue Jun 12, 2018 9:25 pmI must confess, I tried something similar (but simpler) for move ordering. (Moves with last moving piece were scored a bit less.) The rejection of the idea was cheapEvert wrote: ↑Tue Jun 12, 2018 7:16 pmI'd do it the same way I handle the 50-move counter, or castling rights.smcracraft wrote: ↑Tue Jun 12, 2018 6:08 am Curious about how others have implemented calculation of how many times each piece has moved since the beginning of the game.
The concern is when a piece has been captured in a make move and then uncaptured and updating the array.
How did you solve this?
Question remains, why do you want this information? If it's for something evaluation or move ordering related, you're probably on the wrong track.