|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.game.search.AbstractSearch
public abstract class AbstractSearch
Provides base functionality for search algorithms.
Constructor Summary | |
---|---|
AbstractSearch()
|
Method Summary | |
---|---|
void |
configure(Properties properties,
int index)
Configure this search. |
protected int |
evaluate(IAgent agent,
IEvaluator evaluator,
IEnvironment environment,
IAdjudicator adjudicator,
int maxDepth,
int depth)
Return an evaluation of the given environment using the given parameters. |
int |
getNodesVisitedCount()
Return the nodes visited count. |
protected void |
incrementNodesVisited()
Increment the nodes visited count. |
protected abstract IAction |
performSearch(IAgent agent,
IAgent opponent,
IEnvironment environment,
IAdjudicator adjudicator,
IEvaluator evaluator,
IActionGenerator actionGenerator,
int maxDepth,
int depth,
int alpha,
int beta,
IAction parentAction)
Perform a search using the given parameters. |
protected void |
printActions(Collection actions,
int maxDepth,
int depth)
Print the given actions. |
protected void |
releaseActions(Collection actions)
Release the actions in the given list. |
void |
reset()
Reset this search. |
IAction |
search(IAgent agent,
IAgent opponent,
IEnvironment environment,
IAdjudicator adjudicator,
IEvaluator evaluator,
IActionGenerator actionGenerator,
int maxDepth,
int depth)
Perform a search using the given parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractSearch()
Method Detail |
---|
public void configure(Properties properties, int index) throws InstantiationException, IllegalAccessException
ISearch
configure
in interface ISearch
properties
- Properties.index
- Index of the agent to which this search belongs.
InstantiationException
- if the specified
ITranspositionKeyCreator
cannot
be instantiated.
IllegalAccessException
- if the specified
ITranspositionKeyCreator
class or
its no-arg constructor cannot be
accessed.public int getNodesVisitedCount()
ISearch
getNodesVisitedCount
in interface ISearch
public void reset()
ISearch
reset
in interface ISearch
public IAction search(IAgent agent, IAgent opponent, IEnvironment environment, IAdjudicator adjudicator, IEvaluator evaluator, IActionGenerator actionGenerator, int maxDepth, int depth)
ISearch
search
in interface ISearch
agent
- Agent.opponent
- Opposing agent.environment
- Environment.adjudicator
- Adjudicator.evaluator
- Evaluator.actionGenerator
- Action generator.maxDepth
- Maximum depth of search.depth
- Current depth of search.protected abstract IAction performSearch(IAgent agent, IAgent opponent, IEnvironment environment, IAdjudicator adjudicator, IEvaluator evaluator, IActionGenerator actionGenerator, int maxDepth, int depth, int alpha, int beta, IAction parentAction)
protected int evaluate(IAgent agent, IEvaluator evaluator, IEnvironment environment, IAdjudicator adjudicator, int maxDepth, int depth)
protected void incrementNodesVisited()
protected void printActions(Collection actions, int maxDepth, int depth)
actions
- maxDepth
- depth
- protected void releaseActions(Collection actions)
actions
- Actions list.
|
||||||||||
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 |