Author: Uri Blass
Date: 05:02:54 09/05/03
Go up one level in this thread
On September 05, 2003 at 07:34:33, Bo Persson wrote:
>On September 05, 2003 at 07:11:20, Uri Blass wrote:
>
>>Does unmake means doing the opposite calculation
>>that were done in make?
>>
>>I assume that makemove updates the hashkey(and the pawn hashkey).
>>Does unmake move update the same information again to its previous
>>value or does the program remember it in an array.
>>
>>If it remembers it in an array then there is something that it does
>>not unmake.
>>I am interested to know if there is more information that unmake does not unmake
>>except hash keys.
>
>Some things are "one-way" and can not be undone, like castling and en-passant
>status. They have to be saved. The hash key is possible to "undo", but maybe it
>is cheaper to copy it, beacuse it will be written to anyway at each ply.
Yes
You are right and I also remember the castling flag and some more information
I did not pay attention to most of it
Here is the information that I calculate in my makemove and do not calculate in
my unmake move(part was copied from tscp and part was added later.
Hash was added a lot later so I did not think to put it in the same struct.
move m;
int capture;
int castle;
int ep[3];
int fifty;
int kingincheck;
int checkingsquare;
I also have a lot of it twice and the result is that in my unmake move
I need to update global varaible by things like
ep[0]=hist_dat[hply].ep[0];
if (ep[0]>=0)
{
ep[1]=hist_dat[hply].ep[1];
ep[2]=hist_dat[hply].ep[2];
}
fifty=hist_dat[hply].fifty;
I think that the right comparison is not between make undo and make copy but
between make copy and make copy less information and even Crafty does not unmake
everything that it makes.
Uri
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.