|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The class that implements this interface will examine the board for ladders, and look for ladder breakers and ladder threats. A ladder breaker is defined as a stone as the same color as the group in the ladder which would cause the group to escape, regardless of whether the ladder already works or not. A ladder threat is similar but is a stone of the opposite color from the group in the ladder, which would cause the group to be captured. Note that the term ladder is used here to refer to situations where the group being attacked alternates between one and two liberties. This includes traditional ladders, and also situations such as where one side hanes on the first line, the other side puts that stone in atari, the first side connects, the second side does not connect, and the first side puts the stone on the first line in atari. Ladder techniques may fail to capture this stone, but the Tesuji or Tactics module might get the correct answer. Moves are only evaluated in the local context, so for example if there 8 moves that are ladder breakers, no attempt is made to rank the usefulness of any of these 8 moves.
Field Summary | |
static float |
CONFIDENCE
|
Method Summary | |
boolean |
canGroupPotentiallyBeCaught(SingleGroup sg)
Determine if the group is in a potential ladder and can be caught. |
Stone[] |
createLadder(SingleGroup sg)
Get the stones which would put the group into a ladder. |
Set |
getLadderBreakers(SingleGroup sg)
Get all stones which would enable the group to escape the ladder. |
Set |
getLadderThreats(SingleGroup sg)
Get any stone which would cause the group in the ladder to be captured.. |
SingleGroup[] |
groupsInLadder()
Get all of the groups which are currently in a ladder. |
SingleGroup[] |
groupsInPotentialLadder()
Get all of the groups which could be put in a ladder if the opponent moves next. |
boolean |
isGroupCaught(SingleGroup sg)
Determine if the group in the ladder can be captured. |
boolean |
isInLadder(SingleGroup sg)
Determine if the group is in a ladder. |
boolean |
isInPotentialLadder(SingleGroup sg)
Determine if the group is in a potential ladder. |
short |
totalMovesToCapture(SingleGroup sg)
Get the number of moves to capture the group. |
Methods inherited from interface org.moyoman.module.ModuleInterface |
clone, getMoves, getScheduler |
Field Detail |
public static final float CONFIDENCE
Method Detail |
public boolean isInLadder(SingleGroup sg)
sg
- The SingleGroup in question.
public boolean isInPotentialLadder(SingleGroup sg)
sg
- The SingleGroup in question.
public SingleGroup[] groupsInLadder()
public SingleGroup[] groupsInPotentialLadder()
public boolean isGroupCaught(SingleGroup sg) throws IllegalArgumentException
IllegalArgumentException
- Thrown if isInLadder(sg) would return false.public short totalMovesToCapture(SingleGroup sg) throws IllegalArgumentException
sg
- The SingleGroup that is captured.
IllegalArgumentException
- Thrown if the group is not in a
ladder or potential ladder, or if the ladder or potential ladder
does not work.public boolean canGroupPotentiallyBeCaught(SingleGroup sg)
public Set getLadderBreakers(SingleGroup sg) throws IllegalArgumentException
sg
- The group in question.
IllegalArgumentException
- Thrown if isInLadder(sg) would return false.public Set getLadderThreats(SingleGroup sg)
sg
- The group in question.
IllegalArgumentException
- Thrown if isInLadder(sg) would return false.public Stone[] createLadder(SingleGroup sg) throws IllegalArgumentException
sg
- The group in question.
IllegalArgumentException
- Thrown if isInPotentialLadder(sg) would return false.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |