NAME
Games::Chess::Coverage - Expose the potential energy states of a chess game
VERSION
This document refers to $Revision: 1.16 $ of $RCSfile: Coverage.pm,v $ last revised by $Author: gene $ on $Date: 2004/05/09 19:39:18 $.
SYNOPSIS
use Games::Chess::Coverage;
$g = Games::Chess::Coverage->new;
$g = Games::Chess::Coverage->new( fen => $fen_string );
$g = Games::Chess::Coverage->new( game => $games_chess_object );
$pieces = $g->pieces;
$states = $g->states;
DESCRIPTION
A Games::Chess::Coverage object represents a chess game in terms of move and capture states by location.
A piece's coverage extends within it's limit of mobility or until a collision occurs with another piece.
In my mind this module:
Is a chess analysis laboratory
Measures potential energy
Represents tension as a landscape
Shows footprint interference patterns (trends?)
Delineates power stuggle
Looks cool when visualized :-)
Note: This is not a chess playing module. It simply returns the state of a chess board. If you want to know what the coverage might be in say five ply, you must generate the FEN (or Games::Chess
object) first. Please see "TO DO" for more details.
PUBLIC METHODS
CONSTRUCTOR
new
$g = Games::Chess::Coverage->new( %attributes );
Create a new Games::Chess::Coverage object based on the following optional attributes provided to the constructor as named parameters:
Key Default ________________ verbose => 0 game => new Games::Chess::Position fen => rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
That is, calling the constructor with no arguments creates a new
Games::Chess
object with the traditional starting board position.
ACCESSORS
pieces
$pieces = $g->pieces;
This method returns a hash reference of the game coverage object's
Games::Chess::Piece
's keyed by their location.states
$states = $g->states;
This method returns a hash reference of board location states.
CONVENIENCE METHODS
warp_spacetime
$g->warp_spacetime( $manifold );
Warp local space-time.
EXAMPLES
Coming soon to a theatre near you...
Until then, take a look at the eg directory in this distribution.
And for all you web browsers out there:A contrived showdown in eg/.
A contrived showdown at CPAN.
TO DO
Represent pawn promotion.
Make this tiny and fast with bit vector matrix calculations.
Use Chess::PGN::Filter
and build a list of coverages for entire games in PGN.
Output ChessGML.
SEE ALSO
This is a great site:
http://www.chessclub.demon.co.uk/tutorial/beginner/intro/intro.htm
Of course there is also
http://mathworld.wolfram.com/Chess.html
This is a related (possibly mathematically equivalent) concept:
http://www.users.globalnet.co.uk/~perry/maths/chessgraph/chessgraph.htm
Here is a chess glossary with many analysis terms:
http://www.jeremysilman.com/chess_glossary/glossary_chess_terms_a.html
What document on visualization would be complete without references to Edward R. Tufte?
http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=00013l&topic_id=1&topic=Ask%20E%2eT%2e
and http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000Mn&topic_id=1&topic=Ask%20E%2eT%2e
And what chess module about analysis would be complete without a reference to the Canon of educational chess games?
http://www.ex.ac.uk/~dregis/DR/Canon/canonidx.html
DEDICATION
My chess playing Brother, Aaron. Hi Aaron. :-)
AUTHOR
Gene Boggs <gene@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2004, Gene Boggs
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
CVS
$Id: Coverage.pm,v 1.16 2004/05/09 19:39:18 gene Exp $