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: Tue May 14, 2013 2:45 pm Reply to topic Reply with quote

Hello,

sje wrote:
Chan Rasjid wrote:
This is a difficult KPK position which requires coding for the piece races:
[D]4k3/8/8/8/K7/8/4P3/8 w - - 5 1[/D]
   ::    :: BK ::    ::
::    ::    ::    ::    
   ::    ::    ::    ::
::    ::    ::    ::    
WK ::    ::    ::    ::
::    ::    ::    ::    
   ::    :: WP ::    ::
::    ::    ::    ::    

How can the half move counter be five when the full move number is one? The FEN input scanner should really check for this.

Anyways,
[d]4k3/8/8/8/K7/8/4P3/8 w - - 0 1[/d]
   ::    :: BK ::    ::
::    ::    ::    ::    
   ::    ::    ::    ::
::    ::    ::    ::    
WK ::    ::    ::    ::
::    ::    ::    ::    
   ::    :: WP ::    ::
::    ::    ::    ::    


Symbolic says:
Code:

[] dtbm
Ka3 Even
Ka5 Even
Kb3 MateIn23
Kb4 MateIn23
Kb5 MateIn23
e3 Even
e4 Even

[] dg
1 Kb3 Kd7 2 Kc3 Kc6 3 Kc4 Kd6 4 Kd4 Ke6 5 Ke4 Kd6 6 Kf5 Ke7 7 Ke5 Kd7 8 Kf6 Kc6
9 Ke6 Kb5 10 Kd6 Ka6 11 Kd7 Ka5 12 e4 Ka4 13 Kd6 Ka3 14 e5 Ka2 15 Kc5 Ka1 16
Kc4 Ka2 17 e6 Kb2 18 e7 Kc2 19 e8=Q Kd2 20 Qe4 Kc1 21 Kc3 Kd1 22 Qe5 Kc1 23
Qe1# 1-0

I too notice the error in the FEN position - the fifty counter should be 0. There is some bugs in xboard with editing positions when remnant information from previous games/positions corrupts the fifty counter on saving. I discovered it as I have to look into the fifty counter as the bug in my search was a corrupt fifty counter.

Now my KPK rountine is working perfectly. It is just probe KPK bitbase and then returning a value. The return for a probe win is the 'optimally correct' value as pointed out by Ronald - just 8xPawns - distance_to_promote.

My analysis output is (the only correct PV before queening?) :
Quote:

info depth 41, score +7871 cp, time 7381 ms, nodes 22541387 nps 3053974, pv
a4b3 e8f7 b3c4 f7e6 c4d4 e6d6 e2e3 d6e6 d4e4 e6f6 e4d5 f6e7 d5e5 e7f7 e5d6 f7e8 e3e4 e8d8 e4e5 d8e8 d6e6 e8d8 e6f7 d8d7 e5e6 d7d6 e6e7 d6e5 e7e8q e5d4 e8d8 d4c3


Best Regards,
Rasjid.
_________________
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