Eval tuning - any open source engines with GA or PBIL?

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.
Post Reply
Hrvoje Horvatic
Posts: 14
Joined: Mon Nov 10, 2014 12:53 pm

Eval tuning - any open source engines with GA or PBIL?

Post by Hrvoje Horvatic » Thu Dec 04, 2014 11:30 am

It seems eval tuning has become a hot topic lately, and I would like to dip my toe into the sea too... but I'm too lazy to start from scratch...

Are there any open-source engines that implement GA or PBIL, that could be used as an inspiration? It seems to me that there are several engines that DO use tuning methods, but DON'T include the source with the engine...

tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 3:57 pm
Location: Germany
Contact:

Re: Eval tuning - any open source engines with GA or PBIL?

Post by tpetzke » Sat Dec 06, 2014 10:15 am

iCE uses PBIL for tuning. I don't publish its source but the source would be of no use to you anyway, as the tuning algorithm runs outside of the engine.

All the engine does is publishing an interface that allows to set the evaluation parameters from outside without the need of a recompilation.

I wrote several posts about the process. You can start with this one. Maybe they give you some inspiration.

http://macechess.blogspot.de/2013/03/po ... rning.html
Thomas...

=======
http://macechess.blogspot.com - iCE Chess Engine

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

Re: Eval tuning - any open source engines with GA or PBIL?

Post by jdart » Sat Dec 06, 2014 6:25 pm

GA tends to require large numbers of evaluations for convergence.

There is tuning software for Stockfish that uses SPSA (https://github.com/zamar/spsa).

I have been using some global optimization software called NOMAD (https://www.gerad.ca/nomad/Project/Home.html).

--Jon

Hrvoje Horvatic
Posts: 14
Joined: Mon Nov 10, 2014 12:53 pm

Re: Eval tuning - any open source engines with GA or PBIL?

Post by Hrvoje Horvatic » Wed Dec 10, 2014 9:52 am

Hello Jon... first, thank you for your reply.
GA tends to require large numbers of evaluations for convergence.
You are absolutely right on this, genetics is damn slow... But there is a trade-off, GA offer some things that other approaches don't...
There is tuning software for Stockfish that uses SPSA (https://github.com/zamar/spsa).

I have been using some global optimization software called NOMAD (https://www.gerad.ca/nomad/Project/Home.html).
I've checked both... here's my take on it: there are hundreds of algorithms that could be used for the "local" optimization problem, and they all do the job... but it's not that simple... first of all, optimizing eval fn and search parameters is NOT well defined and researched problem... on the contrary... it will take a lot of experimenting and research on the behalf of engine developer (ie. me) to get good results... and I don't like using "blackbox" approaches that I don't FULLY understand and can't "tweak" to my needs... what I want is to "tweak", not just "plug-and-play"... I checked that NOMAD stuff you suggested, but didn't "get it" at first, and I'm at home with GA, soooooo...

How did it all end up for you with Arasan? If I recall correctly, you had some problems with getting good results for eval function?

Hrvoje Horvatic
Posts: 14
Joined: Mon Nov 10, 2014 12:53 pm

Re: Eval tuning - any open source engines with GA or PBIL?

Post by Hrvoje Horvatic » Wed Dec 10, 2014 10:06 am

Hello Thomas...
iCE uses PBIL for tuning. I don't publish its source but the source would be of no use to you anyway, as the tuning algorithm runs outside of the engine.
First of all, let me congratulate you on the progress of your iCE chess engine... It's nice to see new engines like Texel and iCE, that are built from scratch, compete head to head with Ippolit clones...

This stuff you did, as explained on your web site, is exactly the stuff I shoot for... I particulary want to use GA/PBIL for tuning search parameters... What you did is "classical" LMR (do I have any moral rights to call relatively new techniques as LMR "classical"? I don't know), But besides that, I would like to try some more radical changes... We could, for example, classify moves in different categories and do differenrt reductions based on category and not on History table value... Something similar to Realization Probability search... Cut more king moves in the opening, cut less attacking moves, etc. Tune category values by PBIL...

Is there any chance that you publish source of your tuning algorithm?

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

Re: Eval tuning - any open source engines with GA or PBIL?

Post by jdart » Wed Dec 10, 2014 3:14 pm

Hrvoje Horvatic wrote: and I don't like using "blackbox" approaches that I don't FULLY understand and can't "tweak" to my needs... what I want is to "tweak", not just "plug-and-play"... I checked that NOMAD stuff you suggested, but didn't "get it" at first, and I'm at home with GA, soooooo...
Well, NOMAD is open source and has some tweakable parameters. But as for understanding it .. it is based on some fairly complex math. Basically it samples the search space, builds an internal multi-dimensional model, and uses that model to determine what points to sample next. This is a well-established technique based on recent research, but there are a lot of variant approaches.

The reason it is called a "black box" optimizer is not that the internals are opaque, but because unlike some algorithms, it does not require the function being optimized to have a mathematical form that allows computation of its derivative. So the function can be the outcome of a simulation process, for example. This kind of algorithm generally assumes the objective function is expensive to compute, so tries to minimize the number of evaluations required.
How did it all end up for you with Arasan? If I recall correctly, you had some problems with getting good results for eval function?
No, the eval function approach did not work for me, still doesn't. NOMAD has enabled me to make some progress. However. the problem I am having recently is that I have been trying to tune some variables that have small effects, and this is inherently difficult. Optimization software does not really work for that: you need to have knobs to turn that do something significant, otherwise it will just bounce around randomly.

--Jon

Post Reply