|Constructor and Description|
|Modifier and Type||Method and Description|
Take your turn for each round by calling
The game engine will call this method to provide this Agent with an Actor, which the Agent uses to make moves in the game and get information from the game.
protected PrisonersDilemmaActor actor
public void setActor(PrisonersDilemmaActor actor)
This method is called before the game begins. The game engine does not
PrisonersDilemmaAgent.run() until after
has successfully exited.
In many cases you can extend
Adapter, which implements this
method for you.
public abstract void run()
Actor#act(). That method blocks until the other player has also acted and the results of the round (an
IterationResult) are available. The
act()method then returns that IterationResult.
run() shouldn't exit as long as actor.getGame().isOver() is false.
If it does, the game is void and you'll receive notice of your agent's premature exit.