|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.module.Module | +--org.moyoman.module.proverbs.igoproverbs.IgoProverbs
This module implements the Proverbs interface. It is responsible for generating moves from the proverbs of GO.
Field Summary | |
private static DebugType[] |
dt
The debug types that this module supports. |
private GoProverbs |
igo
an Igo class to find moves from the proverbs of GO. |
private boolean |
isGenerated
This flag is used to determine when to clear variables set by generateMove(). |
private Board |
lastBoard
The current Board module. |
private MoveDescriptorForest |
mdf
The sequences of moves recommended by proverbs. |
private ModuleType[] |
mt
The modules that this module requires. |
private RatedMove[] |
rm
The moves that were rated by this module. |
Fields inherited from class org.moyoman.module.Module |
|
Fields inherited from interface org.moyoman.module.proverbs.Proverbs |
CONFIDENCE |
Constructor Summary | |
IgoProverbs(GameId id,
ModuleName name)
Create the IgoProverbs object. |
Method Summary | |
private boolean |
addRated(Board board,
VecInt vec)
Return true if has moves to add. |
private boolean |
addRated(Board board,
VecInt vec,
float conf)
Return true if has moves to add. |
boolean |
capAnsKei(Board board)
Get rated moves from the proverb [Answer the capping play with a knight's move]. |
boolean |
centerOf3(Board board)
Get rated moves from the proverb [Play at the centre of three stones]. |
Object |
clone()
Clone the module. |
boolean |
extCross(Board board)
Get rated moves from the proverb [Crosscut then extend]. |
void |
generateMove(Module[] modules)
Generate the move for this module. |
Debug[] |
getDebugInformation(DebugType[] types)
Return the debug information for this module. |
DebugType[] |
getDebugTypes()
Return the types of debug information that this module supports. |
RatedMove[] |
getMoves()
Return the moves generated by the module. |
ModuleType[] |
getRequiredModuleList()
Return the modules that this module requires to perform its task. |
MoveDescriptorForest |
getSequences()
Return sequences of moves that are suggested or discouraged by a proverb. |
private boolean |
haneEnd2(Board board)
Get rated moves from the proverb [hane at the end of two stones]. |
boolean |
haneResAttach(Board board)
Get rated moves from the proverb [respond to attachment with hane]. |
boolean |
keiAnsKosu(Board board)
Get rated moves from the proverb [Answer keima with kosumi]. |
boolean |
keiTuki(Board board)
Get rated moves from the proverb [Cutting right through a knight's move is very big]. |
void |
makeMove(Move move,
Module[] modules)
Update the internal data structures of this module with the new move. |
boolean |
resKata(Board board)
Get rated moves from the proverb [never ignore a shoulder hit]. |
private void |
setData(Board board)
Set the data of the board to Igo. |
Methods inherited from class org.moyoman.module.Module |
checkTime, create, createHelper, debug, error, error, fatal, fatal, getAllHelpers, getHelper, getId, getKomi, getModule, getModuleName, getScheduler, information, setTime, warning, warning |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.moyoman.module.ModuleInterface |
getScheduler |
Field Detail |
private static DebugType[] dt
private ModuleType[] mt
private RatedMove[] rm
private boolean isGenerated
private MoveDescriptorForest mdf
private Board lastBoard
private GoProverbs igo
Constructor Detail |
public IgoProverbs(GameId id, ModuleName name) throws InternalErrorException
id
- The id of the game.name
- The name of this module.
InternalErrorException
- Thrown if the operation fails for any reason.Method Detail |
public void generateMove(Module[] modules)
generateMove
in class Module
modules
- An array of modules which this module needs
in order to perform its work. Those modules reflect the
current state of the board but are copies of the actual modules,
so this method is free to manipulate them.public Debug[] getDebugInformation(DebugType[] types)
getDebugInformation
in class Module
types
- Only return a subset of the debug types in this array.
public DebugType[] getDebugTypes()
getDebugTypes
in class Module
public RatedMove[] getMoves()
getMoves
in interface ModuleInterface
getMoves
in class Module
public ModuleType[] getRequiredModuleList()
getRequiredModuleList
in class Module
public void makeMove(Move move, Module[] modules)
makeMove
in class Module
move
- The move that was just made.modules
- The modules that this method needs to perform its job.public Object clone()
clone
in interface ModuleInterface
clone
in class Module
public MoveDescriptorForest getSequences()
getSequences
in interface Proverbs
private void setData(Board board)
board
- The Board module.private boolean addRated(Board board, VecInt vec)
vec
- Vector to store moves.private boolean addRated(Board board, VecInt vec, float conf)
vec
- Vector to store moves.conf
- The confidence in the rating, which varies between 0.0 and 1.0.private boolean haneEnd2(Board board)
board
- The Board module.
public boolean haneResAttach(Board board)
board
- The Board module.
public boolean resKata(Board board)
board
- The Board module.
public boolean keiTuki(Board board)
board
- The Board module.
public boolean extCross(Board board)
board
- The Board module.
public boolean capAnsKei(Board board)
board
- The Board module.
public boolean centerOf3(Board board)
board
- The Board module.
public boolean keiAnsKosu(Board board)
board
- The Board module.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |