Page 1 of 5

Most important eval elements

Posted: Fri Sep 17, 2010 11:08 pm
by silentshark
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..

Re: Most important eval elements

Posted: Fri Sep 17, 2010 11:36 pm
by michiguel
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

Re: Most important eval elements

Posted: Fri Sep 17, 2010 11:42 pm
by Dann Corbit
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.

Re: Most important eval elements

Posted: Sat Sep 18, 2010 12:08 am
by hgm
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.

Re: Most important eval elements

Posted: Sat Sep 18, 2010 4:55 am
by phhnguyen
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.

Re: Most important eval elements

Posted: Sat Sep 18, 2010 8:25 am
by Dann Corbit
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

Re: Most important eval elements

Posted: Sat Sep 18, 2010 8:38 am
by Dann Corbit
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

Re: Most important eval elements

Posted: Sat Sep 18, 2010 8:44 am
by Dann Corbit
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.

Re: Most important eval elements

Posted: Sat Sep 18, 2010 8:56 am
by silentshark
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.

Re: Most important eval elements

Posted: Sat Sep 18, 2010 10:37 am
by bhlangonijr
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.