|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.coms4701.agent.environments.simple.SimpleEnvironmentObject
edu.columbia.cs.coms4701.agent.environments.simple.SimpleAgent<PenteAction,PentePercept>
edu.columbia.cs.coms4701.agent.environments.pente.PenteAgent
public class PenteAgent
A Pente game-playing agent. Each agent is assigned a turn number (0,1,2,3), indicating its position in the turn-taking. Player zero plays first and uses black stones; player one plays second and uses white stones, etc.
Field Summary | |
---|---|
static Stone.StoneColor[] |
COLORS
Player colors, in order by turn number. |
Fields inherited from class edu.columbia.cs.coms4701.agent.environments.simple.SimpleEnvironmentObject |
---|
changeSupport |
Constructor Summary | |
---|---|
PenteAgent()
|
Method Summary | |
---|---|
Stone.StoneColor |
getColor()
Returns the color for this player, which is determined by the turn number. |
int |
getMaximumSearchDepth()
Returns the maximum search depth for this player. |
int |
getNumberOfCaptures()
Indicates how many captures this agent has achieved. |
int |
getNumberOfTimeLimitViolations()
Returns how many times this player has violated the soft time limit |
java.lang.String |
getRuleViolation()
|
int |
getTurnNumber()
Gets the turn number assigned to this agent. |
boolean |
getViolatedARule()
|
void |
incrementNumberOfCaptures()
Increment the capture counter |
void |
incrementNumberOfTimeLimitViolations()
|
boolean |
isGotStonesInARow()
Returns whether this player has gotten enough stones in a row to win. |
void |
setGotStonesInARow(boolean gotStonesInARow)
Setter for recording the fact that an agent has won by putting stones in a row. |
void |
setMaxSearchDepth(int maxSearchDepth)
Setter for max search depth. |
void |
setNumberOfTimeLimitViolations(int newNumber)
|
void |
setRuleViolation(java.lang.String ruleViolation)
|
void |
setTurnNumber(int theTurnNumber)
Setter for turn number. |
void |
setViolatedARule(boolean violatedARule,
java.lang.String ruleName)
|
Methods inherited from class edu.columbia.cs.coms4701.agent.environments.simple.SimpleAgent |
---|
getAgentProgram, getAuthor, getDescription, getPerformanceMeasure, nextAction, setAgentProgram, setPerformanceMeasure, toString |
Methods inherited from class edu.columbia.cs.coms4701.agent.environments.simple.SimpleEnvironmentObject |
---|
addPropertyChangeListener, isAlive, removePropertyChangeListener, setAlive |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.columbia.cs.coms4701.agent.Agent |
---|
getAgentProgram, getAuthor, getDescription, getPerformanceMeasure, nextAction, setAgentProgram, setPerformanceMeasure |
Methods inherited from interface edu.columbia.cs.coms4701.agent.EnvironmentObject |
---|
addPropertyChangeListener, isAlive, removePropertyChangeListener, setAlive |
Field Detail |
---|
public static final Stone.StoneColor[] COLORS
Constructor Detail |
---|
public PenteAgent()
Method Detail |
---|
public int getNumberOfCaptures()
public void incrementNumberOfCaptures()
public int getTurnNumber()
public void setTurnNumber(int theTurnNumber)
public int getMaximumSearchDepth()
public void setMaxSearchDepth(int maxSearchDepth)
maxSearchDepth
- public Stone.StoneColor getColor()
public boolean isGotStonesInARow()
public void setGotStonesInARow(boolean gotStonesInARow)
gotStonesInARow
- public int getNumberOfTimeLimitViolations()
public void incrementNumberOfTimeLimitViolations()
public void setNumberOfTimeLimitViolations(int newNumber)
public boolean getViolatedARule()
public void setViolatedARule(boolean violatedARule, java.lang.String ruleName)
public java.lang.String getRuleViolation()
public void setRuleViolation(java.lang.String ruleViolation)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |