|
||||||||||
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
org.vizzini.game.search.SearchAgent
public class SearchAgent
Provides a computer agent which uses an AI search algorithm to determine the best action.
Field Summary |
---|
Fields inherited from interface org.vizzini.game.IAgent |
---|
NAME_PROPERTY, TEAM_PROPERTY |
Constructor Summary | |
---|---|
SearchAgent()
|
Method Summary | |
---|---|
void |
configure(Properties properties,
int index)
Configure this agent. |
IAction |
getAction(IEnvironment environment,
IAdjudicator adjudicator)
Return the action determined through consideration of the given environment using the given adjudicator. |
int |
getDepth()
Return the search depth. |
int |
getNodesVisitedCount()
Return the nodes visited count. |
protected ISearch |
getSearch()
Return the search algorithm. |
void |
setDepth(int depth)
Set the search depth. |
protected void |
setSearch(ISearch search)
Set the search algorithm. |
Methods inherited from class org.vizzini.game.AbstractComputerAgent |
---|
addBusyListener, evaluate, getActionGenerator, getBusyManager, getEvaluator, isBusy, removeBusyListener, setActionGenerator, setBusy, setEvaluator |
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.IComputerAgent |
---|
addBusyListener, evaluate, getActionGenerator, getEvaluator, isBusy, removeBusyListener |
Methods inherited from interface org.vizzini.game.IAgent |
---|
addConcedeListener, addPropertyChangeListener, addScoreListener, addToScore, concede, getName, getScore, getTeam, getTokenCollection, incrementScore, removeConcedeListener, removePropertyChangeListener, removeScoreListener, reset, setName, setScore, setTeam |
Constructor Detail |
---|
public SearchAgent()
Method Detail |
---|
public void configure(Properties properties, int index) throws InstantiationException, IllegalAccessException
configure
in interface IAgent
configure
in interface ISearchAgent
configure
in class AbstractComputerAgent
InstantiationException
IllegalAccessException
public IAction getAction(IEnvironment environment, IAdjudicator adjudicator)
getAction
in interface IAgent
environment
- The current environment.adjudicator
- Adjudicator for determining legal actions.public int getDepth()
getDepth
in interface ISearchAgent
public int getNodesVisitedCount()
getNodesVisitedCount
in interface ISearchAgent
public void setDepth(int depth)
setDepth
in interface ISearchAgent
protected ISearch getSearch()
protected void setSearch(ISearch search)
|
||||||||||
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 |