Page 1 of 1

SugaR MCTS Learning (New)

Posted: Sun Mar 24, 2019 2:14 am
by supersharp77
Hot off the presses.....SugaR MCTS with learning feature.... :D :wink:

https://github.com/Zerbinati/SugaR/releases/tag/220319

Re: SugaR MCTS Learning (New)

Posted: Sun Mar 24, 2019 5:21 am
by Andrew
Can someone please put up a paragraph or few explaining what this learning is and how it works?

Does it write to the file every move (similar to how Shredder used to do it) ?
Just for selected moves (how I think Hiarcs and Crafty used to do position learning) ?

something else?

Also when does it use MCTS, the nps a game I'm playing seems too high for this.

Thanks!

I'd really love to see position learning in the Shredder style implemented in a modern engine, it
would be a very powerful analysis tool in certain situations!

Andrew

Re: SugaR MCTS Learning (New)

Posted: Wed Mar 27, 2019 3:42 am
by supersharp77
Andrew wrote: Sun Mar 24, 2019 5:21 am Can someone please put up a paragraph or few explaining what this learning is and how it works?

Does it write to the file every move (similar to how Shredder used to do it) ?
Just for selected moves (how I think Hiarcs and Crafty used to do position learning) ?

something else?

Also when does it use MCTS, the nps a game I'm playing seems too high for this.

Thanks!

I'd really love to see position learning in the Shredder style implemented in a modern engine, it
would be a very powerful analysis tool in certain situations!

Andrew
Good question..looked at some notes in the SugaR release files and the engine seems to learn in a fasion similar to Alpha0
and uses a few extra 'learning files' to assist in this process...you may have to check the release notes on this one...AR :D :wink:

https://github.com/Zerbinati/SugaR/blob ... earning.7z

Re: SugaR MCTS Learning (New)

Posted: Wed Mar 27, 2019 7:49 am
by Andrew
Thanks for the help! Played a few games and it created an experience.bin file but it was size 0.

Andrew

Re: SugaR MCTS Learning (New)

Posted: Wed Mar 27, 2019 8:01 am
by peter
Andrew wrote: Wed Mar 27, 2019 7:49 am Thanks for the help! Played a few games and it created an experience.bin file but it was size 0.
To get more .bin- files (8 with experience.bin normally) and see it grow (yet very slowly) you always have to have the full move history leading to the position to start playing or analysing from. As far as I saw till now, I think there are relationships of certain opening moves and expected end of games stored, so e.g. Syzygys aren't fully disabled by "Syzygy Probe Limit = 0" neither, there's always some tb- hits in output after a while.

But I'd also like very much to get to read some more from authors of this Patch, which was tried out in framework too some times ago, as far as I know, but didn't make it to SF dev. main branch. Only SugaR and ShashChess with this option so far known to me.

Edit: just see Marco Zerbinati wrote a little bit more about it in his own Forum recently again, but I don't think, I should copy and paste that from there to here, neither if links to other fora are welcome here, you have to be registered there to read anyhow.

Re: SugaR MCTS Learning (New)

Posted: Wed Mar 27, 2019 8:38 am
by Andrew
Thanks, these games were from the position with bishops and knights swapped at the beginning! Trying it now from a regular line
and it is generating several learning files.

Also note there is an update since the link in the first post see

https://github.com/Zerbinati/SugaR/tags

The only shame is it might be hard to generate a full line from the start for many puzzles!

Andrew

PS if the author of this patch/release reads this please post on here!

Re: SugaR MCTS Learning (New)

Posted: Wed Mar 27, 2019 9:10 am
by peter
Andrew wrote: Wed Mar 27, 2019 8:38 am Thanks, these games were from the position with bishops and knights swapped at the beginning! Trying it now from a regular line
and it is generating several learning files.

Also note there is an update since the link in the first post see

https://github.com/Zerbinati/SugaR/tags

The only shame is it might be hard to generate a full line from the start for many puzzles!

Andrew

PS if the author of this patch/release reads this please post on here!
Asked Marco Zerbinati so in his forum too. S_MCTSL is his latest baby, there was a SugaR with MCTS- option before already too.

Re: SugaR MCTS Learning (New)

Posted: Wed Mar 27, 2019 10:05 am
by Zerbinati
It is advisable to decompress the self-learning files provided by Kelly kinyama, and not start from scratch.
https://github.com/Zerbinati/SugaR/blob ... earning.7z

https://github.com/Kellykinyama12/Stockfish (montecarlo by Kelly Kinyama) only when true. This creates three files for machine learning purposes:
### -experience.bin
When no more than 40 moves are played, there are non more than 6 pieces on the chessboard and at a not low depth in analysis
### -pawngame.bin
When there are no more than 2 pieces and the game's phase is not the ending
### -openings.bin
In the form <positionKey>.bin (>=1) at the initial stage of game with memorized the move played, the depth and the score.
In this mode, the engine is not less strong than Stockfish in a match play without learning, but a lot better in analysis mode and to solve hard positions.
With learning, the engine became stronger and stronger.
MCTS-Learn-in Mode

Code: Select all

"From Kelly kinyama
The engine learns from experience. It writes the moves it plays to the hard disk. In the next game, it uses the same information if it encounters the same position, the same way we use the transposition table. It saves the information permanently on the hard drive, And loads information in memory during play.
With the decision tree, it plays more accurately and evaluates the positions more correctly.
[code]"From Kelly kinyama
The engine learns from experience. It writes the moves it plays to the hard disk. In the next game, it uses the same information if it encounters the same position, the same way we use the transposition table. It saves the information permanently on the hard drive, And loads information in memory during play.
With the decision tree, it plays more accurately and evaluates the positions more correctly.

Notes:
-For this method to work, you must always restart the engine for each and every game.
-Games should be started from the start position.
-Those binary files represent opening variations. We humans give names to the variations. My engine is giving them numbers. So it always knows which file to load in memory.
-The engine is constantly updating the files each time it plays."
Regards
M.Z

Re: SugaR MCTS Learning (New)

Posted: Wed Mar 27, 2019 2:30 pm
by Leo
Andrew wrote: Wed Mar 27, 2019 7:49 am Thanks for the help! Played a few games and it created an experience.bin file but it was size 0.

Andrew
Same here. I cant get the file to grow.

Re: SugaR MCTS Learning (New)

Posted: Thu Mar 28, 2019 7:19 am
by Andrew
Leo wrote: Wed Mar 27, 2019 2:30 pm
Andrew wrote: Wed Mar 27, 2019 7:49 am Thanks for the help! Played a few games and it created an experience.bin file but it was size 0.

Andrew
Same here. I cant get the file to grow.
I got it to work fine once I was playing games from the start position. I'd like to know how all of the .bin files with numbers as a prefix are used.

Andrew