Outpost evaluation

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
lucasart
Posts: 3035
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Outpost evaluation

Post by lucasart » Sun Mar 18, 2012 10:42 am

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: 4517
Joined: Thu Aug 18, 2011 10:04 am

Re: Outpost evaluation

Post by Rebel » Sun Mar 18, 2012 12:15 pm

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: 3035
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: Outpost evaluation

Post by lucasart » Sun Mar 18, 2012 1:47 pm

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: 1327
Joined: Sun Jul 17, 2011 9:14 am

Re: Outpost evaluation

Post by ZirconiumX » Sun Mar 18, 2012 4:27 pm

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.

User avatar
JVMerlino
Posts: 999
Joined: Wed Mar 08, 2006 9:15 pm
Location: San Francisco, California

Re: Outpost evaluation

Post by JVMerlino » 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: 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: 1327
Joined: Sun Jul 17, 2011 9:14 am

Re: Outpost evaluation

Post by ZirconiumX » Sun Mar 18, 2012 5:54 pm

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: 117
Joined: Sat Feb 25, 2012 9:42 pm
Location: Stockholm
Contact:

Re: Outpost evaluation

Post by Pio » Sun Mar 18, 2012 7:38 pm

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: 1986
Joined: Mon Mar 13, 2006 1:31 am
Location: North Carolina, USA
Contact:

Re: Outpost evaluation

Post by CRoberson » Sun Mar 18, 2012 8:07 pm

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: 638
Joined: Mon Dec 15, 2008 10:45 am

Re: Outpost evaluation

Post by Desperado » Sun Mar 18, 2012 8:35 pm

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: 117
Joined: Sat Feb 25, 2012 9:42 pm
Location: Stockholm
Contact:

Re: Outpost evaluation

Post by Pio » Sun Mar 18, 2012 9:30 pm

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

Post Reply