Chess::Opening::Book::Move - A move for an opening book entry.
$book = Chess::Opening::Book::Polyglot->new('opening.bin'); $entry = $book->lookupFEN($fen) or die "position not found"; $moves = $entry->moves; foreach (keys %$moves) { my $move = $moves->{$_}; $weight = $move; }
A Chess::Opening::Book::Move is one of the possible moves listed for a certain position in a Chess::Opening::Book.
Each move has a "weight" resp. "count" property that specifies the number of times that move has been successfully played for a specific position. You can compare this information with the weight of other moves for the same position in order to estimate the likelihood of success, when picking this move.
You should normally not use the constructor. It is called by the Chess::Opening::Book that you query.
The constructor accepts the following named arguments:
The weight of the move.
An alias for weight(), see above.
A textual representation of the move.
For private use, usually 0.
Copyright (C) 2019 Guido Flohr <guido.flohr@cantanea.com>, all rights reserved.
Chess::Opening::Book, Chess::Opening::Book::Entry, Chess::Opening::Book::Move, perl(1)
To install Chess::Opening, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chess::Opening
CPAN shell
perl -MCPAN -e shell install Chess::Opening
For more information on module installation, please visit the detailed CPAN module installation guide.