Page 6 of 14

Re: BrainLearn

Posted: Sun Jun 28, 2020 8:34 pm
by Damir
Thanks a lot Andrea. Looks very promising.

May I ask how development os Shashchess is going on ? :)

Re: BrainLearn

Posted: Sun Jun 28, 2020 8:36 pm
by Damir
Sorry just saw a thread with Shashchess.

Re: BrainLearn

Posted: Tue Jun 30, 2020 8:47 pm
by peter
amchess wrote: Sun Jun 28, 2020 7:58 pm It's a pleasure to annonce the new BrainLearn 9 release with a lot of novelties:
-new Self Q-learning, a learning variant optimized for self play
Thanks for new BrainLearn!
Self Q-Learning chosen doesn't create an experience- file. Is this supposed to be so?
You already told me, more data was stored by ShashChess with option Standard.
Will Self make already existing experience.bin grow at all, if there isn't a new one created, or is it only kind of changed as for the entries?

Re: BrainLearn

Posted: Tue Jun 30, 2020 11:35 pm
by amchess
peter wrote: Tue Jun 30, 2020 8:47 pm
amchess wrote: Sun Jun 28, 2020 7:58 pm It's a pleasure to annonce the new BrainLearn 9 release with a lot of novelties:
-new Self Q-learning, a learning variant optimized for self play
Thanks for new BrainLearn!
Self Q-Learning chosen doesn't create an experience- file. Is this supposed to be so?
You already told me, more data was stored by ShashChess with option Standard.
Will Self make already existing experience.bin grow at all, if there isn't a new one created, or is it only kind of changed as for the entries?
Q-learning is different from standard learning because it memorize only the previous game's best scores.
Moreover, the communication between the engine and the gui is very different changing this last.
So, we had to choice: at uci commands level, the experience is created at the moment where the engine is unloaded (quit command sent).
In fritz gui, you obtain this in match play (not tournament): when the match is terminated and you quit the gui.
In arena, after a tournament, when the engines are unloaded.
In aquarium, at tournament play (not match play), when you quit the gui
and so on.
Anyway, I advise you to use it only in selfplay.
After, you can use it, in normal mode, against another engine.
Andrea

Re: BrainLearn

Posted: Wed Jul 01, 2020 1:01 am
by peter
amchess wrote: Tue Jun 30, 2020 11:35 pm In fritz gui, you obtain this in match play (not tournament): when the match is terminated and you quit the gui.
Neither in Deep Fritz 14 nor in Shredder 13 with the popcnt compile a new experience is created by single moves.
Neither at unloading of the engine nor at quitting of the GUI.
Maybe only with result of a fully completed game and with complete move history including starting position?

Re: BrainLearn

Posted: Wed Jul 01, 2020 1:59 am
by Zerbinati
peter wrote: Wed Jul 01, 2020 1:01 am
amchess wrote: Tue Jun 30, 2020 11:35 pm In fritz gui, you obtain this in match play (not tournament): when the match is terminated and you quit the gui.
Neither in Deep Fritz 14 nor in Shredder 13 with the popcnt compile a new experience is created by single moves.
Neither at unloading of the engine nor at quitting of the GUI.
Maybe only with result of a fully completed game and with complete move history including starting position?
Hi peter,
No experience file is created because there is a small error in the code ..
Delete the character ! in the uci.cpp file (line 83)

Code: Select all

	  LearningFileEntry currentLearningEntry;
	  currentLearningEntry.depth = 0;
	  currentLearningEntry.hashKey = pos.key();
	  currentLearningEntry.move = m;
	  currentLearningEntry.score = VALUE_NONE;
	  currentLearningEntry.performance = 100;
	  if(!Options["Self Q-learning"])
      {
	  	insertIntoOrUpdateLearningTable(currentLearningEntry,globalLearningHT);
      }

Re: BrainLearn

Posted: Wed Jul 01, 2020 3:57 am
by Zerbinati
also file tt.cpp (line 268)

Code: Select all

	        ((node->latestMoveInfo.depth < node->siblingMoveInfo[k].depth)
	  		||
	  		((node->latestMoveInfo.depth == node->siblingMoveInfo[k].depth) && (node->latestMoveInfo.score <= node->siblingMoveInfo[k].score )))
	  	&& (!Options["Self Q-learning"])
	        )
	      )
	    {
		updateLatestMoveInfo (node, k);

Re: BrainLearn

Posted: Wed Jul 01, 2020 7:04 am
by peter
Zerbinati wrote: Wed Jul 01, 2020 1:59 am No experience file is created because there is a small error in the code ..
Thanks for pointing out, Marco!
I'll wait and see, how Andrea will handle this.
I''m not good enough at understanding that code neither at compiling on my own, so I'd wait and hope for new compiles to download then too anyhow for further testing of new Q-learning.

Re: BrainLearn

Posted: Wed Jul 01, 2020 11:55 am
by amchess
peter wrote: Wed Jul 01, 2020 7:04 am
Zerbinati wrote: Wed Jul 01, 2020 1:59 am No experience file is created because there is a small error in the code ..
Thanks for pointing out, Marco!
I'll wait and see, how Andrea will handle this.
I''m not good enough at understanding that code neither at compiling on my own, so I'd wait and hope for new compiles to download then too anyhow for further testing of new Q-learning.
There is no error in the code and the experience file is perfectly created.
You have to have administrator privileges to launch the gui.
If you remove the "!", there is no Q-learning.
The "!" is a negation/not operator in cpp: be careful in what you do if you're not a programmer.

Re: BrainLearn

Posted: Wed Jul 01, 2020 1:51 pm
by Zerbinati
amchess wrote: Wed Jul 01, 2020 11:55 am
peter wrote: Wed Jul 01, 2020 7:04 am
Zerbinati wrote: Wed Jul 01, 2020 1:59 am No experience file is created because there is a small error in the code ..
Thanks for pointing out, Marco!
I'll wait and see, how Andrea will handle this.
I''m not good enough at understanding that code neither at compiling on my own, so I'd wait and hope for new compiles to download then too anyhow for further testing of new Q-learning.
There is no error in the code and the experience file is perfectly created.
You have to have administrator privileges to launch the gui.
If you remove the "!", there is no Q-learning.
The "!" is a negation/not operator in cpp: be careful in what you do if you're not a programmer.
Now I understand..
start an analysis and force some moves to close the GUI does not create anything .. but when I subsequently set a match play the BIN file is created