John Merlino

Joined: 08 Mar 2006 Posts: 627 Location: San Francisco, California
|
Post subject: Re: Outpost evaluation Posted: Sun Mar 18, 2012 4:44 pm |
|
|
| ZirconiumX wrote: |
I was just trawling through the sources of cyclone when I found something that might be of use:
| Code: |
const int KnightOutpost[2][64] =
{
// these are probably white
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
2, 2, 5, 5, 5, 5, 2, 2,
3, 3, 6, 10, 10, 6, 3, 3,
3, 4, 7, 10, 10, 7, 4, 3,
3, 5, 7, 7, 7, 7, 5, 3,
2, 3, 3, 3, 3, 3, 3, 2,
0, 0, 0, 0, 0, 0, 0, 0,
// these are probably black
0, 0, 0, 0, 0, 0, 0, 0,
2, 3, 3, 3, 3, 3, 3, 2,
3, 5, 7, 7, 7, 7, 5, 3,
3, 4, 7, 10, 10, 7, 4, 3,
3, 3, 6, 10, 10, 6, 3, 3,
2, 2, 5, 5, 5, 5, 2, 2,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
};
|
and
| Code: |
// knight
mob = 0;
if( me == White )
{
if( board->square[from - 17] == WP )
mob += KnightOutpost[me][SquareTo64[from]];
if( board->square[from - 15] == WP )
mob += KnightOutpost[me][SquareTo64[from]];
}
else
{
if( board->square[from + 17] == BP )
mob += KnightOutpost[me][SquareTo64[from]];
if( board->square[from + 15] == BP )
mob += KnightOutpost[me][SquareTo64[from]];
}
op[me] += mob;
}
|
Hope it helps somewhat...
Matthew:out |
Do you not check to see if the Knight can be dislodged by an enemy pawn? I thought that was the important bit....
jm |
|