Making an opening book (TCEC and more)
Posted: Wed Jan 12, 2011 5:31 am
The first task when making an opening book is to determine its purpose.
For instance, is the goal to produce "interesting" chess, or "relevant" chess, or to measure Elo somehow, or to beat your friends' books? I guess my goal is some combination of the top three.
Martin Thoresen asked me what I would do regarding openings in TCEC. This is partially in answer to that, though some of the concepts are a bit more general. For instance, if you asked me to create a suite of positions for engine testers to use, much of the answers would be the same [in particular, if an author "tunes" toward my suggestions, I'd likely think this was simply a reasonable way to test/develop an engine].
Here is my methodology. I stress the numbers don't matter much, though I realise that whatever numbers I throw out have a decent chance of those actually being used (due to laziness).
* Start with a PGN of "top-level" human games, perhaps meaning both players are 2600+ (or maybe 2500+, or both are 2500+ and at least one is 2600+). Only consider "serious" games, so get rid of blitz/blindfold/Armageddon.
* Find all positions that meet the following constraints (I suspect some database program could do this, though it is not trivial):
** Popularity: Position has occurred (say) 50-100 times
** Topical: Position has occurred at least 5-10 times in the last 5 years (so the line is not "busted", as it were)
** Playability: There is no "one move" that is greatly preferred, perhaps some constraint like no move is played more than 2/3 of the time, and/or the ratio from the most common to the second most is no worse than 3:1.
** Volatility: Draw percentage is between 45-65% (or maybe 40-60%, or maybe 50-70% -- depends on the Elo range you chose)
** Equality: White scores between 50-60% (maybe after adjusting for Elo)
* I have no idea how many positions this would be, but I suspect it will be at least a few hundred. One "solution" at this point is simply to randomly choose the desired number of positions.
* However, I would rather add on an additional layer (which is likely to be complicated): there should be some weighting so that the "overall popularity" of moves is somewhat like from the human games. For instance, the e4 versus d4 ratio should be reasonably close to the expected. It might not be that easy to do with various openings (for instance, the Petrov is too drawish (see Volatility), and others perhaps not enough so), but I think at least some attempt can be made here. After this additional "weighting", then the desired quantity of positions is selected randomly.
For instance, is the goal to produce "interesting" chess, or "relevant" chess, or to measure Elo somehow, or to beat your friends' books? I guess my goal is some combination of the top three.
Martin Thoresen asked me what I would do regarding openings in TCEC. This is partially in answer to that, though some of the concepts are a bit more general. For instance, if you asked me to create a suite of positions for engine testers to use, much of the answers would be the same [in particular, if an author "tunes" toward my suggestions, I'd likely think this was simply a reasonable way to test/develop an engine].
Here is my methodology. I stress the numbers don't matter much, though I realise that whatever numbers I throw out have a decent chance of those actually being used (due to laziness).
* Start with a PGN of "top-level" human games, perhaps meaning both players are 2600+ (or maybe 2500+, or both are 2500+ and at least one is 2600+). Only consider "serious" games, so get rid of blitz/blindfold/Armageddon.
* Find all positions that meet the following constraints (I suspect some database program could do this, though it is not trivial):
** Popularity: Position has occurred (say) 50-100 times
** Topical: Position has occurred at least 5-10 times in the last 5 years (so the line is not "busted", as it were)
** Playability: There is no "one move" that is greatly preferred, perhaps some constraint like no move is played more than 2/3 of the time, and/or the ratio from the most common to the second most is no worse than 3:1.
** Volatility: Draw percentage is between 45-65% (or maybe 40-60%, or maybe 50-70% -- depends on the Elo range you chose)
** Equality: White scores between 50-60% (maybe after adjusting for Elo)
* I have no idea how many positions this would be, but I suspect it will be at least a few hundred. One "solution" at this point is simply to randomly choose the desired number of positions.
* However, I would rather add on an additional layer (which is likely to be complicated): there should be some weighting so that the "overall popularity" of moves is somewhat like from the human games. For instance, the e4 versus d4 ratio should be reasonably close to the expected. It might not be that easy to do with various openings (for instance, the Petrov is too drawish (see Volatility), and others perhaps not enough so), but I think at least some attempt can be made here. After this additional "weighting", then the desired quantity of positions is selected randomly.