Randomness of play under different conditions

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Randomness of play under different conditions

Post by Laskos »

Although I had some picture on how to randomize opening selection and diversify or "quickly build an opening book" when playing games from one single opening position, I never saw some data on that. This thing occurs often in handicap games with given opening position or studying specific opening in the opening theory. From a EPD file of openings, I took one normal opening position and played 400 games in different conditions (fixed depth, fixed nodes, fixed time) on 1 thread, then on 2 threads of a Stockfish dev. Then, I used PGN-Extract to count number of different games to move 10 of these 400-game matches. I wanted to see what diversity from 1 opening position is achieved.

1 initial opening position
400 games
10 moves

1 thread

Code: Select all

            number of different games out of 400
depth 9        1
depth 11       1

nodes 2k       1
nodes 20k      1
nodes 200k     1

1s+0.01s     373
5s+0.05s      13
25s+0.25s      6

The only acceptable randomization occurs at hyper-fast 1s+0.01s due to time granularity. But for all reasonable conditions, 1-thread Stockfish doesn't randomize well for an opening diversity.

2 threads

Code: Select all

            number of different games out of 400
depth 7      399
depth 9      396
depth 11     385
depth 13     367

nodes 2k     397
nodes 20k    391
nodes 200k   360

1s+0.01s     378
5s+0.05s     307
25s+0.25s    270
2-thread Stockfish randomizes fairly well in every condition. Curious thing, fixed depth result seems the most diverse. So, to build an opening repertoire from one single opening position, one can set play at fixed depth=7 Stockfish on 2 threads to 5-10 moves, then use thus built PGN file as opening book. The depth=7 games are very fast, but they are not that dumb to ruin the openings. I had some bad experiences with a complete randomizer engine, as in certain conditions it skews very much the openings.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Randomness of play under different conditions

Post by Laskos »

Another issue often occurring: using several (say 4) opening positions instead of 1 greatly enhances the randomization, especially when it is weak (but not absent). In the simplest model, it can be shown that the ratio 0<R≤1 of different games out of N games played, goes as R^(1/n_op), where n_op is the number of openings used in the match. For N=400 games played, with weak 1 thread randomization at slower than hyper-fast games, I have:

Code: Select all

400 games total, 1 thread
-------------------------------

1 opening    

             different
             games 
5s+0.05s      13 
25s+0.25s      6


4 openings

             different
             games 
5s+0.05s      122    
25s+0.25s      66


in pretty good agreement with the theoretical result. The use of several opening positions instead of one greatly enhances the variability of the games even with very few openings and weak randomization. The theoretical plot, giving number of different games for 4 openings function of that number for 1 opening:

Image