=for Pod::Coverage empty

=head1 NAME

Chess::Opening::Book::Polyglot - Read polyglot opening books

=head1 SYNOPSIS

    $book = Chess::Opening::Book::Polyglot->new('opening.bin');
	$entry = $book->lookupFEN($fen) or die "position not found";
    
=head1 DESCRIPTION

The polyglot openning book format is a popular, open format for chess opening
libraries. B<Chess::Opening::Book::Polyglot> can be used for reading these
opening books.

A polyglot opening book consists of a list of chess positions, each with a
weighted list of possible continuation moves.  The "weight" is a measure
for the likelihood of a win after that particular move has been made.

There is no arbitrary limit on the size of an opening book that you can
read with B<Chess::Opening::Book::Polyglot> as the book is not read as a
whole but the positions are searched inside the file and only the relevant
part is loaded into memory.  This is implemented in a fairly efficient
manner.  However, if you want to use the module for a chess engine (which
you should'nt write in an interpreted language like Perl), you probably
want to optimize the lookup a bit.

=head1 METHODS

=over 4

=item B<new FILENAME>

The constructor takes one single argument, the B<FILENAME> of the opening
book on disk.  An exception is thrown if the file cannot be opened.

=item B<lookupFEN FEN>

See L<Chess::Opening::Book/lookupFEN>!

=back

=head1 COPYRIGHT

Copyright (C) 2019 Guido Flohr <guido.flohr@cantanea.com>,
all rights reserved.

=head1 SEE ALSO

L<Chess::Opening::Book>, L<Chess::Opening::Book::Entry>,
L<Chess::Opening::Book::Move>, perl(1)
