Brainfish, a new concept of a chess engine

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

Moderators: hgm, Rebel, chrisw

Thomas Zipproth
Posts: 59
Joined: Sat Jan 01, 2011 5:33 pm

Re: Brainfish, a new concept of a chess engine

Post by Thomas Zipproth »

Guenther wrote:
Thomas Zipproth wrote:Brainfish is based on the current Stockfish master. Future implementations may have a proxy exe, which can connect the library to any engine.

Regarding the SF testing framework, Brainfish can learn from played games by integrating them in it's library. But a better way to use a lot of computing power would be to use them for the calculation of the library itself, which is already possible in a distributed way.

The next step would be to implement a framework for the distributed computing of the library.

Thomas
You should add the exact name of what 'current' SF master source was used, because just a few days later no one knows it w/o doing a diff, if it is just generally written in the readme.
- the current development version of Stockfish
By now (time of writing this post) the current version would be:
stockfish_16072409

Guenther
You are right, this Information ist important.
I solved this issue with the bench number, because everything else may be misleading or unintentionally wrong.

The bench number is mentioned both in the Brainfish download section and in the download of the Stockfish development versions. You can start Brainfish from the command line, enter 'bench' and after a few seconds the bench number is displayed as "Nodes searched". With this number you can be absolutely sure what SF version it is.

Thomas
JJJ
Posts: 1346
Joined: Sat Apr 19, 2014 1:47 pm

Re: Brainfish, a new concept of a chess engine

Post by JJJ »

I d like to see a test between Brainfish against Stockfish using Fauzi book !
petero2
Posts: 688
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Brainfish, a new concept of a chess engine

Post by petero2 »

Thomas Zipproth wrote:today I released Brainfish, which realizes a new concept of a chess engine, the unification of an opening book and the engine.

Unification means, that the book is not created with statistics or human configuration, but is completely generated from the engine itself
This sounds similar to what Michael Buro described in a paper from 1999, Toward Opening Book Learning. Some quotes from the introduction section of the paper:
Furthermore, it enables a program with a reasonably good evaluation function to explore new promising opening lines by itself without the help of human experts, and to make use of games played by other players.
Since the new technique finds promising move alternatives globally with respect to all variations stored in the opening book, it goes beyond the usual procedures that simply choose random moves from the book
This has already been used in chess programs too, see for example: http://talkchess.com/forum/viewtopic.ph ... 121#550121

Please explain how your approach differs from the old technique.
User avatar
Eelco de Groot
Posts: 4565
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Brainfish, a new concept of a chess engine

Post by Eelco de Groot »

Michel wrote:I must confess I don't understand the difference between BrainFish and Stockfish playing with a strong opening book.

Perhaps the book in BF acts as a hashtable so that it can also be used in search? But I don't think this would give additional strength.
Basically that is what it is. There is a lot documented at the site from Thomas: http://www.zipproth.de/#cerebellum_deutsch
I see Brainfish more as a demonstration project of what you can do with the library, if that becomes available. If it is a commercial project, integrating the library into the GPL code of Stockfish is not very likely. The more than 70 points gain over a Stockfish that is playing without book and has to start from the 500 positions that are used in SPCC, that is of course just highly impressive for an opening book, but as basically only 500 positions had to be trained (plus some more that were used in the past) it is not so strange that you can actually reach such a high gain in ELo. I would be interested to know if the library could also beat something like Performance.bin from Marc Lacrosse. A much larger task I'm sure. I don't know if it has much practical applications in computerchess, outside of book cooking. It would be nice though, if Stockfish could just be switched on and then it would start refining its opening repertoire all by itself. Practically (from a computer chess user objective) it would probably be more effective as a layer on top of a very strong book, trying to improve play into the middle game. But I'm just guessing that.
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
Rochester
Posts: 55
Joined: Sat Feb 20, 2016 6:11 am

Re: Brainfish, a new concept of a chess engine

Post by Rochester »

Thank! Where I find origin for file my.res? GPL cannot have the binary inside!
Thomas Zipproth
Posts: 59
Joined: Sat Jan 01, 2011 5:33 pm

Re: Brainfish, a new concept of a chess engine

Post by Thomas Zipproth »

Rochester wrote:Thank! Where I find origin for file my.res? GPL cannot have the binary inside!
Before release, we had some philosophical talks about what GPL means to a real binary resource, like for example a toolbar gif image embedded in the exe file.

In fact you don't have to provide the source code of the raytracer or the paint program with which it was made. when you deliver your GPL program with that image embedded. You only have to put the image itself under the GPL.

It's the same with my.res, that is a real binary resource, which has no origin as such.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Brainfish, a new concept of a chess engine

Post by Lyudmil Tsvetkov »

Thomas Zipproth wrote:Hello together,

today I released Brainfish, which realizes a new concept of a chess engine, the unification of an opening book and the engine. Brainfish ist build upon Stockfish, therefore it is of course under the GPL license and the source code is available. The additional parts are not StockFish dependant and would work in every engine.

Unification means, that the book is not created with statistics or human configuration, but is completely generated from the engine itself, like a grandmaster may think of how to play some opening lines before a game. The book is contained in the exe itself, to demonstrate the unity of both.

So when Brainfish makes a move from it's internal opening library, there is in fact still Stockfish playing, but with a much higher precision and depth than normally possible. The libray extends in many cases into the deep middlegame and also into the endgame. If Brainfish is out of his book, it plays identical to Stockfish.

Brainfish is a spinoff of a Library called Cerebellum (not yet released) for the deep Analysis of chess Positions and complete opening trees. It contains the one or two best moves per position from Cerebellum. So BrainFish can be regarded as the playing part of that Library. BrainFish can also handle transpostions and graph interactions in his library, which is one of it's main advantages. There may be some similarities with IDeA, but I don't know enough of IDeA to compare them directly.

How can BrainFish be compared to other Engines?

That's a bit difficult, because BrainFish is in fact not just another Engine or a Stockfish clone with a different playing style. It add's something new to an engine, a self generated playing book (playing book because it can handle also middle and endgames). So the increase in playing strength can be directly measured, but the difference does not mean the same as when comparing two standard engines. It's more like building the strongest possible chess playing entity, no matter how it works internally.

How does it compare to Stockfish with a good standard opening book?

Brainfish should already play better than most or perhaps any Stockfish + opening book combination, but there's not enough statistical evidence so far. The main advantage of BrainFish is that it plays better every day when adding new nodes and recalculating the graph.

The graph algorithm always recalculates the whole tree, that means adding an endgame postion can change what BrainFish plays in the first moves.

BrainFish Website: www.zipproth.de/BrainFish
Stefan Pohls Testing site: http://spcc.beepworld.de/index.htm

Thomas
As I understand from reading css, this will be part of a commercial project.

What will the commercial offer include:
- the SF-generated book
- the latest SF-engine
- or both bundled into a single whole?

Is not a SF-generated book a SF-generated book?
Is not the latest SF the latest SF?
Is not the bundle of both the bundle of both?

It seems that there is nothing new, or am I missing something?
Thomas Zipproth
Posts: 59
Joined: Sat Jan 01, 2011 5:33 pm

Re: Brainfish, a new concept of a chess engine

Post by Thomas Zipproth »

Lyudmil Tsvetkov wrote:
As I understand from reading css, this will be part of a commercial project.

What will the commercial offer include:
- the SF-generated book
- the latest SF-engine
- or both bundled into a single whole?

Is not a SF-generated book a SF-generated book?
Is not the latest SF the latest SF?
Is not the bundle of both the bundle of both?

It seems that there is nothing new, or am I missing something?
Yes, that was not explained in detail on the website because of possible changes. The commerical release is not connected with Stockfish or any other engine, it will most likely contain the following tools:

- A complete Chess Gui (like for example the Shredder Gui), with the ability to show, edit, expand and manage the Cerebellum Library. The view of the Library will be similar to those in the Demo Tab of the website, but with more Details.

- The Library is not engine related, you can do the calulations any engine, the library can handle two different engines together.

- A proxy which connects the library with any engine, so that you can use the library as a front end to an UCI engine for playing.

- The Cerebellum library together with the Stockfish calculated book with all nodes calculated so far.

Brainfish itself will stay as it is, Open Source GPL and expanded from time to time with the nodes from the StockFish calculated Cerebellum Library nodes.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Brainfish, a new concept of a chess engine

Post by Lyudmil Tsvetkov »

Thomas Zipproth wrote:
Lyudmil Tsvetkov wrote:
As I understand from reading css, this will be part of a commercial project.

What will the commercial offer include:
- the SF-generated book
- the latest SF-engine
- or both bundled into a single whole?

Is not a SF-generated book a SF-generated book?
Is not the latest SF the latest SF?
Is not the bundle of both the bundle of both?

It seems that there is nothing new, or am I missing something?
Yes, that was not explained in detail on the website because of possible changes. The commerical release is not connected with Stockfish or any other engine, it will most likely contain the following tools:

- A complete Chess Gui (like for example the Shredder Gui), with the ability to show, edit, expand and manage the Cerebellum Library. The view of the Library will be similar to those in the Demo Tab of the website, but with more Details.

- The Library is not engine related, you can do the calulations any engine, the library can handle two different engines together.

- A proxy which connects the library with any engine, so that you can use the library as a front end to an UCI engine for playing.

- The Cerebellum library together with the Stockfish calculated book with all nodes calculated so far.

Brainfish itself will stay as it is, Open Source GPL and expanded from time to time with the nodes from the StockFish calculated Cerebellum Library nodes.
Please, read carefully what you yourself have written:
Thomas Zipproth wrote: 1) The commerical release is not connected with Stockfish or any other engine
Thomas Zipproth wrote:2)The Library is not engine related, you can do the calulations any engine, the library can handle two different engines together
So, the commercial project is not related to SF or any other engine, but you can do the calculations with SF or any other engine?? Are not those 2 statements the same? You are not using an engine while you are using an engine? :)
Thomas Zipproth wrote:1)The Cerebellum library together with the Stockfish calculated book with all nodes calculated so far.
Thomas Zipproth wrote:2)Brainfish itself will stay as it is, Open Source GPL and expanded from time to time with the nodes from the StockFish calculated Cerebellum Library nodes
So, the Cerebellum library is a SF-calculated library after all? :)

So, please kindly explain where is the difference between SF and Brainfish, as well as between SF-calculated library and Cerebellum library.

Maybe you would like to release only a GUI after all? It might have its merits, I have not investigated that matter.
Thomas Zipproth
Posts: 59
Joined: Sat Jan 01, 2011 5:33 pm

Re: Brainfish, a new concept of a chess engine

Post by Thomas Zipproth »

Lyudmil Tsvetkov wrote:
So, the commercial project is not related to SF or any other engine, but you can do the calculations with SF or any other engine?? Are not those 2 statements the same? You are not using an engine while you are using an engine? :)

So, the Cerebellum library is a SF-calculated library after all? :)

So, please kindly explain where is the difference between SF and Brainfish, as well as between SF-calculated library and Cerebellum library.

Maybe you would like to release only a GUI after all? It might have its merits, I have not investigated that matter.
Sorry, maybe my english was not the best at this point or I was not very clear, I explain again:

The Commercial Product will be:

1. The Gui with Cerebellum Library handling
2.) The Cerebellum Library itself, which does not mean an already calculated book, but a tool (Cerebellum) to make such a book using an engine of your choice.
3.) An adapter to connect a Cerebellum calculated book with an engine for playing.
4.) The book created with the Cerebellum Library using Stockfish as engine as an additional benefit.

So perhaps the misunderstanding was that the Cerebellum Library is not an already calculated book, it's the tool to create and use such a book. It's in fact a software library to do that.

I hope now it is more clear.

Thomas