org.moyoman.module.territory
Interface SingleTerritory

All Superinterfaces:
Cloneable, Serializable

public interface SingleTerritory
extends Cloneable, Serializable

A class which implements this interface is responsible for determining properties of a single area of territory. This includes tasks such as determining which points are in the territory, the expected value of the territory, and possible followup moves.


Method Summary
 float getCount()
          Get an estimate of the amount of territory.
 float getCountIfFriendlyMoveNext()
          Get an estimate of the amount of territory.
 float getCountIfOpponentMoveNext()
          Get an estimate of the amount of territory.
 Set getFollowupFriendlyMoves()
          Get all of the moves that might be made to solidify the territory.
 Set getFollowupOpponentMoves()
          Get all of the moves that might be made to reduce or invade the territory.
 int getMaximumCount()
          Get the maximum amount of territory that could occur here.
 Set getPoints()
          Get the points which might be part of the territory.
 float getValueOfFriendlyMove(Stone stone)
          Determine how many points of territory the given move creates.
 float getValueOfOpponentsMove(Stone stone)
          Determine how many points of territory the given move removes.
 

Method Detail

getPoints

public Set getPoints()
Get the points which might be part of the territory. This is the set of points which would be territory if the opponent does not make a reducing move.

Returns:
A Set containing the possible points of territory.

getMaximumCount

public int getMaximumCount()
Get the maximum amount of territory that could occur here. This should return the same as getPoints().size();.

Returns:
The maximum amount of territory in the current area.

getCount

public float getCount()
Get an estimate of the amount of territory. This method assumes best play in the local area, but makes no assumption about which side plays first.

Returns:
A float which is an estimate of the territory.

getCountIfFriendlyMoveNext

public float getCountIfFriendlyMoveNext()
Get an estimate of the amount of territory. This method assumes that the side surrounding the territory makes the first move.

Returns:
A float which is an estimate of the territory.

getCountIfOpponentMoveNext

public float getCountIfOpponentMoveNext()
Get an estimate of the amount of territory. This method assumes that the opponent of the side surrounding the territory makes the first move.

Returns:
A float which is an estimate of the territory.

getFollowupFriendlyMoves

public Set getFollowupFriendlyMoves()
Get all of the moves that might be made to solidify the territory.

Returns:
A Set containing Stone objects.

getFollowupOpponentMoves

public Set getFollowupOpponentMoves()
Get all of the moves that might be made to reduce or invade the territory.

Returns:
A Set containing Stone objects.

getValueOfFriendlyMove

public float getValueOfFriendlyMove(Stone stone)
Determine how many points of territory the given move creates.

Parameters:
stone - The move being evaluated.
Returns:
A float which is the incremental value of the move.

getValueOfOpponentsMove

public float getValueOfOpponentsMove(Stone stone)
Determine how many points of territory the given move removes.

Parameters:
stone - The move being evaluated.
Returns:
A float which is the decremental value of the move.