Page 1 of 4

I was curious about the fuss over Fruit...

Posted: Wed Jan 26, 2011 8:35 pm
by pawnslinger
I am a retired programmer. I worked on all kinds of software from comm programs in C/C++ thru to accounting software in COBOL. Over a 40 year career, one picks up a lot of odds and ends in their tool kit.

Anyway, I am old enough to remember the fracas over Dr Dobbs Journal printing a working copy of Tiny Basic in their magazine (I actually keyed it in by hand and it worked!).

Well, I was curious about all this fuss over Fruit, so I decided to look into it. To see what the deal really is.

Wow! It has been a few years, but how things have changed. First off, most of my working life I had to pay gobs of cash for decent C/C++ compilers. Nowadays, they are given away for free. I downloaded Code::Blocks with MinGW. What a snap! Free, fast, easy... and works right out of the broswer! Unbelieveable! Okay, enough of that... then I Googled Fruit and download the source code package for 2.1. Man, that is one well written piece of code!! Fabien hasn't touched it in years and Code::Blocks compiled it almost error free. It only complained about some printf format strings, which I fixed in about 2 seconds. Loaded it into Chessbase and... wam bam thank you mam, it works flawlessly.

This is why it has so many clones. It is a realatively strong program (even nowadays), it is very clean code. Easy to understand. Well written. Cudos to Fabien!! What's not to like? I am surprised that everyone isn't using it as a starting point for their chess engine!

Perhaps they are, but they just aren't letting on...

My next project is to add threading to it. It was a bit of a challange, but I finally figured out how to work with "pthreads"... I think the rest should be fairly easy... we'll see.

Re: I was curious about the fuss over Fruit...

Posted: Wed Jan 26, 2011 9:02 pm
by Dr.Wael Deeb
pawnslinger wrote:I am a retired programmer. I worked on all kinds of software from comm programs in C/C++ thru to accounting software in COBOL. Over a 40 year career, one picks up a lot of odds and ends in their tool kit.

Anyway, I am old enough to remember the fracas over Dr Dobbs Journal printing a working copy of Tiny Basic in their magazine (I actually keyed it in by hand and it worked!).

Well, I was curious about all this fuss over Fruit, so I decided to look into it. To see what the deal really is.

Wow! It has been a few years, but how things have changed. First off, most of my working life I had to pay gobs of cash for decent C/C++ compilers. Nowadays, they are given away for free. I downloaded Code::Blocks with MinGW. What a snap! Free, fast, easy... and works right out of the broswer! Unbelieveable! Okay, enough of that... then I Googled Fruit and download the source code package for 2.1. Man, that is one well written piece of code!! Fabien hasn't touched it in years and Code::Blocks compiled it almost error free. It only complained about some printf format strings, which I fixed in about 2 seconds. Loaded it into Chessbase and... wam bam thank you mam, it works flawlessly.

This is why it has so many clones. It is a realatively strong program (even nowadays), it is very clean code. Easy to understand. Well written. Cudos to Fabien!! What's not to like? I am surprised that everyone isn't using it as a starting point for their chess engine!

Perhaps they are, but they just aren't letting on...

My next project is to add threading to it. It was a bit of a challange, but I finally figured out how to work with "pthreads"... I think the rest should be fairly easy... we'll see.
Edwin,
These are great news and the computer chess community will be deeply thankful for your newborn baby :D
Take your time not that we are patient of course :wink:
Cheers,
Dr.D

Re: I was curious about the fuss over Fruit...

Posted: Wed Jan 26, 2011 10:25 pm
by mhalstern
What fruit version is the alleged "master source."

Re: I was curious about the fuss over Fruit...

Posted: Wed Jan 26, 2011 10:32 pm
by Damir
2.1 :) :)

Re: I was curious about the fuss over Fruit...

Posted: Wed Jan 26, 2011 10:41 pm
by Dr.Wael Deeb
Damir wrote:2.1 :) :)
Whoo-hoo....my favourite :D

Re: I was curious about the fuss over Fruit...

Posted: Wed Jan 26, 2011 11:34 pm
by notyetagm
Dr.Wael Deeb wrote:
Damir wrote:2.1 :) :)
Whoo-hoo....my favourite :D
Yes, the father of all modern strong chess engines: Fruit 2.1

Re: I was curious about the fuss over Fruit...

Posted: Thu Jan 27, 2011 10:01 am
by stevenaaus
Is there versions Fruit greater than 2.1, that are inferior ?
Toga seems based on 2.1 too.

Re: I was curious about the fuss over Fruit...

Posted: Thu Jan 27, 2011 10:31 am
by pawnslinger
stevenaaus wrote:Is there versions Fruit greater than 2.1, that are inferior ?
Toga seems based on 2.1 too.
There are versions beyond 2.1, but I could not find the source code available. 2.3.1 is the latest I have heard about, but it is closed source. It has several desireable features, and is much faster than 2.1. One of the desireable feautres is tablebase support, which 2.1 lacks. Also, 2.3.1 has a better opening book... But the version 2.3.1 that I have still does not have multi-thread support, so if I can get that working in 2.1, it would be a bit of a feather. Do you know if Toga has multi-thread?

Re: I was curious about the fuss over Fruit...

Posted: Thu Jan 27, 2011 10:45 am
by jpqy
Hi Edwin,

You can look here and register yourself to get more informations and source code from Toga's and other engines..keep a eye on WHMoweryJr or get in talk with him!

http://www.computerchess.info/tdbb/phpB ... dd30825316

Just a tip :wink:
JP.

Re: I was curious about the fuss over Fruit...

Posted: Thu Jan 27, 2011 12:30 pm
by Xann
Dr.Wael Deeb wrote:Whoo-hoo....my favourite :D
For the records, mine is 1.5

Fabien.