ResourceCollectionAgent

public class ResourceCollectionAgent extends Agent

This agent will first collect gold to produce a peasant, then the two peasants will collect gold and wood separately until reach goal.

Author:Feng

Fields

currentState

StateView currentState

Constructors

ResourceCollectionAgent

public ResourceCollectionAgent(int playernum, String[] arguments)

Methods

getUsage

public static String getUsage()

initialStep

public Map<Integer, Action> initialStep(StateView newstate, History.HistoryView statehistory)

loadPlayerData

public void loadPlayerData(InputStream is)

middleStep

public Map<Integer, Action> middleStep(StateView newState, History.HistoryView statehistory)

savePlayerData

public void savePlayerData(OutputStream os)

terminalStep

public void terminalStep(StateView newstate, History.HistoryView statehistory)