Most important eval elements

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
silentshark
Posts: 236
Joined: Sat Mar 27, 2010 6:15 pm
Contact:

Most important eval elements

Post by silentshark » Fri Sep 17, 2010 9:08 pm

Hi all,

I've been looking again at my eval. It got me thinking, what are the most important things to include in an evaluation function, and what are they worth, ELO wise? I appreciate this isn't an exact science.

For instance, how many ELO points will you engine gain if it understands about isolated pawns? How many will it gain if it understands the concept of a bishop pair? Rooks on the 7th rank? Mobility?

I'm sure there are many other variables.. search being one.. but it'd be fascinating to take a certain engine, strip out most of it's eval, work out it's ELO, then add in the various "standard" eval elements seeing the effect on ELO..

User avatar
michiguel
Posts: 6388
Joined: Thu Mar 09, 2006 7:30 pm
Location: Chicago, Illinois, USA
Contact:

Re: Most important eval elements

Post by michiguel » Fri Sep 17, 2010 9:36 pm

silentshark wrote:Hi all,

I've been looking again at my eval. It got me thinking, what are the most important things to include in an evaluation function, and what are they worth, ELO wise? I appreciate this isn't an exact science.

For instance, how many ELO points will you engine gain if it understands about isolated pawns? How many will it gain if it understands the concept of a bishop pair? Rooks on the 7th rank? Mobility?

I'm sure there are many other variables.. search being one.. but it'd be fascinating to take a certain engine, strip out most of it's eval, work out it's ELO, then add in the various "standard" eval elements seeing the effect on ELO..
Mobility is important, but I cannot say how much. Together with a correct passed pawn evaluation is one of the most important parameters, besides material. Proper king activity in the endgame was very important for me too (~40 elo points).

I think it is difficult to strip a parameter and measure ELO. Everything else needs to be retuned.

Miguel

Dann Corbit
Posts: 10112
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Most important eval elements

Post by Dann Corbit » Fri Sep 17, 2010 9:42 pm

If you go here:
http://sites.google.com/site/strategict ... st-results

And look for the file results.xls, you will see scores for many engines based upon ten different strategic evaluation themes:
1. Undermining
2. Open Files and Diagonals
3. Knight Outposts
4. Square Vacancy
5. Bishop vs Knight
6. Re-Capturing
7. Offer of Simplification
8.Advancement of f/g/h pawns
9. Advancement of a/b/c Pawns
10. Simplification

You can also see that there is some kind of correlation between the scores and the Elo values for the engines on various lists.

In general, tactical tests do not correspond to Elo scores very well (except that to be a strong engine you must at least do reasonably well on simple tactical sets like WAC).

In general, one of the most important things for a good evaluation is mobility. Look at how strong Olithink is, and it's eval is just about pure mobility and nothing else.

User avatar
hgm
Posts: 23718
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Most important eval elements

Post by hgm » Fri Sep 17, 2010 10:08 pm

The issueis complicated by the fact that the engine should not only understand the concept, but also assign the proper value to it. With wrong tuning a valuable term might actually backfire, and cost Elo rather than add it.

The Bishop pair is an important concept, but you can get by without it by setting Bishops more valuable than Knights. This prevents your engine will waste its own Bishoppair, and makesit attempt to destroy the opponent's pair. OTOH, once you have destroyed the opponent's pair,it might give away the advantage by trading Bishops, and it gets an unreasonable fear for trading last Knight against last Bishop.

User avatar
phhnguyen
Posts: 382
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Most important eval elements

Post by phhnguyen » Sat Sep 18, 2010 2:55 am

silentshark wrote:Hi all,

I've been looking again at my eval. It got me thinking, what are the most important things to include in an evaluation function, and what are they worth, ELO wise? I appreciate this isn't an exact science.
IMO, the most important thing is very clear and simple which programmers usually forget: materials. It can cost 99% of a program's ELO if wrongly set.

Dann Corbit
Posts: 10112
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Most important eval elements

Post by Dann Corbit » Sat Sep 18, 2010 6:25 am

phhnguyen wrote:
silentshark wrote:Hi all,

I've been looking again at my eval. It got me thinking, what are the most important things to include in an evaluation function, and what are they worth, ELO wise? I appreciate this isn't an exact science.
IMO, the most important thing is very clear and simple which programmers usually forget: materials. It can cost 99% of a program's ELO if wrongly set.
And yet it is sometimes surprising how well a program can play with the evaluation constants badly set away from their correct values of:

opening:
Pawn = 100
Knight = 413
Bishop = 422
Rook = 641
Queen =1273

endgame:
Pawn = 130
Knight = 427
Bishop = 433
Rook = 645
Queen =1292

Dann Corbit
Posts: 10112
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Most important eval elements

Post by Dann Corbit » Sat Sep 18, 2010 6:38 am

Dann Corbit wrote:
phhnguyen wrote:
silentshark wrote:Hi all,

I've been looking again at my eval. It got me thinking, what are the most important things to include in an evaluation function, and what are they worth, ELO wise? I appreciate this isn't an exact science.
IMO, the most important thing is very clear and simple which programmers usually forget: materials. It can cost 99% of a program's ELO if wrongly set.
And yet it is sometimes surprising how well a program can play with the evaluation constants badly set away from their correct values of:

opening:
Pawn = 100
Knight = 413
Bishop = 422
Rook = 641
Queen =1273

endgame:
Pawn = 130
Knight = 427
Bishop = 433
Rook = 645
Queen =1292
Those were approximations using the Stockfish model. These are from Gull:

opening:
Pawn = 100
Knight= 361.111
Bishop= 361.111
Rook = 555.556
Queen =1083.33

endgame:
Pawn = 111.111
Knight = 361.111
Bishop = 361.111
Rook = 555.556
Queen =1083.33

Dann Corbit
Posts: 10112
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Most important eval elements

Post by Dann Corbit » Sat Sep 18, 2010 6:44 am

Dann Corbit wrote:
Dann Corbit wrote:
phhnguyen wrote:
silentshark wrote:Hi all,

I've been looking again at my eval. It got me thinking, what are the most important things to include in an evaluation function, and what are they worth, ELO wise? I appreciate this isn't an exact science.
IMO, the most important thing is very clear and simple which programmers usually forget: materials. It can cost 99% of a program's ELO if wrongly set.
And yet it is sometimes surprising how well a program can play with the evaluation constants badly set away from their correct values of:

opening:
Pawn = 100
Knight = 413
Bishop = 422
Rook = 641
Queen =1273

endgame:
Pawn = 130
Knight = 427
Bishop = 433
Rook = 645
Queen =1292
Those were approximations using the Stockfish model. These are from Gull:

opening:
Pawn = 100
Knight= 361.111
Bishop= 361.111
Rook = 555.556
Queen =1083.33

endgame:
Pawn = 111.111
Knight = 361.111
Bishop = 361.111
Rook = 555.556
Queen =1083.33
Crafty uses these:
# define PAWN_VALUE 100
# define KNIGHT_VALUE 325
# define BISHOP_VALUE 325
# define ROOK_VALUE 500
# define QUEEN_VALUE 1050

and seems to do pretty well despite the drastic undervalue for knight and bishop of nearly a pawn weight.

User avatar
silentshark
Posts: 236
Joined: Sat Mar 27, 2010 6:15 pm
Contact:

Re: Most important eval elements

Post by silentshark » Sat Sep 18, 2010 6:56 am

Dann Corbit wrote:
phhnguyen wrote:
silentshark wrote:Hi all,

I've been looking again at my eval. It got me thinking, what are the most important things to include in an evaluation function, and what are they worth, ELO wise? I appreciate this isn't an exact science.
IMO, the most important thing is very clear and simple which programmers usually forget: materials. It can cost 99% of a program's ELO if wrongly set.
And yet it is sometimes surprising how well a program can play with the evaluation constants badly set away from their correct values of:

opening:
Pawn = 100
Knight = 413
Bishop = 422
Rook = 641
Queen =1273

endgame:
Pawn = 130
Knight = 427
Bishop = 433
Rook = 645
Queen =1292
Interesting.. why do you feel these are correct.

I've been using

pawn=100
knight=bishop=400
rook=600
queen=1200

for a long time now, but maybe these values are smarter.

bhlangonijr
Posts: 482
Joined: Thu Oct 16, 2008 2:23 am
Location: Milky Way
Contact:

Re: Most important eval elements

Post by bhlangonijr » Sat Sep 18, 2010 8:37 am

Dann Corbit wrote:
Dann Corbit wrote:
Dann Corbit wrote:
phhnguyen wrote:
silentshark wrote:Hi all,

I've been looking again at my eval. It got me thinking, what are the most important things to include in an evaluation function, and what are they worth, ELO wise? I appreciate this isn't an exact science.
IMO, the most important thing is very clear and simple which programmers usually forget: materials. It can cost 99% of a program's ELO if wrongly set.
And yet it is sometimes surprising how well a program can play with the evaluation constants badly set away from their correct values of:

opening:
Pawn = 100
Knight = 413
Bishop = 422
Rook = 641
Queen =1273

endgame:
Pawn = 130
Knight = 427
Bishop = 433
Rook = 645
Queen =1292
Those were approximations using the Stockfish model. These are from Gull:

opening:
Pawn = 100
Knight= 361.111
Bishop= 361.111
Rook = 555.556
Queen =1083.33

endgame:
Pawn = 111.111
Knight = 361.111
Bishop = 361.111
Rook = 555.556
Queen =1083.33
Crafty uses these:
# define PAWN_VALUE 100
# define KNIGHT_VALUE 325
# define BISHOP_VALUE 325
# define ROOK_VALUE 500
# define QUEEN_VALUE 1050

and seems to do pretty well despite the drastic undervalue for knight and bishop of nearly a pawn weight.
I have been using values close to these ones. I think you should have a good balance between static values and dynamic terms rather than approximating the static values to a general case.

I would say material + PST + mobility are the most important evaluation terms. Althought king safety helped a lot my program's playing strength.

Post Reply