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 

Outpost evaluation
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Ferdinand Mosca



Joined: 10 Aug 2008
Posts: 451
Location: Philippines

PostPost subject: Re: Outpost evaluation    Posted: Sat Apr 14, 2012 1:34 am Reply to topic Reply with quote

gleperlier wrote:
Hi,

So an idea could be :

#define KNIGHT_OUTPOST_BONUS 10

#0. Bonus only if defended by one pawn
#1. Extra bonus if defended by 2 pawns +10
#2. Don't bonus when the opponent has less than 5 pawns -10
#3. Extra bonus if the knight blocks a pawn of the opponent +10
#4. Extra bonus if the Knight is on half-open file +10

Would someone be very nice and post here a code that can be copy/past in Tom Kerrigan's Simple Chess Program (TSCP) eval ? or send me by pm ?

Cheers,

Gab


Try this out for a start, basic knight not attacked by enemy pawn and knight protected by friendly pawn, note this is only for white, you take care for the black Smile .

Code:
case KNIGHT:
               score[LIGHT] += knight_pcsq[i];

               //knight outpost for white
               //consider only if it is located inside rank 4 to 6 and file b to g (std board)
               if(COL(i) >= 1 && COL(i) <= 6 && ROW(i) <= 4 && ROW(i) >= 2){
                  //if square i is not attacked by enemy pawn
                  if(piece[i-9] != PAWN || color[i-9] != DARK){
                     if(piece[i-7] != PAWN || color[i-7] != DARK){

                        //visual debug
                        //print_board();
                        //printf("square %d, is not attacked by enemy pawn\n", i);

                        score[LIGHT] += 4;

                        //add bonus if this knight is protected by friendly pawn
                        //left pawn
                        if(piece[i+7] == PAWN && color[i+7] == LIGHT){
                           score[LIGHT] += 2;
                           //visual debug
                        }
                        //right pawn
                        if(piece[i+9] == PAWN && color[i+9] == LIGHT){
                           score[LIGHT] += 2;
                           //visual debug
                        }
                     }
                  }
               }

               break;
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
Outpost evaluation Lucas Braesch Sun Mar 18, 2012 10:42 am
      Re: Outpost evaluation Ed Schroder Sun Mar 18, 2012 12:15 pm
            Re: Outpost evaluation Lucas Braesch Sun Mar 18, 2012 1:47 pm
                  Re: Outpost evaluation Matthew R. Brades Sun Mar 18, 2012 4:27 pm
                        Re: Outpost evaluation John Merlino Sun Mar 18, 2012 4:44 pm
                              Re: Outpost evaluation Matthew R. Brades Sun Mar 18, 2012 5:54 pm
                                    Re: Outpost evaluation Charles Roberson Sun Mar 18, 2012 8:07 pm
                  Re: Outpost evaluation Pio Korinth Sun Mar 18, 2012 7:38 pm
                        Re: Outpost evaluation Michael Hoffmann Sun Mar 18, 2012 8:35 pm
                              Re: Outpost evaluation Pio Korinth Sun Mar 18, 2012 9:30 pm
                                    Re: Outpost evaluation Pawel Koziol Sun Mar 18, 2012 10:29 pm
                  Re: Outpost evaluation Ed Schroder Mon Mar 19, 2012 12:20 pm
                        Re: Outpost evaluation Robert Purves Tue Mar 20, 2012 7:14 am
                              Re: Outpost evaluation Gabriel LEPERLIER Fri Apr 13, 2012 8:00 pm
                                    Re: Outpost evaluation Ferdinand Mosca Sat Apr 14, 2012 1:34 am
                                          Re: Outpost evaluation Gabriel LEPERLIER Sat Apr 14, 2012 7:24 am
                                          Re: Outpost evaluation Lucas Braesch Sat Apr 14, 2012 2:28 pm
                                                Re: Outpost evaluation Ferdinand Mosca Sat Apr 14, 2012 4:34 pm
                  Re: Outpost evaluation Robert Hyatt Sat Apr 14, 2012 4:16 am
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