jchrest.lib
Class ChessDomain

java.lang.Object
  extended by jchrest.lib.ChessDomain
All Implemented Interfaces:
DomainSpecifics

public class ChessDomain
extends java.lang.Object
implements DomainSpecifics

The ChessDomain is used for chess modelling.


Constructor Summary
ChessDomain()
           
 
Method Summary
static Scene constructBoard(java.lang.String definition)
          Construct a chess board given a string definition.
 java.util.Set<Square> getBigPieces(Scene scene)
          Returns the set of big pieces in given scene.
 java.util.Set<Square> getOffensivePieces(Scene scene)
          Return the set of offensive pieces in given scene.
 ListPattern normalise(ListPattern pattern)
          Sort given list pattern into a canonical order of chess pieces, as defined in deGroot and Gobet (1996).
 java.util.List<Square> proposeMovementFixations(Scene board, Square square)
          Calculate a list of possible destination squares for a piece in a scene.
 java.util.Set<Square> proposeSalientSquareFixations(Scene scene, Chrest model)
          Use level of expertise to determine saliency.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChessDomain

public ChessDomain()
Method Detail

normalise

public ListPattern normalise(ListPattern pattern)
Sort given list pattern into a canonical order of chess pieces, as defined in deGroot and Gobet (1996). The order is: P p K k B b N n Q q R r If the pieces are the same, then order is based on column, and then on row.

Specified by:
normalise in interface DomainSpecifics

proposeSalientSquareFixations

public java.util.Set<Square> proposeSalientSquareFixations(Scene scene,
                                                           Chrest model)
Use level of expertise to determine saliency.

Specified by:
proposeSalientSquareFixations in interface DomainSpecifics

constructBoard

public static Scene constructBoard(java.lang.String definition)
Construct a chess board given a string definition. Order should be in FEN style, with row 8 (black side) first. Empty square indicated with full stop - counts of empty squares not permitted.


getBigPieces

public java.util.Set<Square> getBigPieces(Scene scene)
Returns the set of big pieces in given scene. A 'big piece' is anything other than a pawn. Used to indicate a salient piece for a novice chess player.


getOffensivePieces

public java.util.Set<Square> getOffensivePieces(Scene scene)
Return the set of offensive pieces in given scene. An 'offensive piece' is a piece on the other player's side. e.g. a black piece on white's side of the board. Used to indicate a salient piece for an inexperienced chess player.


proposeMovementFixations

public java.util.List<Square> proposeMovementFixations(Scene board,
                                                       Square square)
Calculate a list of possible destination squares for a piece in a scene.

Specified by:
proposeMovementFixations in interface DomainSpecifics