|
|||||||||||
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.bigpoint.simplebigpoint.SimpleBigPoint
This module generates bigpoints. These are points of high value in gote. For now this module only returns the hoshi points in the getBigpoints() method. The getMoves() returns an additional set of possible moves with a rating. These moves are near the hoshi an can be as valueable as the hoshi themselves or slightly less.
Field Summary | |
private static int |
boardSize
|
private Set |
bp
The bigpoint moves that were found by this module. |
private static DebugType[] |
dt
The debug types that this module supports. |
private static Point[] |
hoshi
|
private boolean |
isGenerated
|
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.bigpoint.BigPoint |
CONFIDENCE |
Constructor Summary | |
SimpleBigPoint(GameId id,
ModuleName name)
|
Method Summary | |
private ArrayList |
addRatedMovesForHoshi(Board b,
Point point)
Add moves near the hoshi point to the RatedMoves array. |
private RatedMove |
createRatedMove(Point pt,
Board board,
float rating)
Create a RatedMove object from a point. |
private void |
fillHoshiPointArray()
Get the hoshi points by their coordinates and put them into the hoshi 'member-array' |
void |
generateMove(Module[] modules)
Generate the move for this module. |
Set |
getBigPoints()
Get all of the big points on the board. |
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()
Get the, by getMoves(), generated list of RatedMoves |
ModuleType[] |
getRequiredModuleList()
Return the modules that this module requires to perform its task. |
private void |
investigateHoshiPoints(Board b)
Check all hoshi points to see if they are free still and if so add them to the set of BigPoints (bp), at the same time put the subHoshi that belongs to it in the set as well. |
boolean |
isBigPoint(Stone st)
Determine if the stone would occupy a big point. |
private boolean |
isEmpty(Board board,
int distance,
Point pt)
Determine if the specified area is empty. |
void |
makeMove(Move move,
Module[] modules)
Update the internal data structures of this module with the new move. |
private RatedMove[] |
toRatedMoveArray(ArrayList rated)
creates a RatedMove array from an ArrayList of ratedMoves. |
Methods inherited from class org.moyoman.module.Module |
checkTime, clone, 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 |
clone, getScheduler |
Field Detail |
private static DebugType[] dt
private static Point[] hoshi
private static int boardSize
private ModuleType[] mt
private RatedMove[] rm
private Set bp
private boolean isGenerated
Constructor Detail |
public SimpleBigPoint(GameId id, ModuleName name) throws InternalErrorException
id
- name
-
InternalErrorException
Method Detail |
private void fillHoshiPointArray()
public void generateMove(Module[] modules) throws InternalErrorException
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.
InternalErrorException
private void investigateHoshiPoints(Board b)
b
- The actual board to check for empty pointsprivate RatedMove[] toRatedMoveArray(ArrayList rated)
rated
-
private ArrayList addRatedMovesForHoshi(Board b, Point point)
point
- the hoshi to considerprivate RatedMove createRatedMove(Point pt, Board board, float rating)
pt
- The point to be made into a rated move.board
- The Board module.rating
- rating for this move.
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 Set getBigPoints()
BigPoint
getBigPoints
in interface BigPoint
private boolean isEmpty(Board board, int distance, Point pt)
board
- The Board module.distance
- The number of rows and columns to check out from
the point.pt
- The centre of the area to check.
public boolean isBigPoint(Stone st)
BigPoint
isBigPoint
in interface BigPoint
st
- A Stone object.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |