Moderator: Andres Valverde
Daniel Shawul wrote:oh well, it must be a very bad idea then.
thanks anyway.
Pallav Nawani wrote:Daniel Shawul wrote:oh well, it must be a very bad idea then.
thanks anyway.
Or maybe nobody has considered doing it before ( I know I haven't)
I have read Ed's webpage and I think that his Idea on Lazy eval is a good one and I will do it that way too.
I have also thought of evaluating mobility by counting the moves during generation, but evaluation is mostly done either after making a move or before move generation. After a move is made, the mobility counts will change.
Pallav
Unlike repetition draw, evaluation path dependency is not "true" path dependency and such evaluation is stiil valid for the position.
Another idea
i read from CCC archieves is to store path dependent and path independent score separately, but it seems more complicated.
Also i'snt everyone penalizing loss of castle rights by comparing mask at root and at evaluation node.
Castling rights can be rolled into the hashkey, so there will be no path dependancy..
Also note - any search instabilities in a path dependent evaluation can be quiet fatal , and I have found that kicking out lazyeval based on alpha/beta bounds really helps - else for the same path you will have crazy variations in score (same positions through different paths might get evaluated differently already !).
Also , you will get absolutely no benifits of position transpositions : so better pump up that move ordering code : you will need it (you can ofcourse use hashtables just for the sake of transops move - gives a nice speedup ... just cant use it for pruning the search).
Castling rights can be rolled into the hashkey, so there will be no path dependancy..
And why compare with the root? I just keep a flag for each side whether it has castled or not. If it hasn't and its lost castling ability on one or both sides, then apply a penalty in proportion to the remaining enemy material.
Have I missed something?
Chan Rasjid wrote:Hello,
I usually can figure out things(non-advanced) from the hints from posts.
But I still can't figure out how hashkey(hash table?) can properly record
castling bonus. penalty full/partial. With the board hashkey, the array
U64 random_C_SQ_TYPE[2][64][6], I can determine if a piece rook,
the king, etc has moved from an initial position, but this is not correct.
The king may take 3 steps ahead and 3 step back to E1.
Rasjid
1) The after castling position and without castling position could transpos to eachother.
To solve this problem, you can hash the castling rights AND whether the king has castled or not. Of course, for initialising some fen positions you would need to make some assumptions about whether castling had occured or not.
mridul wrote:Hi Tom,
I used to have this too ... hash castling status into hashkey , and then use that to look at whether the king has "lost" castling privilages or not.
The problems with that are two fold when I try it use this info for eval :
1) The after castling position and without castling position could transpos to eachother.
The easiest what I found was this - just evaluate the king's safety properly - atleast as properly as I can
The problems with that are two fold when I try it use this info for eval :
1) The after castling position and without castling position could transpos to eachother.
Why is this a problem. If the positions are *exactly* the same. What I mean is, if the the castling rights are the same, the piece locations are identical as well as the right to move, why shouldn't the evaluation score them the same.
if (root_can_castle[side]){
if (!current_position_has_castled[side]){
penalise so that you castle and get king to safety;
// typically some have code to check which is safer side ,e tc , etc.
}
else if (current_position_has_castled[side]){
if (root_can_castle_both_ways[side]){
// some code to check which is safer side ,e tc , etc.
}
}
else if (castling_lost[side]){
// Since we "lost" castling, penalise high !
penalise_a_bit_more_extensively;
}
}
mridul wrote:Hi Tom,
Yes , I have taken it out - I have also taken out the enpassent hashing.
The added advantage of it is that now transpositions of the same position will now share the hashmoves - more relevent to enpassent hashing ofcourse.
hello
But it feels damn good when the king remains in the center without castling in a closed center position (with adequate defence) with opponent saying huge bonus and CEng saying even eval
Ofcourse , please note - the very fact that most people dont use these ideas (idiotic ?) and yet write much more stronger programs might mean that the cost benifit ratio makes it just not worth it !
Return to Programming and Technical Discussions
Users browsing this forum: No registered users and 26 guests