Menu

#35 Database Service API

Future Release
accepted
7
2015-06-02
2013-12-21
No

I'm developing enhancements to the Java-based Raptor Chess Interface for FICS currently at http://code.google.com/p/raptor-chess-interface/ . In searching for a good crazyhouse opening book, I found this project.

I'd like for Raptor to query scidb while playing, observing, or examining a FICS game and display:

  • If playing a game, display opening codes and names
  • If observing or examining a game, display opening and/or endgame statistics
    Currently, Raptor generates FEN strings and uses its own opening book to display opening codes and names. Raptor supports most FICS variants, it just doesn't have an opening book for nonstandard variants.

Additionally, I'd like for Raptor to save played, observed, and examined games to scidb. Currently, Raptor only exports games to PGN.

Please consider providing an API (via whatever means you prefer) so FICS/ICS clients in general can use scidb as their preferred database service.

Discussion

  • Gregor Cramer

    Gregor Cramer - 2013-12-22
    • assigned_to: Gregor Cramer
    • Group: Next Release --> Future Release
    • Priority: 5 --> 7
     
  • Gregor Cramer

    Gregor Cramer - 2013-12-22

    Your request isn't not yet clear for me, so I will make a first proposal.

    You want to start a piped sub-process, probably called access-scidb-db, which reads commands from stdin and sends the result to stdout. This sub-process should provide some basic database functions like:

    1. get-opening-code-and-name <fen>
      which send the opening name and the ECO code for given FEN to stdout.

    2. open <database-path>
      opens a database, sends the status (OK, NOT-FOUND, ...) to stdout.

    3. close <database-path>
      closes the database.

    4. save-game <database-path> <pgn-game>
      saves the PGN game to given database, and sends the status.

    5. get-opening-statistic <database-path> <fen>
      which sends statistic data for the given FEN: games won/draw/lost, number of games in database with this position, and so on.

    6. Some more basic functions...

    Is this right?

     
  • Daniel Dugovic

    Daniel Dugovic - 2013-12-22

    Thanks, I was unclear as I have several goals in mind and I didn't want to accidentally constrain the design (piped I/O should work great):
    A. Query scidb database to obtain opening names and statistics for positions represented in FEN
    B. Query scidb database to obtain endgame statistics (if possible) for positions represented in FEN
    C. Request for scidb database to save games to a scidb database

    Yes, those functions are what I had in mind. Perhaps also:

    1. get-endgame-eval <fen>
      sends distance-to-conversion and/or distance-to-mate for given FEN to stdout
    2. list
      lists the open database path followed by listing closed database paths (OR simply list database in the format status path\n, your call)
    3. More basic functions...

    (Looking ahead, ICS client users may also want to be able to "drill down", displaying results in a scidb GUI. That sounds like a much more involved endeavor from a scidb point of view, so to avoid scope creep I'll save it for a future feature request.)

     

    Last edit: Daniel Dugovic 2013-12-22
  • Gregor Cramer

    Gregor Cramer - 2013-12-22
    • status: open --> accepted
     
  • Gregor Cramer

    Gregor Cramer - 2013-12-22

    It should be useful to provide an interface for other chess applications. This interface should be designed in a way so that it can be used inside scripts for database manipulation and examination. So far as I can see there is only one complex and time-consuming task, the formatting of the output in a parser-friendly way.

    Scidb is not yet a full-value database application, especially the filtering functions are not yet implemented, and the filtering has a higher priority than this request.

    6. get-endgame-eval <fen></fen>
    The endgame evaluation is already implemented in Scidb, but not yet tested, and not yet released. But I think this will come soon.

    I think there is another interesting thing for Raptor Chess: access to opening books. Scidb will support ChessBase CTG and Polyglot books. This stuff is already implemented, but not yet tested.

     
  • Cecchino

    Cecchino - 2013-12-30

    Opening books reading is already implemented? I didn't see it. How to open a .bin file? If i try with the usual "open database" it doesn't recognize the .bin file

    Endgame evalutation? What does it mean theoretically and how to do it in scidb?

     
  • Gregor Cramer

    Gregor Cramer - 2013-12-30

    Opening books reading is already implemented? I didn't see it.

    It is not yet tested, therefore it is not yet released. Will be released later.

    Endgame evalutation? What does it mean theoretically and how to do it in scidb?

    This means nothing else than tablebase support. Will be used in analysis window.

     
  • Gregor Cramer

    Gregor Cramer - 2015-06-02

    About the status of this request:

    The new archive format C/CIF (see http://ccif.sourceforge.net/) is in progress, the format has reached a final state, and the C++ library is about 80% finished. IMO this archive format is also the appropriate format for data exchange with other applications. After the release of the C/CIF library the request for saving games to a Scidb database can be realized with the use of C/CIF. CCIF is even a compact format.

    Searching in Scidb database will be realized with the use of the script language CQL-S (see http://scidb.sourceforge.net/help/en/CQL-Index.html). CQL-S is fully specified. The implementation is finished about 60%, but the test phase of CQL-S will last longer.

     

Log in to post a comment.

MongoDB Logo MongoDB