Brainfish, a new concept of a chess engine

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

Moderators: hgm, Rebel, chrisw

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: So, the point is, where is the innovation up there?
Because, it is publicised like that, something that has never been done.
Lyudmil Tsvetkov wrote: And you know what, I bet that there will be no elo increase over standard SF. For the simple reason, that GM lines still vastly outperform SF-built lines. Please try that, and then after reporting the result, decide how to publicise your project.

Again, I appreciate your effort, but let's call things with their names.
I see your point, at least in parts, but let me explain why it was advertised as "Brainfish, a new concept of a chess engine", and what the innovation is.

What is the function of a Brain? Besides some other things, it creates new knowledge out of existing knowledge. That is exactly what the library does. It takes all the evaluation scores created by an engine for every position in the library, and calculates new scores out of it with it's graph algorithm. Together with that the main lines are created, and new knowledge about transistions and possible forced repetitions is found and can be displayed and used for playing.

That is the innovation, at least I don't know another product or free library that does it that way.

The second point which I quoted from you I do not understand. You say there will be no elo increase over Standard SF because GM lines still vastly outperform SF-built lines. Do you mean compared to SF with a book of GM lines?
strong/very strong GM-built book = state-of-the-art theoretical knowledge, acquired over a period of decades and even centuries, checked and rechecked by hundreds and thousands of highly specialised opening experts = book content being very close to perfection, at least for the majority of lines

any engine-built book, no matter if the strongest available engine is used, and irrespective of the time spent by the engine on lines calculations = relatively good book, but far from perfect, and of course, far inferior to the GM-generated book

As simple as that. Theoretical lines will always outperform any engine-generated lines, at least to the point where a perfect-playing engine is used, which migth be some 20-30 years from now.

Fazit: GM-created books will always outperform engine-generated books, provided both have same length and width if used for testing.
User avatar
Ozymandias
Posts: 1535
Joined: Sun Oct 25, 2009 2:30 am

Re: Brainfish, a new concept of a chess engine

Post by Ozymandias »

Dann Corbit wrote:So it is the book building tool, if I am not mistaken.
That was my understanding, too. BrainFish is supplied as proof of concept. The fact that SF and a SF-generated book are provided, doesn't mean you need them for the tool to work. They're useful for marketing purposes, tough. Does it breach GPL? Don't know, don't care.
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: Brainfish, a new concept of a chess engine

Post by velmarin »

The full probe code is supplied.
This code can easily be transferred to any other engine. Compile with the resource and has a BrainEngine...

In principle it is how a compilation Stockfish with the option now missing the use of books polyglot, you then adds his book...

The resource seem very elaborate and strong enough, but it is nothing more than a book, Brain is not for me this concept.

It is clear that if this book is suministara with an engine of 2500 elo, would not be the same, Stockfish makes publicity.
IWB
Posts: 1539
Joined: Thu Mar 09, 2006 2:02 pm

Re: Brainfish, a new concept of a chess engine

Post by IWB »

hgm wrote:Well, the GPL doesnot require the code to be useful.
With "useful" I ment to use a book created for and with Stockfish to be used for another engine
hgm wrote: It does require building tools to be available. E.g. you cannot dodge the GPL by writing your own compiler for your own programming language, and then write code additions to a GPL project in that language, and publish that source (charging people that want to use it for a compiler that has no other use to them). 'Available' here is a somewhat vague notion; it does not mean that is should be available for free. E.g. if building requires MS Word (as building of the WinBoard help file does) it would still be OK, because MS Word is in common use for other purposes.
Less abstract but more real: Does a code in addition to GPL-Stockfish to acces a proprietary book (and the book is comercial) has to be GPL?
How about writing a code to access CTG books from Stockfish. No one would doubt that this has to be GPL as well.
hgm wrote: The proposed project could be a bit questionable in this light. A parallel was drawn with ray-tracing code for producing gif images. But there are many programs in common use to produce gif images. In this case the only software able to produce the binary book file seems to be the software that the OP wants to market. This could be considered a GPL violation. To be safe some open-source program to create a book (e.g. by converting a PGN file) in that format could be supplied. That this would not help you to make a strong book is not relevant.
To me it doesn't make sence to NOT open the source (access code) as someone who wants to sell a book or a "method to make a book" wants engines to access it, right? But if they realeasse a free SF with that access possibility it has to be GPL again ...
hgm wrote: Of course using an existing book format, such as Polyglot format, would circumvent all problems.
Maybe the new format is so revolutionary that the old formats are not sufficient ... I don't mind the try to bring a new book format to market. That same market will tell if it is worth it.

We will see at the end how it turns out :-)
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Brainfish, a new concept of a chess engine

Post by hgm »

I don't think the GPL forbids you to add probing code for CTG books to XBoard or Stockfish. As long as you publish the source of the probing code you don't even have to supply a CTG book. It would not prevent distribution of binary books under other licenses, by yourself or by others.

The format was described by the OP as 6-byte key + 2-byte move. Polyglot format would have 8-byte key + 2-byte move + 2-byte weight + 2 x 2-byte learning info, i.e. double the entry size, and plenty of room to contain the info. Of course this would double the size of the book, but nowadays that would be hardly an issue.
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 »

IWB wrote:
To me it doesn't make sence to NOT open the source (access code) as someone who wants to sell a book or a "method to make a book" wants engines to access it, right? But if they realeasse a free SF with that access possibility it has to be GPL again ...

We will see at the end how it turns out :-)
Hi,

thanks for your remarks, but I'm still not sure if there is not a bit of misunderstanding, let me explain.

Of course the acccess code for the Library is in Brainfish, in fact I have no idea how it would be possible to include it not. Also the book format is documented and in fact very simple, 6 byte hash, one byte first move, one byte second move. Every developer can easily create such a Library. And the book data included in the binary resource (in the mentioned format) was put under the GPL too.

The only thing not availabe are the Algorithms to create and find the special data in that book, which means the exact and good moves per position (which is the innovation).

From my point of view this is ok, because as far as I know, if I make a .bin book for a GPL program, I'm not required to publish every source code, data and tools which I used to make that book.

Thomas
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Brainfish, a new concept of a chess engine

Post by hgm »

Would your tool also work for making min-Shogi books?
IWB
Posts: 1539
Joined: Thu Mar 09, 2006 2:02 pm

Re: Brainfish, a new concept of a chess engine

Post by IWB »

Thomas Zipproth wrote: ...
Of course the acccess code for the Library is in Brainfish, in fact I have no idea how it would be possible to include it not.
Of course the access code was in the modified Stockfish but will the source code for the access free and open available?
Edit: (Just read that it is, then its fine to me)
Thomas Zipproth wrote: Also the book format is documented and in fact very simple, 6 byte hash, one byte first move, one byte second move. Every developer can easily create such a Library. And the book data included in the binary resource (in the mentioned format) was put under the GPL too.

The only thing not availabe are the Algorithms to create and find the special data in that book, which means the exact and good moves per position (which is the innovation).

From my point of view this is ok, because as far as I know, if I make a .bin book for a GPL program, I'm not required to publish every source code, data and tools which I used to make that book.
I agree here. If the modified source code for Stockfish (you named it Brainfish, I am not sure if an access code for a book justifies a different name... ) to access the book is available that would be fine for me. If some GPL lawyers see that different ... I don't mind.

Ingo
Last edited by IWB on Wed Jul 27, 2016 1:24 pm, edited 1 time in total.
IWB
Posts: 1539
Joined: Thu Mar 09, 2006 2:02 pm

Re: Brainfish, a new concept of a chess engine

Post by IWB »

velmarin wrote:The full probe code is supplied.
Is it, i did not check? Thats good!
velmarin wrote: ...
It is clear that if this book is suministara with an engine of 2500 elo, would not be the same, Stockfish makes publicity.
:-) I think thats the point here :-)
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: Brainfish, a new concept of a chess engine

Post by velmarin »

I did a small test for my own knowledge,
I have downloaded this book CTG from here:
https://www.sendspace.com/file/xcf6gw
published in Chess2u Forum.
http://www.chess2u.com/t10410p25-exon-ctg.
This book have one size 66 megas, small book ctg.

A technical draw, still seems impressive performance of Brainfish.
I suppose that if the tool is simple to use can be a good tool for the "bookmakers" Playchess or InfinityChess.
Also for those tournaments of author where is allowed the use of books.
Hold on..
Results:
DESKTOP-QFSOBQ2, Blitz 1m 0
1 Stockfish 8 64 +4/=23/-3 51.67% 15.5/30
2 Brainfish 1 64 +3/=23/-4 48.33% 14.5/30