vitro
Class RandomAgent<A extends Actor>
java.lang.Object
vitro.RandomAgent<A>
- All Implemented Interfaces:
- Agent<A>
public class RandomAgent<A extends Actor>
- extends Object
- implements Agent<A>
A generic Agent implementation which always
chooses randomly from the available options.
Frequently useful for debugging.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomAgent
public RandomAgent()
choose
public Action choose(A actor,
Set<Action> options)
- Description copied from interface:
Agent
- Select an action from the available options.
- Specified by:
choose
in interface Agent<A extends Actor>
- Parameters:
actor
- the Actor for whom a decision is being made.options
- the available Actions for the Actor.
- Returns:
- the Action this Actor will take.