Tool and data for Texel Tuning

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Rebel
Posts: 6993
Joined: Thu Aug 18, 2011 12:04 pm

Tool and data for Texel Tuning

Post by Rebel »

pgn_to_epd is a tool written by Chris Whittington that produces EPD positions from PGN files for Texel Tuning. Below are ready to use EPD's made from the CCRL archives.

....

http://rebel13.nl/download/data.html
90% of coding is debugging, the other 10% is writing bugs.
chrisw
Posts: 4319
Joined: Tue Apr 03, 2012 4:28 pm

Re: Tool and data for Texel Tuning

Post by chrisw »

Rebel wrote: Fri Jun 19, 2020 12:35 am pgn_to_epd is a tool written by Chris Whittington that produces EPD positions from PGN files for Texel Tuning. Below are ready to use EPD's made from the CCRL archives.

....

http://rebel13.nl/download/data.html
Thanks to Ed for putting this up on his site, plus lots of training positions.
A few observations since I been playing around with training, NNs and more recently Texel, so, mostly on Texel Tuning ...

1. How many EPDs does one need?
2. What sort of games to get them from?
3. What to do about imbalances? (random selections produce more white winning positions that black).
4. What to do about non-quiet positions?
5. How to define non-quiet?
6. If we use game result scoring right back to the early moves, how to ensure there were no blunders in the PGN? Or, in other words, how to ensure game result reflects the game. Some games are lost on time from winning positions, some human games are resigned or claimed won incorrectly, some games are recorded with 'lost connection'.

1. Answer, anecdotally, appears to be many millions.
2. Comp-comp games above some limiting Elo. Sample the moves, don't take everything.
3. Invert (black-white) 50% of all EPDs. Produces 50-50 white/black wins.
4. Either cull, or Qsearch and play out the PV if there is one. I'm not sure this play-out idea works in practice.
5. Could be if Qsearch come back with a PV? Or could be if strong engine(s) put forward non-quiet moves from the position as best continuation.
6. Use relatively high Elo comp-comp games, check off using an engine (SF11 in this case) that a move evaluation close to the declared end of game is in accord with the declared result.

Accordingly, PGN-to-EPD, available on http://rebel13.nl/download/data.html carries out the following operations:

1. Reads all PGN files you put into the PGN directory.
2. Integrity checks each PGN. Must be above some set Elo. All moves verified legal. Game result must be in accord with engine evaluation of final few moves. Culls short draws, culls short wins. Randomly samples one in every N moves, default is about 20% sampling rate.
3. Marks each EPD with the PGN result (0.0, 0,5 or 1.0 POV side on move). Marks the length of the PGN. Marks the continuation move in algebraic. Marks if continuation is capture, promotion, check evasion or check.
3. Gathers together all saved EPDs, culls duplicates, shuffles.
4. Inverts black/white for random selected 50% of all EPDs to produce a 50/50 white/black win ratio.
jdart
Posts: 4367
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Tool and data for Texel Tuning

Post by jdart »

4. Either cull, or Qsearch and play out the PV if there is one. I'm not sure this play-out idea works in practice.
My tuning program accepts non-quiet positions. It does a shallow-depth search on each position, producing a PV. Then the position at the end of the PV is scored. Its score is used instead of the root position's score, even though the label (win/loss/draw) is actually for the root position. Doing a search for each position is time consuming, so to save time the tuner re-calculates the PV only once in a while (every 25 iterations by default).

This method works well, but it is much faster to use only quiescent positions to begin with.
chrisw
Posts: 4319
Joined: Tue Apr 03, 2012 4:28 pm

Re: Tool and data for Texel Tuning

Post by chrisw »

jdart wrote: Fri Jun 19, 2020 4:17 pm
4. Either cull, or Qsearch and play out the PV if there is one. I'm not sure this play-out idea works in practice.
My tuning program accepts non-quiet positions. It does a shallow-depth search on each position, producing a PV. Then the position at the end of the PV is scored. Its score is used instead of the root position's score, even though the label (win/loss/draw) is actually for the root position.
That’s a good idea. I was worried though about getting to be too many moves away from the PGN score, so figured Qsearch PV, and for many positions there is no Qsearch PV, so that helps stay close too. But the downside of using a Qsearch line connected back to the root is that the line may be dumb and one ends up applying the PGN score to a bad position.


Doing a search for each position is time consuming, so to save time the tuner re-calculates the PV only once in a while (every 25 iterations by default).

This method works well, but it is much faster to use only quiescent positions to begin with.