Open Source bitbase program

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Peter Fendrich

Open Source bitbase program

Post by Peter Fendrich »

I am planning to start an open source bitbase program. Both generating and accessing bitbases. Compression is of certain interest here.
Before starting that I would like to know:
  • Are there any open source for bitbases?
  • Any links to written material in this subject?
Thanks!
/Peter
Harald
Posts: 317
Joined: Thu Mar 09, 2006 1:07 am

Re: Open Source bitbase program

Post by Harald »

The first time I read about bitbases was like this:

http://supertech.lcs.mit.edu/~heinz/ps/know_edb.ps.gz :

Preprint of an article in: ICCA Journal 22(2), pp. 81-97, June 1999.
Knowledgeable Encoding and Querying of Endgame Databases
Ernst A. Heinz
Institute for Program Structures and Data Organization (IPD)
School of Computer Science, University of Karlsruhe
P.O. Box 6980, D-76128 Karlsruhe, F.R. Germany
May 25, 1999

May be this is not exactly what you are looking for, but this is part of the history.

Harald
Alessandro Scotti

Re: Open Source bitbase program

Post by Alessandro Scotti »

Hi Peter,
in Kiwi there is some code to generate and use a few bitbases. I started working specifically on "knowledgeable compression" and got (I think) some interesting results. However, the project later was sort of abandoned together with Kiwi.
Delfi has state-of-the-art compressed bitbases, and it is now open source, but I haven't looked at the source code so I don't know if bitbase code has been published.
I think compression for bitbases is very interesting, but it's probably becoming less important with more and more RAM becoming commonly available.
BTW, what license do you plan to use for your project?
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Open Source bitbase program

Post by Dann Corbit »

JP wrote:I am planning to start an open source bitbase program. Both generating and accessing bitbases. Compression is of certain interest here.
Before starting that I would like to know:
  • Are there any open source for bitbases?
  • Any links to written material in this subject?
Thanks!
/Peter
Scorpio bitbase is open source. You can also attach it to your project "as-is" and just use it.
It comes as a DLL and it should be fairly trivial to make it a .so under Linux.
Peter Fendrich

Re: Open Source bitbase program

Post by Peter Fendrich »

Maybe I am wrong but as far as I understand Scorpio, including probing the bitbases, is open source but not the generation of bitbases.
Peter Fendrich

Re: Open Source bitbase program

Post by Peter Fendrich »

I have not been thinking about what kind of license to use.
If I find some interesting open source to start from I will adapt to that one.
That might mean that I have to open all of Alaric, I don't know, but that is not a big issue for me really.

/Peter
Alessandro Scotti

Re: Open Source bitbase program

Post by Alessandro Scotti »

IMO the easiest way to generate bitbases is to use existing EGTB probing code, like that e.g. in Crafty. Since this is the hard and boring part, you can spend all the time on the fun stuff! :-)
User avatar
Daniel Mehrmann
Posts: 858
Joined: Wed Mar 08, 2006 9:24 pm
Location: Germany
Full name: Daniel Mehrmann

Re: Open Source bitbase program

Post by Daniel Mehrmann »

Alessandro Scotti wrote:IMO the easiest way to generate bitbases is to use existing EGTB probing code, like that e.g. in Crafty. Since this is the hard and boring part, you can spend all the time on the fun stuff! :-)
Well, the Nalimov code isn't open source and i know Eugene don't want to see his code in a open source project.

However, EGTB are no bitbases and that's what Peter wants to do. I guess Peter wants just a easy WDL modell without evaluation. Evaluation could be done by the engine itself. Depends how do you plan to use it of course. :wink:

Best,
Daniel
Alessandro Scotti

Re: Open Source bitbase program

Post by Alessandro Scotti »

You don't need to publish the EGTB code, all you need to do for each bitbase is:
- loop over all possible positions
- probe EGTB to see if the position is win, draw or loss
- update the bitbase accordingly.

At the end of this process you don't need the EGTB code anymore. If you really don't want to use EGTB you can of course use Scorpio's BB code but eventually the result is the same: a database of position with win/draw/loss information. I think that, in uncompressed form, nobody can copyright this.
In fact we might just as well use Scorpio's BB data and start working on compression, probing code, etc. to obtain an entirely different "product"...
Tony

Re: Open Source bitbase program

Post by Tony »

Alessandro Scotti wrote:IMO the easiest way to generate bitbases is to use existing EGTB probing code, like that e.g. in Crafty. Since this is the hard and boring part, you can spend all the time on the fun stuff! :-)
Actually, bitboards are quite easy to generate. All one has to do is add 2 states (besides win,draw,loss,unknown) during generation: At least draw and at most draw.

Then rather then doing black and white seperate, do the same position first for white then for black to move (with normal forward analysing).

If you find a wtm-black wins, or btm-white wins position, set the score also with "undoing" all moves. Same for stm-atMostDraw (if it doesn't go into a stm-wins position)

This way, not so much iterations are needed.

Tony