chess database format

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: chess database format

Post by Desperado »

Desperado wrote:Well, the reason because i would like to know more _details_ is, that
i am able to offer a database structure containing games + positions
(containing about 300.000 games,~35-40.000.000 positions,~80MB)

I recently setup a _basic_ structure which looks like this:

Code: Select all

- Header type

   * startposition of game
   * number of moves

- data type
 
   * movelist (game)
with access to positions like (pseudocode):

Code: Select all


void db_randomPos(...)
{
 game    = rnd64() % gamesNb;    db_loadgame(game);
 position = rand() % moveLimit;
 for(int i=0;i<gamelength && i<position;i++)
 {moveDo(pos,undo,game->mve[i]);}
}

There is no high quality code (it s more quick and dirty), but
i only use it within my testframe.
It is easy to load _randomly_ (starting) positions for playouts,
or other _offline_ learning cases i am playing with.

Now, it is trivial work to expand the records with _all_ legal moves for a
position (which will blow up the memory of the database by factor 35-40 at least, i guess).

So after a position is loaded, there _must_ sth. be done with it.
Is it passed to an engine for _normal_ search, or used to wallpaper the living room with
chess positions :-) ?

In any case you need some kind of _engine_ for:

- proof game analyses
- retrograde analyses
- minimax type analyses

if you use your _own_ engine, or an _openSource_ one doesnt matter.
Finally you would need to add a _moveType converter_
(which is a 10 minutes job) to use the database.

Michael
hmm, maybe a language trap !? of course i meant "provide for free(german: anbieten) "
instead of "offer(german: anbieten)", just to avoid a misunderstanding
because i am not sure if the usage of "offer" is correct here.

Michael