Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jchrest.lib
Class ChessDomain

    java.lang.Object
      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.
`static ListPattern` | `getSalientPieces(ListPattern pattern, java.lang.Boolean isExperienced)` Retrieve the salient pieces from the given pattern.
`static boolean` | `isBigPiece(ItemSquarePattern ios)` A 'big piece' is anything other than a pawn.
`static boolean` | `isOffensivePiece(ItemSquarePattern ios)` An 'offensive piece' is a piece on the other player's side.
`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.

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`

### constructBoard

    public static Scene constructBoard(java.lang.String definition)

  Construct a chess board given a string definition.

### isBigPiece

    public static boolean isBigPiece(ItemSquarePattern ios)

  A 'big piece' is anything other than a pawn. Used to indicate a salient piece for a novice chess player.

### isOffensivePiece

    public static boolean isOffensivePiece(ItemSquarePattern ios)

  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.

### getSalientPieces

    public static ListPattern getSalientPieces(ListPattern pattern,
                                               java.lang.Boolean isExperienced)

  Retrieve the salient pieces from the given pattern. The 'isExperienced' flag is used to indicate level of skill of model: isExperienced = false means use the 'isBigPiece' measure, isExperienced = true means use the 'isOffensivePiece' measure.

### 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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD