Computer Chess Club Archives


Search

Terms

Messages

Subject: about the meaning of unmake in the discussion of the need to unmake move

Author: Uri Blass

Date: 04:11:20 09/05/03


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.


Note that movei until today updated the hash key both in make and
unmake(it still does not have a pawn hash key but it is going to have it).

Changing it was not a 5 minute change because both make and unmake
called the same functions to add piece to the board and
this function updated the hash key so I could not delete updating
the hash key from unmakemove without deleting updating the hash key
from make move and I had first to change the function that makemove
calls in order to update the hashkey in makemove and not in functions that it
calls.

I have both a global varaible zob and an array zobkey[1000]
when I assume not more than 1000 plies in a game.

I think that only now I understand a good reason to get rid of the global
varaible zob like Hyatt suggested me long time ago.
If I get rid of it then it means that I do not need to do
zob=zobkey[hply] in my undo move.

I should have a local varaible zob only in my makemove.
It was not possible in the past because my makemove called some functions
that updated zob.

Using a global varaible for the zobrist key could be logical in case that
I use it a lot out of makemove but the only place when I use the zobrist key
of the current position is in probehash and recordhash
and I probably can use it also in my repetition detection but practically I use
an array.

I guess that the price of updating the global varaible in unmake move and
the price of using a global varaible instead of local varaible in make move is
probably higher than the advantage of the possibility to use
global varaible instead of an array in probehash and recordhash.

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.