Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fruit 1.0 UCI (with source code) now available

Author: Fabien Letouzey

Date: 04:25:44 03/18/04

Go up one level in this thread



On March 17, 2004 at 15:58:23, Russell Reagan wrote:

>Thanks for making your source code available.

No problem as long as people don't ask too many questions about it :)
More seriously releasing the source code is quite natural for Unix
users and I also thought that would make Fruit less "mysterious".

>We must have very similar thinking processes. I feel like I'm having deja vu
>reading some of your source code. I am really amazed at how similar your code is
>to mine. It is mostly the lower level classes. I have some of the same files as
>you: board.h, color.h, move.h, piece.h, square.h, and they are very similar.
>Your implementations of these are basically the struct version of my code (I use
>classes for these). From how you name your classes (postfixing _t) to how you
>protect duplicate header file inclusion (postfixing _H), there are a lot of
>similarities. I feel like I'm reading my own code sometimes :)

Oh well, glad at least one person in the world can read the code then.
As for some of the idioms you mention, they are quite popular (or used
to be) in the Unix community.

>There are definite differences though. You use structs where I use classes. You
>are definitely farther along than I am. Your board representation is different.
>The way you do higher level things like search is definitely different too.

> ...

The differences are easily explained.  As you might have noticed,
Fruit is an ex ANSI-C program that was "stuffed" into .cpp files.
That explains a lot especially why I have to prepend the "type" to
most function names.

I plan to slowly make use of more and more C++ features, but not in
the near future.  This should not be too difficult though, because my
C style has become more and more "OO"-like over the years.

>Anyway, I thought it was interesting :)

Indeed!

I do hope that it makes it easier for me to make changes.  Of course I
know I lose a bit of speed about everywhere in the code, but I don't
mind for now.

Fabien.




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.