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:
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.
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:
get-opening-code-and-name <fen>which send the opening name and the ECO code for given FEN to stdout.
open <database-path>opens a database, sends the status (OK, NOT-FOUND, ...) to stdout.
close <database-path>closes the database.
save-game <database-path> <pgn-game>saves the PGN game to given database, and sends the status.
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.
Some more basic functions...
Is this right?
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:
get-endgame-eval <fen>sends distance-to-conversion and/or distance-to-mate for given FEN to stdout
listlists the open database path followed by listing closed database paths (OR simply list database in the format
status path\n, your call)(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
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.
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?
It is not yet tested, therefore it is not yet released. Will be released later.
This means nothing else than tablebase support. Will be used in analysis window.
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.