Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uploaded model's config and weight files #77

Closed
ileile opened this issue Nov 22, 2018 · 6 comments
Closed

uploaded model's config and weight files #77

ileile opened this issue Nov 22, 2018 · 6 comments

Comments

@ileile
Copy link

ileile commented Nov 22, 2018

I am trying to train a network closed to the uploaded one, for getting some experience.

I have used the config of the uploaded one,downloaded games from ficsgames.org and made some attempts. But I can't train a network good enough.

Can you share your training data? Without them, I can't know if I do something wrong or I just use wrong games :(

@brianprichardson
Copy link
Collaborator

I made many changes. Firstly, I trained with a version that can take pgn files as input without creating the intermediate format bitplane files. The data set was about 4 million CCRL games. I had to clean up the data quite a lot, and I patched python-chess to try to accept either SAN and UCI move formats.

Next, I split the games based on "quality". Initial training runs were games with a material difference of at least 10, then 4. Then, the games were split by Elo difference. First with at least 400 Elo difference, then both players under 1600, followed by 1601-2000, 2001-2400, 2401-2800, 2801+, and finally by the Stockfish "clean" games (separate pgn file).

Also, I changed the network size to only use 3 filters (not 5) for the first layer, and 10 layers of 128. The Policy output used 8 filters and the Value 4 (IIRC the mini config defaults are smaller).

All of this took a few months and I was not disciplined enough to take notes of exactly what I was doing along the way. As a result, I doubt that I could reproduce the current best weights files. Moreover, per #75, I broke something and you should go back to an older repo to train from scratch (there is a link in #75).

Finally, I have not looked at this repo in several months. Most have moved on to Leela Chess here: https://github.com/LeelaChessZero

@ileile
Copy link
Author

ileile commented Nov 22, 2018

I made many changes. Firstly, I trained with a version that can take pgn files as input without creating the intermediate format bitplane files. The data set was about 4 million CCRL games. I had to clean up the data quite a lot, and I patched python-chess to try to accept either SAN and UCI move formats.

Next, I split the games based on "quality". Initial training runs were games with a material difference of at least 10, then 4. Then, the games were split by Elo difference. First with at least 400 Elo difference, then both players under 1600, followed by 1601-2000, 2001-2400, 2401-2800, 2801+, and finally by the Stockfish "clean" games (separate pgn file).

Also, I changed the network size to only use 3 filters (not 5) for the first layer, and 10 layers of 128. The Policy output used 8 filters and the Value 4 (IIRC the mini config defaults are smaller).

All of this took a few months and I was not disciplined enough to take notes of exactly what I was doing along the way. As a result, I doubt that I could reproduce the current best weights files. Moreover, per #75, I broke something and you should go back to an older repo to train from scratch (there is a link in #75).

Finally, I have not looked at this repo in several months. Most have moved on to Leela Chess here: https://github.com/LeelaChessZero

Thank you.

I have checked the uploaded config, it uses 3 filters for the first layer, and 7 layers of 256. Is it the best one? I am not asking for the best you had got, I just need to confirm if the weights file on github is trained by the games and procedures you described here. Then I can use it as an anchor, to study things by playing around.

I know that everyone loves lc0 and moves there. But your work is excellent for a beginner. I have learned a lot things from you. Again, thanks for that :)

@brianprichardson
Copy link
Collaborator

I didn't upload a config directory file. The "standard" mini was changed locally. The mini in the repo still has 5 for the first layer and 256x7. I think I changed it locally as mentioned above with the numerous other changes.

Not sure what you mean by the "best" one. If you are only just starting to train from a random new net, smaller will be better at first as it is faster. The best weights I did upload were trained as I outlined above, but I don't remember exactly. Also, you could look at the json file as it may provide the actual net dimensions in there somewhere.

@ileile
Copy link
Author

ileile commented Nov 23, 2018

I didn't upload a config directory file. The "standard" mini was changed locally. The mini in the repo still has 5 for the first layer and 256x7. I think I changed it locally as mentioned above with the numerous other changes.

Not sure what you mean by the "best" one. If you are only just starting to train from a random new net, smaller will be better at first as it is faster. The best weights I did upload were trained as I outlined above, but I don't remember exactly. Also, you could look at the json file as it may provide the actual net dimensions in there somewhere.

I see. I will try to follow your steps :)

Could you explain more about "games with a material difference of at least 10, then 4" ? I don't quite understand the meaning. Thank you.

@brianprichardson
Copy link
Collaborator

For material difference game selection, I used SCID (version 4.6.5).
See the Search and Material menus.
Then you have to create and empty database and copy the currently selected "filter" games to that and then use the database export function. I seem to recall having difficulty outputting filter games from the "clipboard" database with SCID. Of course, there are other pgn tools you could use, such as pgnextract.

@ileile
Copy link
Author

ileile commented Nov 26, 2018

I think it's a good practice 👍 . Thank you for your help and patience :)

@ileile ileile closed this as completed Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants