Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: The Code for the Rybka-Mate-Bug

Author: Chan Rasjid

Date: 03:30:02 12/14/05

Go up one level in this thread


On December 14, 2005 at 04:44:15, Steve Maughan wrote:

>Vasik,
>
>>The problem is when the hash entry ages.
>
>This is easy to get around - just store the distance to mate from the *position*
>(i.e. not the root) in the hash table.
>
>In pseudo code:
>
>procedure push_hash(position)
>begin
>	if winning_mate_value_in_hash then
>		hash_draft_depth += position's_ply_from_root
>	else if losing_mate_value_in_hash then
>		hash_draft_depth -= position's_ply_from_root
>	store(position)
>end;
>

procedure probe_hash(position)
>begin
>	if found_in_table(poistion) then
>	begin
>		get_hash(position)
>		if winning_mate_value_in_hash then
>			hash_draft_depth -= position's_ply_from_root
>		else if losing_mate_value_in_hash then
>			hash_draft_depth += position's_ply_from_root
>	end
>end;
>
>I hope this helps!
>
>Regards,
>
>Steve

I think this is what Dr. Hyatt meant - store exact-score +- ply?
It is as in your code.

Could Vasik mean something need to be done in some cases for mate entries
in TT. I have no clue anything need to be done even if we do not clean TT after
a game.

In a normal search, Snailchess always return whenever a mate score is found.
Getting the shortest mate here seems illogical as long as it is a mate-score
for a position and hashed. Only the general search probe may use them for
cut-off and they need not be the shortest-dist-to-mate. Comparing 2 mate-scores
may not be accurate (shortest) but it should not be a problem. When a plus-mate
is confirmed at root, we call root_mate_search() and this is one of the cleanest
and easy call that can eliminate all search intricacies with not the slightest
drawback. I think this should be applicable even for very top programs. Weak
snailchess never ever fail to complete the game with checkmate with this style.

I don't know the case of Rykba.

Rasjid





This page took 0.02 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.