|
|||||||||
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.AbstractEnvironment<K,P,A>
edu.columbia.cs.coms4701.agent.environments.grid.AbstractGridEnvironment<PenteAction,PentePercept,PenteAgent>
edu.columbia.cs.coms4701.agent.environments.pente.PenteEnvironment
public class PenteEnvironment
The Pente game environment.
Field Summary |
---|
Fields inherited from class edu.columbia.cs.coms4701.agent.environments.grid.AbstractGridEnvironment |
---|
map |
Fields inherited from class edu.columbia.cs.coms4701.agent.environments.simple.AbstractEnvironment |
---|
agents, counter, environmentObjects, environmentObservers |
Constructor Summary | |
---|---|
PenteEnvironment()
Constructs a new PenteEnvironment that will be of the given size. |
|
PenteEnvironment(PenteRules theRules)
Constructs a new PenteEnvironment that will be of the given size and use the given rules. |
Method Summary | |
---|---|
void |
addEnvironmentObject(EnvironmentObject theObject)
Customized to track the rules |
void |
agentDrivenChange(PenteAgent theAgent,
PenteAction theAction)
Changes the state of zero or more environment objects, given an agent and the action that the agent selected. |
void |
dynamicChange()
Customized to do the random assignment of turns |
void |
executeStep()
Performs one step of the simulated environment. |
void |
initialSetup()
Does the initial setup of the Pente environment. |
java.util.Set<PentePercept> |
perceptsForAgent(PenteAgent theAgent)
Returns a set (possibly empty) of percepts for the given agent. |
void |
startingToRunSetup()
Default first-run initialization. |
void |
updatePerformanceMeasures()
|
Methods inherited from class edu.columbia.cs.coms4701.agent.environments.grid.AbstractGridEnvironment |
---|
getMap |
Methods inherited from class edu.columbia.cs.coms4701.agent.environments.simple.AbstractEnvironment |
---|
addAgent, addEnvironmentObserver, getAgents, getCounter, getEnvironmentObjects, isDone, run |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.columbia.cs.coms4701.agent.environments.grid.GridEnvironment |
---|
getMap |
Methods inherited from interface edu.columbia.cs.coms4701.agent.Environment |
---|
addAgent, addEnvironmentObserver, getAgents, getCounter, getEnvironmentObjects, isDone, run |
Constructor Detail |
---|
public PenteEnvironment()
Note that the environment's GridMap is not actually constructed until #initialSetup is invoked. This permits observers to be attached first.
public PenteEnvironment(PenteRules theRules)
Note that the environment's GridMap is not actually constructed until #initialSetup is invoked. This permits observers to be attached first.
Method Detail |
---|
public void initialSetup()
initialSetup
in interface Environment<PenteAction,PentePercept,PenteAgent>
initialSetup
in class AbstractEnvironment<PenteAction,PentePercept,PenteAgent>
public void startingToRunSetup()
AbstractEnvironment
startingToRunSetup
in interface Environment<PenteAction,PentePercept,PenteAgent>
startingToRunSetup
in class AbstractEnvironment<PenteAction,PentePercept,PenteAgent>
public void addEnvironmentObject(EnvironmentObject theObject)
addEnvironmentObject
in interface Environment<PenteAction,PentePercept,PenteAgent>
addEnvironmentObject
in class AbstractGridEnvironment<PenteAction,PentePercept,PenteAgent>
theObject
- public void executeStep()
i.e.
This is customized for the Pente environment, because we need to
executeStep
in interface Environment<PenteAction,PentePercept,PenteAgent>
executeStep
in class AbstractEnvironment<PenteAction,PentePercept,PenteAgent>
public void dynamicChange()
dynamicChange
in interface Environment<PenteAction,PentePercept,PenteAgent>
dynamicChange
in class AbstractEnvironment<PenteAction,PentePercept,PenteAgent>
public void updatePerformanceMeasures()
public java.util.Set<PentePercept> perceptsForAgent(PenteAgent theAgent)
perceptsForAgent
in interface Environment<PenteAction,PentePercept,PenteAgent>
perceptsForAgent
in class AbstractEnvironment<PenteAction,PentePercept,PenteAgent>
public void agentDrivenChange(PenteAgent theAgent, PenteAction theAction)
agentDrivenChange
in interface Environment<PenteAction,PentePercept,PenteAgent>
agentDrivenChange
in class AbstractEnvironment<PenteAction,PentePercept,PenteAgent>
theAgent
- the agent that just selected an actiontheAction
- the action selected
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |