Open Source bitbase program

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Peter Fendrich

Open Source bitbase program

Post by Peter Fendrich » Mon Apr 09, 2007 5:14 pm

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: 265
Joined: Thu Mar 09, 2006 12:07 am

Re: Open Source bitbase program

Post by Harald » Mon Apr 09, 2007 6:06 pm

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 » Mon Apr 09, 2007 6:52 pm

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: 9894
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Open Source bitbase program

Post by Dann Corbit » Mon Apr 09, 2007 7:19 pm

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 » Tue Apr 10, 2007 5:43 pm

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 » Tue Apr 10, 2007 5:49 pm

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 » Tue Apr 10, 2007 5:54 pm

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: 855
Joined: Wed Mar 08, 2006 8:24 pm
Location: Germany
Full name: Daniel Mehrmann

Re: Open Source bitbase program

Post by Daniel Mehrmann » Wed Apr 11, 2007 9:06 am

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 » Wed Apr 11, 2007 9:54 am

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 » Wed Apr 11, 2007 11:18 am

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

Post Reply