NAME
Chess::Opening::Book::Move - A move for an opening book entry.
SYNOPSIS
$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;
}
DESCRIPTION
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.
METHODS
- new KEY, VALUE, ...
-
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:
- weight
-
The weight of the move.
- count
-
An alias for weight(), see above.
- move
-
A textual representation of the move.
- learn
-
For private use, usually 0.
COPYRIGHT
Copyright (C) 2019 Guido Flohr <guido.flohr@cantanea.com>, all rights reserved.
SEE ALSO
Chess::Opening::Book, Chess::Opening::Book::Entry, Chess::Opening::Book::Move, perl(1)