Outpost evaluation

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Outpost evaluation

Post by lucasart »

I've come across something rather disconcerting in developping DoubleCheck's evaluation. Knight/Bishop outposts give me an elo regression, rather than an improvement. And I've tried so many different conditions (outposted knight/bishop can'e be kicked by a pawn, isn't attacked by a pawn, can't be exchanged by a knight immediately, or can't be exchanged by a minor at all). All these variations gave me an elo regression, even at fixed node testing (which advantages the outpost feature, since it doesn't account for the loss of time in outpost calculations).

So I thought, maybe something is wrong in DoubleCheck.. But then I realized that this feature is partially redundant with PST, King Safety, and Mobility. And perhaps even pawn eval if one has some penalty for holes in the pawn structure.

So I thought I should try removing it in Stockfish to see what happens. I'm currently running a test with/without (10,000 games in 3"+0.1" using SF's book up to depth 8). Will post the result when it comes out.

But I'm really surprised by this. Anyone noticed the same thing in their engine ?
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Outpost evaluation

Post by Rebel »

I have a parameter for Knight outposts (I don't do Bishop outpost) and my notes state:

[Strong Squares = 125] 0=46.0% | 100=50.0% | 200=48.2% | 150=48.7%

Meaning, when I remove it (value 0) it gives a drop of 4% (28 elo).

Perhaps your bonus is too high?
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Outpost evaluation

Post by lucasart »

Rebel wrote:I have a parameter for Knight outposts (I don't do Bishop outpost) and my notes state:

[Strong Squares = 125] 0=46.0% | 100=50.0% | 200=48.2% | 150=48.7%

Meaning, when I remove it (value 0) it gives a drop of 4% (28 elo).

Perhaps your bonus is too high?
Seems you're right:
1/ bishop outpost are probably not a great idea. knight only seems to be better.
2/ my values were too high. As a human player, I tend to think that an outposted enemy knight into my territory, that I can't remove by pawns or exchange is a real menace, sometimes worth a pawn perhaps (maybe even the exchange in certain situations). But that's essentially my "risk aversion": I am worried to make calculation mistakes with this constant menace, so I prefer to pay the price of a pawn to get rid of it. A computer on the other hand makes much less calculation mistakes, so it should have a much smaller risk aversion, hence the smaller value :D
ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: Outpost evaluation

Post by ZirconiumX »

I was just trawling through the sources of cyclone when I found something that might be of use:

Code: Select all

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
	};

const int BishopOutpost[2][64] =
	{ 
// these are probably white
     0,	 0,  0,  0,  0,  0,  0,  0,
     0,	 0,  0,  0,  0,  0,  0,  0,
     0,	 0,  5,  5,  5,  5,  2,  0,
     0,	 5, 10, 10, 10, 10,  5,  0,
     0,	10, 20, 20, 20, 20, 10,  0,
     0,	 5,  8,  8,  8,  8,  5,  0,
     0,	 0,  0,  0,  0,  0,  0,  0,
     0,	 0,  0,  0,  0,  0,  0,  0,
// these are probably black
     0,	 0,  0,  0,  0,  0,  0,  0,
     0,	 0,  0,  0,  0,  0,  0,  0,
     0,	 5,  8,  8,  8,  8,  5,  0,
     0,	10, 20, 20, 20, 20, 10,  0,
     0,	 5, 10, 10, 10, 10,  5,  0,
     0,	 2,  5,  5,  5,  5,  2,  0,
     0,	 0,  0,  0,  0,  0,  0,  0,
     0,	 0,  0,  0,  0,  0,  0,  0
	};
and

Code: Select all

// 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]];
                        }

// bishop


					if (UseBishopOutpost)
						{
						mob = 0;
						if( me == White )
							{
							if( board->square[from - 17] == WP )
								mob += BishopOutpost[me][SquareTo64[from]];

							if( board->square[from - 15] == WP )
								mob += BishopOutpost[me][SquareTo64[from]];
							}
						else
							{
							if( board->square[from + 17] == BP )
								mob += BishopOutpost[me][SquareTo64[from]];

							if( board->square[from + 15] == BP )
								mob += BishopOutpost[me][SquareTo64[from]];
							}

						op[me] += mob;
						}
Hope it helps somewhat...

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Outpost evaluation

Post by JVMerlino »

ZirconiumX wrote:I was just trawling through the sources of cyclone when I found something that might be of use:

Code: Select all

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: Select all

// 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
ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: Outpost evaluation

Post by ZirconiumX »

Nope - I don't.

The code is Norman Schmidt's - so the correct term is does the code check for a pawn.

Cyclone is mailbox - so checking for that is rather expensive.

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.
Pio
Posts: 334
Joined: Sat Feb 25, 2012 10:42 pm
Location: Stockholm

Re: Outpost evaluation

Post by Pio »

Hi Lucas!

I do not have a working chess engine right now so I have not been able to implement my ideas.

I think an outpost should only be counted as an outpost if it cannot be threatened by a pawn.

What I think is important is that you should give the knight outpost higher value the more pieces the oponent has left that are more valuable than your knight.

If the opponent has no pieces more valuable than your oupost piece, you should not reward outposts at all.

If the opponent do not have any knights left and do not have a bishop of the same color as your knight, your outpost will be really hard to get rid of and should be given a bonus.

If your outpost blocks the advancement of the opponent's pawn that should also be given a bonus.

I think Bishop outposts should only be rewarded if the opponent has no knights left.

Good luck! :)
CRoberson
Posts: 2055
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: Outpost evaluation

Post by CRoberson »

ZirconiumX wrote:Nope - I don't.

The code is Norman Schmidt's - so the correct term is does the code check for a pawn.

Cyclone is mailbox - so checking for that is rather expensive.

Matthew:out
No. It is not expensive to check that due to being mailbox. The inverse of that test is to see if the knight is supported by a pawn. The code you published does that and shows how easy it is.
User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: Outpost evaluation

Post by Desperado »

Pio wrote:
...I think an outpost should only be counted as an outpost if it cannot be threatened by a pawn. ...
One intention to have an outpost although it might be displaced again
by a pawn is to weaken the pawnstructure, by provokating the pawn push.
That is one of the main ideas of an outpost i think.

regards

Michael
Pio
Posts: 334
Joined: Sat Feb 25, 2012 10:42 pm
Location: Stockholm

Re: Outpost evaluation

Post by Pio »

Hi Michael!

I think you have a point :)
I have to fix my engine and test my ideas in code before I say too much.

/Pio