I've been experimenting with different ways of training Leela-style nets so they produce different styles of play, intended for human vs engine training on CPU.
I've hit upon a good approach, but am struggling with how to "measure" the style. Surely this problem must have been addressed in these forums before.
Leela Nets for Human Training and "Style"
Moderators: hgm, Rebel, chrisw
-
- Posts: 1631
- Joined: Tue Aug 21, 2018 7:52 pm
- Full name: Dietrich Kappe
Leela Nets for Human Training and "Style"
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Leela Nets for Human Training and "Style"
One simple and automatic way is thru personality. Example Fischer, collect positions (with some criteria) where Fischer is to move, make it as a test suite where the bm in the epd is Fischer's move in the actual game, then measure the engine's performance by counting how many moves match the bm in the epd.
-
- Posts: 3019
- Joined: Wed Mar 08, 2006 9:57 pm
- Location: Rio de Janeiro, Brazil
Re: Leela Nets for Human Training and "Style"
It is a great idea, but I would not use any criteria. Best moves (meaning famous ones) will almost always be tactical in nature, which means they will be beyond style, as they are the single best move period. Style is precisely when there are multiple viable options, and one is chosen. Those are the ones that distinguish style. One way might be simply to get all the games of top players with distinctive styles, though not when they were too young or old, run the engine, and see whose moves match the most. You then may have a measure of the style or player(s) said engine matches the closest.Ferdy wrote: ↑Fri Jun 28, 2019 2:38 am One simple and automatic way is thru personality. Example Fischer, collect positions (with some criteria) where Fischer is to move, make it as a test suite where the bm in the epd is Fischer's move in the actual game, then measure the engine's performance by counting how many moves match the bm in the epd.
"Tactics are the bricks and sticks that make up a game, but positional play is the architectural blueprint."
-
- Posts: 133
- Joined: Fri Apr 09, 2010 3:26 am
Re: Leela Nets for Human Training and "Style"
That definition for style is too simplistic. If the obviously best move is to trade queens, but I don't like to exchange queens, then surely my decision in that position becomes a mark in my style.Albert Silver wrote: ↑Fri Jun 28, 2019 3:53 amIt is a great idea, but I would not use any criteria. Best moves (meaning famous ones) will almost always be tactical in nature, which means they will be beyond style, as they are the single best move period. Style is precisely when there are multiple viable options, and one is chosen. Those are the ones that distinguish style. One way might be simply to get all the games of top players with distinctive styles, though not when they were too young or old, run the engine, and see whose moves match the most. You then may have a measure of the style or player(s) said engine matches the closest.Ferdy wrote: ↑Fri Jun 28, 2019 2:38 am One simple and automatic way is thru personality. Example Fischer, collect positions (with some criteria) where Fischer is to move, make it as a test suite where the bm in the epd is Fischer's move in the actual game, then measure the engine's performance by counting how many moves match the bm in the epd.
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Leela Nets for Human Training and "Style"
Given position after e4 e5 nf3 nc6 bb5 a6 ba4 nf6 0-0 be7 re1 b5.Albert Silver wrote: ↑Fri Jun 28, 2019 3:53 amIt is a great idea, but I would not use any criteria. Best moves (meaning famous ones) will almost always be tactical in nature, which means they will be beyond style, as they are the single best move period. Style is precisely when there are multiple viable options, and one is chosen. Those are the ones that distinguish style. One way might be simply to get all the games of top players with distinctive styles, though not when they were too young or old, run the engine, and see whose moves match the most. You then may have a measure of the style or player(s) said engine matches the closest.Ferdy wrote: ↑Fri Jun 28, 2019 2:38 am One simple and automatic way is thru personality. Example Fischer, collect positions (with some criteria) where Fischer is to move, make it as a test suite where the bm in the epd is Fischer's move in the actual game, then measure the engine's performance by counting how many moves match the bm in the epd.
Fischer is white it is not necessary to include that in fischer personality test suite with bb3 as bm. This is what I mean by collect positions with some criteria. This is only in the opening, there can be in middle and ending.
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Leela Nets for Human Training and "Style"
Another approach is to use Don's similarity test but using positions played by a player say Fischer.dkappe wrote: ↑Fri Jun 28, 2019 2:04 am I've been experimenting with different ways of training Leela-style nets so they produce different styles of play, intended for human vs engine training on CPU.
I've hit upon a good approach, but am struggling with how to "measure" the style. Surely this problem must have been addressed in these forums before.
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Leela Nets for Human Training and "Style"
Preliminary draft on how to extract positions for personality test suite.
I plan to start with Tal.
Suggestions are welcome.
I plan to start with Tal.
Code: Select all
Generate Tal test suite
1. Get Tal's games
2. Read each position where Tal is to move
3. Analyze each position with Stockfish at 30s, on multipv 2
4. Save the position for test suite only if all below conditions are satisfied.
a. score of top 1 move >= -400cp and score of top 1 move <= 400cp.
We exclude positions that already have decisive advantage or disadvantage.
b. The difference between the score of top 1 move and the score of top 2 move
must not be more than 200cp.
Positions with alternative move that is clearly bad will be excluded.
5. Positions saved in epd format contains a bm that is the actual move by Tal in the game
-
- Posts: 1242
- Joined: Sat Jul 05, 2014 7:54 am
- Location: Southwest USA
Re: Leela Nets for Human Training and "Style"
This could take some time...I would start with a basket of opening choices..(Gambit vs Tactical vs Solid vs Positional etc)Ferdy wrote: ↑Sat Jun 29, 2019 2:19 am Preliminary draft on how to extract positions for personality test suite.
I plan to start with Tal.
Suggestions are welcome.Code: Select all
Generate Tal test suite 1. Get Tal's games 2. Read each position where Tal is to move 3. Analyze each position with Stockfish at 30s, on multipv 2 4. Save the position for test suite only if all below conditions are satisfied. a. score of top 1 move >= -400cp and score of top 1 move <= 400cp. We exclude positions that already have decisive advantage or disadvantage. b. The difference between the score of top 1 move and the score of top 2 move must not be more than 200cp. Positions with alternative move that is clearly bad will be excluded. 5. Positions saved in epd format contains a bm that is the actual move by Tal in the game
Then based on the move order choices pull down a huge basket of chess players (styles) then based on those players styles use only those games...That should give you the games you (styles) you want... Good Luck
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Leela Nets for Human Training and "Style"
Lets say Sicilian opening for a start.supersharp77 wrote: ↑Sat Jun 29, 2019 3:19 amThis could take some time...I would start with a basket of opening choices..(Gambit vs Tactical vs Solid vs Positional etc)Ferdy wrote: ↑Sat Jun 29, 2019 2:19 am Preliminary draft on how to extract positions for personality test suite.
I plan to start with Tal.
Suggestions are welcome.Code: Select all
Generate Tal test suite 1. Get Tal's games 2. Read each position where Tal is to move 3. Analyze each position with Stockfish at 30s, on multipv 2 4. Save the position for test suite only if all below conditions are satisfied. a. score of top 1 move >= -400cp and score of top 1 move <= 400cp. We exclude positions that already have decisive advantage or disadvantage. b. The difference between the score of top 1 move and the score of top 2 move must not be more than 200cp. Positions with alternative move that is clearly bad will be excluded. 5. Positions saved in epd format contains a bm that is the actual move by Tal in the game
Move order choices?
-
- Posts: 1242
- Joined: Sat Jul 05, 2014 7:54 am
- Location: Southwest USA
Re: Leela Nets for Human Training and "Style"
Well..yes you gotta know the Chess Openings (ex It's The Sicilian Defense ) Sharp would be Najdorf Lines 6.Bg5Ferdy wrote: ↑Sat Jun 29, 2019 3:43 amLets say Sicilian opening for a start.supersharp77 wrote: ↑Sat Jun 29, 2019 3:19 amThis could take some time...I would start with a basket of opening choices..(Gambit vs Tactical vs Solid vs Positional etc)Ferdy wrote: ↑Sat Jun 29, 2019 2:19 am Preliminary draft on how to extract positions for personality test suite.
I plan to start with Tal.
Suggestions are welcome.Code: Select all
Generate Tal test suite 1. Get Tal's games 2. Read each position where Tal is to move 3. Analyze each position with Stockfish at 30s, on multipv 2 4. Save the position for test suite only if all below conditions are satisfied. a. score of top 1 move >= -400cp and score of top 1 move <= 400cp. We exclude positions that already have decisive advantage or disadvantage. b. The difference between the score of top 1 move and the score of top 2 move must not be more than 200cp. Positions with alternative move that is clearly bad will be excluded. 5. Positions saved in epd format contains a bm that is the actual move by Tal in the game
Move order choices?
Quiet would be 6.Be2 Poison Pawn variation would be 'Gambit' 6. g3 would be a quiet line..Lasker Pelikan would be sharp Dragon variation would be tactical/sharp Classical QGD would be 'quiet'..Ruy Lopez Marshall attack would be 'Gambit'
Classical French would be positional.. French Winawer 'Tactical or Gambit' etc...