Manually tuned evaluation

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
maksimKorzh
Posts: 630
Joined: Sat Sep 08, 2018 3:37 pm
Location: Ukraine
Full name: Maksim Korzh
Contact:

Manually tuned evaluation

Post by maksimKorzh » Sun Dec 27, 2020 12:36 pm

Hi Guys

Recently I've discovered this article on talkchess:
https://www.chessprogramming.org/Simpli ... n_Function
(strange that it didn't happen 5 years ago)

And I loved it at first sight because of the explanations on how for instance avoid
bishop captures knight on c3/f3 and at the same time force bishop captures knight on c6/f6.
I love the harmony of piece weights and PST values in Tomash's implementation.

However it performs purely - my engine with average depth 8 in blitz horribly looses to TSCP (average depth 6)
almost all the game because of malformed pawn structure and especially passed pawns.
"Simplified evaluation" above assumes NOT to use additional eval params which is totally clear
because it would ruin the harmony of interacting values (I even tried that - total disaster)

I tried simple pawn evaluation with my bitboard engine earlier (this time I have 0x88 one)
and the biggest problem was tuning... Blindly guessing bonuses and penalties for pawns
ended up that my material + PST only version was about 100 Elo points stronger compared
to material + PST + isolated + doubled + passed pawns one. Some extra disaster occured probably
due to the fact that I used PSTs from PeSTO chess engine and bearing in mind they were already texel tuned
to serve as the only eval adding new features probably did the same effect as adding new eval features to "simplified eval"

Ok, enough lyrics, so first let me say what I want to AVOID at any cost:
1. Other but material + PST eval params (because of need to tune them all together)
2. Automated tuning (too complicated, too slow)

Now what I want to achieve is:
1. material + PST eval only
2. incorporate passed pawn eval into PST values

Recalling my previous experience with PeSTO tables I clearly remember that using
tapered eval is very beneficial, but is there a way to tune the following params manually:
1. Middle game material margin (say one minor piece exchanged)
2. Endgame material margin (say no queens or queen + 1 minor piece from each side)
3. pure opening piece values
4. pure endgame piece values
5. pure opening PST values
6. pure endgame PST values

By saying manually I mean using a method similar to the one explained in "simplified evaluation" article.
Maybe there are other not-automated tuning methods are available?
Wukong Xiangqi (Chinese chess engine + apps to embed into 3rd party websites):
https://github.com/maksimKorzh/wukong-xiangqi

Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ

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

Re: Manually tuned evaluation

Post by Dann Corbit » Sun Dec 27, 2020 1:47 pm

For a really simple yet effective evaluation look at olithink.
Olithink emphasizes mobility.
I guess that for the number of lines of code, with the formula:

Elo/L=N

Olithink would have the largest N. I did not measure it, but it seems logical to me since it is quite strong an incredibly small.
OK, a program with zero lines has the largest N, but I am excluding degenerate cases.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

jdart
Posts: 4102
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: Manually tuned evaluation

Post by jdart » Sun Dec 27, 2020 2:40 pm

There is lots of stuff on evaluation tuning in this forum, see for example this thread:
http://talkchess.com/forum3/viewtopic.php?f=7&t=75234. Most people are automating it now. You can try changing values manually and see how that performs but you are not likely to find optimal values that way.

User avatar
maksimKorzh
Posts: 630
Joined: Sat Sep 08, 2018 3:37 pm
Location: Ukraine
Full name: Maksim Korzh
Contact:

Re: Manually tuned evaluation

Post by maksimKorzh » Sun Dec 27, 2020 3:31 pm

The ironic fact is that you're pointing to one of the threads I've started before)
Wukong Xiangqi (Chinese chess engine + apps to embed into 3rd party websites):
https://github.com/maksimKorzh/wukong-xiangqi

Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ

User avatar
maksimKorzh
Posts: 630
Joined: Sat Sep 08, 2018 3:37 pm
Location: Ukraine
Full name: Maksim Korzh
Contact:

Re: Manually tuned evaluation

Post by maksimKorzh » Sun Dec 27, 2020 3:33 pm

Dann Corbit wrote:
Sun Dec 27, 2020 1:47 pm
For a really simple yet effective evaluation look at olithink.
Olithink emphasizes mobility.
I guess that for the number of lines of code, with the formula:

Elo/L=N

Olithink would have the largest N. I did not measure it, but it seems logical to me since it is quite strong an incredibly small.
OK, a program with zero lines has the largest N, but I am excluding degenerate cases.
Thanks Dann, totally forgot about OliThink!
Wukong Xiangqi (Chinese chess engine + apps to embed into 3rd party websites):
https://github.com/maksimKorzh/wukong-xiangqi

Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ

Ferdy
Posts: 4527
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Manually tuned evaluation

Post by Ferdy » Sun Dec 27, 2020 3:40 pm

maksimKorzh wrote:
Sun Dec 27, 2020 12:36 pm
Hi Guys

Recently I've discovered this article on talkchess:
https://www.chessprogramming.org/Simpli ... n_Function
(strange that it didn't happen 5 years ago)

And I loved it at first sight because of the explanations on how for instance avoid
bishop captures knight on c3/f3 and at the same time force bishop captures knight on c6/f6.
I love the harmony of piece weights and PST values in Tomash's implementation.

However it performs purely - my engine with average depth 8 in blitz horribly looses to TSCP (average depth 6)
almost all the game because of malformed pawn structure and especially passed pawns.
"Simplified evaluation" above assumes NOT to use additional eval params which is totally clear
because it would ruin the harmony of interacting values (I even tried that - total disaster)

I tried simple pawn evaluation with my bitboard engine earlier (this time I have 0x88 one)
and the biggest problem was tuning... Blindly guessing bonuses and penalties for pawns
ended up that my material + PST only version was about 100 Elo points stronger compared
to material + PST + isolated + doubled + passed pawns one. Some extra disaster occured probably
due to the fact that I used PSTs from PeSTO chess engine and bearing in mind they were already texel tuned
to serve as the only eval adding new features probably did the same effect as adding new eval features to "simplified eval"

Ok, enough lyrics, so first let me say what I want to AVOID at any cost:
1. Other but material + PST eval params (because of need to tune them all together)
2. Automated tuning (too complicated, too slow)

Now what I want to achieve is:
1. material + PST eval only
2. incorporate passed pawn eval into PST values

Recalling my previous experience with PeSTO tables I clearly remember that using
tapered eval is very beneficial, but is there a way to tune the following params manually:
1. Middle game material margin (say one minor piece exchanged)
2. Endgame material margin (say no queens or queen + 1 minor piece from each side)
3. pure opening piece values
4. pure endgame piece values
5. pure opening PST values
6. pure endgame PST values

By saying manually I mean using a method similar to the one explained in "simplified evaluation" article.
Maybe there are other not-automated tuning methods are available?
You aware of Larry's article?

Ferdy
Posts: 4527
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Manually tuned evaluation

Post by Ferdy » Sun Dec 27, 2020 4:13 pm

maksimKorzh wrote:
Sun Dec 27, 2020 12:36 pm
Now what I want to achieve is:
1. material + PST eval only
2. incorporate passed pawn eval into PST values

Recalling my previous experience with PeSTO tables I clearly remember that using
tapered eval is very beneficial, but is there a way to tune the following params manually:
1. Middle game material margin (say one minor piece exchanged)
2. Endgame material margin (say no queens or queen + 1 minor piece from each side)
3. pure opening piece values
4. pure endgame piece values
5. pure opening PST values
6. pure endgame PST values

By saying manually I mean using a method similar to the one explained in "simplified evaluation" article.
Maybe there are other not-automated tuning methods are available?
Two years ago I wrote an article on piece value calculation based on mobility. It is not limited to FIDE piece types only, it can also handle musketeer piece types.

Ferdy
Posts: 4527
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Manually tuned evaluation

Post by Ferdy » Sun Dec 27, 2020 4:27 pm

There is an article regarding rebel program by Ed. I am influenced by this writing as I develop Deuterium.

User avatar
maksimKorzh
Posts: 630
Joined: Sat Sep 08, 2018 3:37 pm
Location: Ukraine
Full name: Maksim Korzh
Contact:

Re: Manually tuned evaluation

Post by maksimKorzh » Sun Dec 27, 2020 4:47 pm

Ferdy wrote:
Sun Dec 27, 2020 4:27 pm
There is an article regarding rebel program by Ed. I am influenced by this writing as I develop Deuterium.
Thank you so much for such an amazing resources!
It's exactly the format of what I was looking for!
Wukong Xiangqi (Chinese chess engine + apps to embed into 3rd party websites):
https://github.com/maksimKorzh/wukong-xiangqi

Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ

User avatar
maksimKorzh
Posts: 630
Joined: Sat Sep 08, 2018 3:37 pm
Location: Ukraine
Full name: Maksim Korzh
Contact:

Re: Manually tuned evaluation

Post by maksimKorzh » Sun Dec 27, 2020 4:58 pm

Ferdy wrote:
Sun Dec 27, 2020 4:27 pm
There is an article regarding rebel program by Ed. I am influenced by this writing as I develop Deuterium.
Also I'm a bit confused with the fact that author of 3000+ engine is taking his time to play around with my 1600 engine)
Just curious why are you interested?
Wukong Xiangqi (Chinese chess engine + apps to embed into 3rd party websites):
https://github.com/maksimKorzh/wukong-xiangqi

Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ

Post Reply