Most Important Evaluation Terms

Discussion of chess software programming and technical issues.

Moderator: Ras

Robert Pope
Posts: 563
Joined: Sat Mar 25, 2006 8:27 pm
Location: USA
Full name: Robert Pope

Re: Most Important Evaluation Terms

Post by Robert Pope »

AngularMomentum wrote: Wed Jul 19, 2023 8:43 am
Robert Pope wrote: Wed Jul 19, 2023 4:12 am I store mob[LIGHT] and mob[DARK] from the two most recent ply where I generated moves. It may be off by a piece capture or two, but it's in the right ballpark, and there's no computational cost.
Is this a response to my comment? If so, put a quote so it's more clear.
Yours is the first post to this thread in over a month and mine immediately follows it less than a day later. I think it's pretty clear.
Wouldn't every leaf node stemming from the same depth 1 node have the exact same mobility value for the enemy (The mobility for the side to move is already calculated because the quiscence search always makes sure that there no captures availivable before evaluating so we can get each piece's attack maps).
I'm not sure what your point is here.
Whiskers
Posts: 243
Joined: Tue Jan 31, 2023 4:34 pm
Full name: Adam Kulju

Re: Most Important Evaluation Terms

Post by Whiskers »

For HCE:

my #1 most important term other than PSTs/material would be mobility. It can be worth 100+ elo if done correctly. The best impl I know of is to have a lookup table for safe mobility squares, for both the middle game and the end game, (i.e. a rook in the middlegame has 15 possible bonuses, starting from the bonus for having 0 squares to go to, up to the bonus for having 14 squares to go to). It's a decent amount of parameters but nothing that texel tuning can't handle.
I also added the original idea of forward mobility into my engine; it works just like normal mobility, but you only count squares that are forward on the board from the side's point of view. Adding that (with the same structure of bonuses) alongside normal mobility brought me 20 Elo.

Next most important to me is pawn structure. Especially passed pawns. Those little buggers can be extremely strong when advanced or if it's in the endgame, and you can either use a PST for them or just give a bonus depending on what rank the passed pawn is.
Doubled/Isolated/Backwards/Connected Passed/Protected Passed pawns/all that stuff aren't that important individually (maybe like 5-10 elo each), but there's a lot of them, meaning quite a bit of total elo to be squeezed out of that.

After that I would probably go with king safety. It's kinda hard to get pawn shelter and pawn storm and defender strength and all that jazz to work, but the basic king attack table (in the "Attack Units" section of this article https://www.chessprogramming.org/King_Safety) alone is worth a lot.

My experience with space evaluation has been that it doesn't work, and I would avoid it for now.
Whiskers
Posts: 243
Joined: Tue Jan 31, 2023 4:34 pm
Full name: Adam Kulju

Re: Most Important Evaluation Terms

Post by Whiskers »

AngularMomentum wrote: Tue Jul 18, 2023 4:18 am
elpapa wrote: Sun Apr 30, 2023 9:14 pm Mobility is important as well.
On a slightly different note, do you know how to implement mobility efficiently? My NPS goes from 17mil to 10mil average because of calculating all the sliders in every leaf node.
Unless you want to go the bitboards + incrementally updated attack tables, probably not.
I managed to hit 3k HCE, but even with me trying everything I knew to optimize my eval given a mailbox setup, eval still took up 50% of the program run time.
gaard
Posts: 463
Joined: Mon Jun 07, 2010 3:13 am
Location: Holland, MI
Full name: Martin W

Re: Most Important Evaluation Terms

Post by gaard »

Aside from material, mobility, and psqt, the greatest benefactor to a well tuned hce is (IMO) pawn structure, not king safety. ks is so hard to get right that I would put its importance after ps in terms of finding quick practical gains. Passed pawn eval is paramount, second is candidate passed pawn eval. In this order: material, mobility, psqt, passed eval, candidate eval. Evaluating those terms correctly will get you half the way