(create-book & filenames)
Creates an opening book from the provided input files (in PGN or ECN format). The book is stored in memory, use write-book afterwards to save the book to a binary file.
Note that creating books from large game files consumes a huge amount of memory, you may have to increase your Java heap size.
Creates an opening book from the provided input files (in PGN or ECN format). The book is stored in memory, use write-book afterwards to save the book to a binary file. Note that creating books from large game files consumes a huge amount of memory, you may have to increase your Java heap size.
(create-book-from-db db-spec & [drop-chunks take-chunks])
Creates an opening book from the SQLite games database provided in the parameter. The parameter should be a jdbc.core db-spec, i.e. a map of the form `{:subprotocol "sqlite", :subname "/path/to/gamesdb.db"}.
Creates an opening book from the SQLite games database provided in the parameter. The parameter should be a jdbc.core db-spec, i.e. a map of the form `{:subprotocol "sqlite", :subname "/path/to/gamesdb.db"}.
(find-book-entries board & book-file-names)
Returns a list of all book entries for the given input board, read from the supplied book files.
Returns a list of all book entries for the given input board, read from the supplied book files.
(merge-book-files output-file-name & file-names)
Merge a number of opening books to a single large book. Doesn't work for compact books, for now. This function is functionally almost identical to merge-books, except that merge-book-files is memory friendly, but also much slower.
Merge a number of opening books to a single large book. Doesn't work for compact books, for now. This function is functionally almost identical to merge-books, except that merge-book-files is memory friendly, but also much slower.
(merge-books output-file & input-files)
Merge a number of opening books to a single large book. Doesn't work for compact books, for now.
Merge a number of opening books to a single large book. Doesn't work for compact books, for now.
(pick-book-move board & book-file-names)
Pick a random book move from the board position, based on their probabilities. Returns nil if no book move is found.
Pick a random book move from the board position, based on their probabilities. Returns nil if no book move is found.
(write-book book-entries
filename
&
{:keys [purge compact] :or {purge false compact false}})
Writes book entries to a binary file on disk. The book-entries parameter should be the value returned by an earlier call to create-book. If 'purge' is true, entries with low book scores or a very low number of games are discarded. If 'compact' is true, the book is written in a more compact format, where win/draw/loss statistics, maximum Elos and last played dates are not included.
Writes book entries to a binary file on disk. The book-entries parameter should be the value returned by an earlier call to create-book. If 'purge' is true, entries with low book scores or a very low number of games are discarded. If 'compact' is true, the book is written in a more compact format, where win/draw/loss statistics, maximum Elos and last played dates are not included.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close