|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.game.AbstractAgent
org.vizzini.game.AbstractComputerAgent
public abstract class AbstractComputerAgent
Provides base functionality for computer agents in the game framework. A computer agent instance encapsulates the logic a computer agent uses to create actions. Examples of this logic are simple coding, a minimax algorithm, or neural network based.
Field Summary |
---|
Fields inherited from interface org.vizzini.game.IAgent |
---|
NAME_PROPERTY, TEAM_PROPERTY |
Constructor Summary | |
---|---|
AbstractComputerAgent()
|
Method Summary | |
---|---|
void |
addBusyListener(IBusyListener listener)
Add the given listener. |
void |
configure(Properties properties,
int index)
Configure this agent. |
int |
evaluate(IEnvironment environment,
IAdjudicator adjudicator)
Evaluate the given environment for fitness from the perspective of this agent. |
IActionGenerator |
getActionGenerator()
Return the action generator. |
protected BusyManager |
getBusyManager()
Return the busy manager. |
IEvaluator |
getEvaluator()
Return the evaluator. |
boolean |
isBusy()
Return true if this is busy. |
void |
removeBusyListener(IBusyListener listener)
Remove the given listener. |
protected void |
setActionGenerator(IActionGenerator actionGenerator)
Set the action generator. |
protected void |
setBusy(boolean isBusy)
Set the busy flag with the given value. |
protected void |
setEvaluator(IEvaluator evaluator)
Set the evaluator. |
Methods inherited from class org.vizzini.game.AbstractAgent |
---|
addConcedeListener, addPropertyChangeListener, addScoreListener, addToScore, concede, equals, getConcedeManager, getIndex, getName, getProperties, getPropertyChangeManager, getScore, getScoreManager, getTeam, getTokenCollection, getTokenCollectionClass, hashCode, incrementScore, removeConcedeListener, removePropertyChangeListener, removeScoreListener, reset, setName, setScore, setTeam, setTokenCollectionClass, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.vizzini.game.IAgent |
---|
addConcedeListener, addPropertyChangeListener, addScoreListener, addToScore, concede, getAction, getName, getScore, getTeam, getTokenCollection, incrementScore, removeConcedeListener, removePropertyChangeListener, removeScoreListener, reset, setName, setScore, setTeam |
Constructor Detail |
---|
public AbstractComputerAgent()
Method Detail |
---|
public void addBusyListener(IBusyListener listener)
addBusyListener
in interface IComputerAgent
public void configure(Properties properties, int index) throws InstantiationException, IllegalAccessException
configure
in interface IAgent
configure
in class AbstractAgent
InstantiationException
IllegalAccessException
public int evaluate(IEnvironment environment, IAdjudicator adjudicator)
evaluate
in interface IComputerAgent
environment
- Environment to evaluate.adjudicator
- Adjudicator.public IActionGenerator getActionGenerator()
getActionGenerator
in interface IComputerAgent
public IEvaluator getEvaluator()
getEvaluator
in interface IComputerAgent
public boolean isBusy()
isBusy
in interface IComputerAgent
public void removeBusyListener(IBusyListener listener)
removeBusyListener
in interface IComputerAgent
protected BusyManager getBusyManager()
protected void setActionGenerator(IActionGenerator actionGenerator)
protected void setBusy(boolean isBusy)
protected void setEvaluator(IEvaluator evaluator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |