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 

How to implement KPK ?
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Chan Rasjid



Joined: 09 Mar 2006
Posts: 567
Location: Singapore

PostPost subject: Re: How to implement KPK ?    Posted: Sat Mar 30, 2013 12:20 pm Reply to topic Reply with quote

Sven Schüle wrote:
Evert wrote:
Chan Rasjid wrote:
My kpk evaluation returns 0/1 when it is a draw. If a win, it will return 5 x pawn and some simple evaluation terms. Maybe, someone who have implemented kpk sucessfully may check my codes to see if it should work. If it should work, then it means there are bugs in my search that somehow escaped detection.

Returning a draw is fine when you detect that the position is a draw, but I wouldn't do anything if the position is not a draw. You already know that the position is either drawn or won, so if it isn't drawn what you have to do is make sure that the engine makes progress towards winning. You do that with just the regular scoring of passed pawns/king position in the end game. The engine will then automatically seek out lines where the pawn is advanced and eventually promotes (by the way, make sure you get the value of a passed pawn that is about to promote right; if it's too high the engine may prefer to keep the pawn around rather than promote it). Introducing a "bonus" for having a won position will confuse things and may cause problems if you don't always give that bonus in a won position (as per above: the engine could prefer keeping the pawn around because it sees promoting the pawn as a drop in score).

Why would you need any king properties for evaluating a bitbase-won position? Wouldn't it be fully sufficient to use the distance to promotion to guide the search (where you only use one king property if the winner's king is on the promotion path so the distance gets incremented by one)? Advancing the pawn at the wrong time will be covered by getting a draw score from probing, and the same applies to "wrong" king moves leading to a draw.

Sven

Exactly as I understand!
_________________
Don't believe when you're told "There's no free lunch!" There is Linux.
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
How to implement KPK ? Chan Rasjid Thu Mar 21, 2013 3:43 am
      Re: How to implement KPK ? H.G.Muller Thu Mar 21, 2013 7:46 am
            Re: How to implement KPK ? Chan Rasjid Thu Mar 21, 2013 8:27 am
                  Re: How to implement KPK ? H.G.Muller Thu Mar 21, 2013 10:07 am
                        Re: How to implement KPK ? H.G.Muller Thu Mar 21, 2013 10:33 am
                        Re: How to implement KPK ? Chan Rasjid Thu Mar 21, 2013 6:10 pm
                              Re: How to implement KPK ? Don Dailey Tue Apr 02, 2013 6:56 pm
            Re: How to implement KPK ? Lucas Braesch Thu Mar 21, 2013 11:03 am
                  Re: How to implement KPK ? H.G.Muller Thu Mar 21, 2013 11:52 am
                        Re: How to implement KPK ? Lucas Braesch Thu Mar 21, 2013 12:04 pm
                        Re: How to implement KPK ? H.G.Muller Thu Mar 21, 2013 6:36 pm
                              Re: How to implement KPK ? H.G.Muller Thu Mar 21, 2013 9:00 pm
                              Re: How to implement KPK ? Chan Rasjid Sat Mar 30, 2013 8:15 am
                                    Re: How to implement KPK ? Evert Glebbeek Sat Mar 30, 2013 8:42 am
                                          Re: How to implement KPK ? Sven Schüle Sat Mar 30, 2013 12:12 pm
                                                Re: How to implement KPK ? Chan Rasjid Sat Mar 30, 2013 12:20 pm
                                                      Re: How to implement KPK ? Sven Schüle Sat Mar 30, 2013 12:42 pm
                                                            Re: How to implement KPK ? Chan Rasjid Sat Mar 30, 2013 2:03 pm
                                                                  Re: How to implement KPK ? Sven Schüle Sat Mar 30, 2013 6:29 pm
                                                      Re: How to implement KPK ? Wylie Garvin Sat Mar 30, 2013 12:50 pm
                                                            Re: How to implement KPK ? Chan Rasjid Sat Mar 30, 2013 1:53 pm
                                                Re: How to implement KPK ? Evert Glebbeek Sat Mar 30, 2013 2:03 pm
                                                      Re: How to implement KPK ? H.G.Muller Sat Mar 30, 2013 2:26 pm
                                                            Re: How to implement KPK ? Sven Schüle Sat Mar 30, 2013 6:38 pm
                                                                  Re: How to implement KPK ? H.G.Muller Sat Mar 30, 2013 8:13 pm
                                                                        Re: How to implement KPK ? Sven Schüle Sat Mar 30, 2013 8:58 pm
                                                                              Re: How to implement KPK ? H.G.Muller Sat Mar 30, 2013 10:58 pm
                                                                                    Re: How to implement KPK ? Sven Schüle Sat Mar 30, 2013 11:51 pm
                                                                                          Re: How to implement KPK ? H.G.Muller Sun Mar 31, 2013 7:35 am
                                                                                          Re: How to implement KPK ? Sven Schüle Sun Mar 31, 2013 9:02 am
                                                                                          Re: How to implement KPK ? H.G.Muller Sun Mar 31, 2013 9:09 am
                                                                                          Re: How to implement KPK ? Sven Schüle Sun Mar 31, 2013 9:13 am
                                                                                          Re: How to implement KPK ? Steven Edwards Mon May 13, 2013 2:14 am
                                                                                          Re: How to implement KPK ? Don Dailey Mon May 13, 2013 2:20 am
                                          Re: How to implement KPK ? Chan Rasjid Sat Mar 30, 2013 12:18 pm
                                    Re: How to implement KPK ? H.G.Muller Sat Mar 30, 2013 9:08 am
      Re: How to implement KPK ? Chan Rasjid Sun May 12, 2013 10:27 pm
            Re: How to implement KPK ? Ronald de Man Sun May 12, 2013 11:11 pm
                  Re: How to implement KPK ? Chan Rasjid Mon May 13, 2013 7:39 am
            Re: How to implement KPK ? Don Dailey Mon May 13, 2013 2:14 am
            Re: How to implement KPK ? Steven Edwards Tue May 14, 2013 7:19 am
                  Re: How to implement KPK ? Chan Rasjid Tue May 14, 2013 2:45 pm
                        Re: How to implement KPK ? Chan Rasjid Tue May 14, 2013 2:50 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