de.tabacha.cgo.strategy
Class FiveTypes
java.lang.Object
de.tabacha.cgo.AbstractEngine
de.tabacha.cgo.strategy.NoRecursionTemplate
de.tabacha.cgo.strategy.FiveTypes
- All Implemented Interfaces:
- Constants, Engine
- public class FiveTypes
- extends NoRecursionTemplate
Strategy for ConwayGo.
Slow, but good for developing new strategies.
Distinguishes between five types of moves:
- offensive put: put a piece to have a wider jump
- offensive jump: jump as far as you can
- defensive jump: jump to prevent a good jump of the opponent
- passive put: put a piece to have a defensive jump next turn
- block: put a piece to shorten the opponent's jump
$Id: FiveTypes.java,v 1.16 2004/07/30 21:06:47 mk Exp $
- Version:
- $Revision: 1.16 $
- Threadsafe?
- false
Fields inherited from interface de.tabacha.cgo.Constants |
BALL, COL_COUNT, DCOL, DOWN, DROW, E, EMPTY, FIRST_DIRECTION, KICK_OFF_FIELD, LAST_DIRECTION, N, NE, NW, OPPOSITE, PIECE, ROW_COUNT, S, SE, SW, UP, UPSIDEDOWN, W |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FiveTypes
public FiveTypes()
- Constructor.
FiveTypes
public FiveTypes(boolean debug)
- Constructor.
- Parameters:
debug
- true for output debugging info
initNewMoveSearch
protected void initNewMoveSearch()
- Overrides:
initNewMoveSearch
in class NoRecursionTemplate
getVersion
public java.lang.String getVersion()
- Description copied from class:
AbstractEngine
- Returns the localized version of the version property.
If this property is the same for all languages or needs special treatment, overwrite this method.
- Specified by:
getVersion
in interface Engine
- Overrides:
getVersion
in class AbstractEngine
- See Also:
Engine.getVersion()
getAuthor
public java.lang.String getAuthor()
- Description copied from class:
AbstractEngine
- Returns the localized version of the author property.
If this property is the same for all languages or needs special treatment, overwrite this method.
- Specified by:
getAuthor
in interface Engine
- Overrides:
getAuthor
in class AbstractEngine
- See Also:
Engine.getAuthor()
setDebug
public void setDebug(boolean debug)
jumpFound
protected boolean jumpFound(Jump j,
int min,
int max)
- Specified by:
jumpFound
in class NoRecursionTemplate
- Returns:
- true if the move is found
putFound
protected boolean putFound(Put p)
- Specified by:
putFound
in class NoRecursionTemplate
- Returns:
- true if the move is found
bestMove
protected Move bestMove()
- Specified by:
bestMove
in class NoRecursionTemplate
toString
public java.lang.String toString()