ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

An experimental draw recognizer function
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Robert Hyatt



Joined: 27 Feb 2006
Posts: 15816
Location: Birmingham, AL

PostPost subject: Re: An experimental draw recognizer function    Posted: Thu Mar 15, 2012 2:10 pm Reply to topic Reply with quote

ethanara wrote:
Hi
When I was walking around, i got this idea for engines to better recognise whether or not a position is draw due to the 50 move rule. The idea is based on the fact that if you cant get a better position/win material et cetera within 50 moves, the game is a draw. Here it is in pseudo-code (in the search function):
Code:
if position_is_endgame && saved_before_flag == false then
first_eval_in_endgame = score
saved_before_flag = true
first_eval_in_endgame_depth = depth

and later in search, in a further depth
Code:

score = evaluate()
eval_difference = first_eval_in_endgame - score
if saved_before_flag == true && eval_difference > Table[depth_difference] then
return draw

So, it is basically saying that if you or your opponent don't improve your position with x centipawns in y depth, then it is quite surely a draw.
Table should be something like this:
Code:

Table[64] = "5, 7, 10, 13, 15, 17, 20" // and so on....

Of course, if you're over a special margin (1½ pawn or so), it will be completely dumb to do this.
The only problems remaining is having good values in table and a good endgame knowledge.
I will test this with doublecheck
Regards
Ethan


There are other approaches as well. In Crafty, once we start to approach the 50 move rule, I start to pull the score back toward zero. This makes any sort of move that produces progress to look better if it resets the 50 move counter.

There is a danger, of course. You can try so hard to avoid a draw, that you lose, if your eval is not really accurate.
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
An experimental draw recognizer function ethan ara Wed Mar 14, 2012 2:56 pm
      Re: An experimental draw recognizer function Lucas Braesch Wed Mar 14, 2012 3:50 pm
      Re: An experimental draw recognizer function Robert Hyatt Thu Mar 15, 2012 2:10 pm
            Re: An experimental draw recognizer function Robert Hyatt Sat Mar 17, 2012 4:14 pm
      Re: An experimental draw recognizer function Vincent Diepeveen Sat Mar 17, 2012 1:30 pm
            Re: An experimental draw recognizer function ethan ara Sat Mar 17, 2012 5:00 pm
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads