## edu.cwru.SimpleRTS.agent
Class ScriptedGoalAgent

    java.lang.Object
      edu.cwru.SimpleRTS.agent.Agent
          edu.cwru.SimpleRTS.agent.ScriptedGoalAgent

All Implemented Interfaces:
  java.io.Serializable

    public class ScriptedGoalAgent

extends Agent
implements java.io.Serializable

An agent based around the concept of build orders. Limited to a single concurrent goal Cannot fully handle new units that come in doing things Does not compensate for the possibility that a unit be both a gatherer/worker and a production unit (like a barracks/peasant)

See Also:
  Serialized Form

Nested Class Summary
`static class` `ScriptedGoalAgent.Goal` The goal and the means for achieving it.

Constructor Summary
`ScriptedGoalAgent(int playernumber, java.io.BufferedReader commandSource, java.util.Random r, boolean verbose)`

Method Summary
`com.google.common.collect.ImmutableMap.Builder<java.lang.Integer,Action>` `act(State.StateView state)`
`static java.lang.String` `getUsage()`
`com.google.common.collect.ImmutableMap.Builder<java.lang.Integer,Action>` `initialStep(State.StateView newstate)` Accept the initial state of an episode
`com.google.common.collect.ImmutableMap.Builder<java.lang.Integer,Action>` `middleStep(State.StateView newstate)` Accept an intermediate state of an episode
`void` `terminalStep(State.StateView newstate)` Receive notification that the episode has terminated.

Methods inherited from class edu.cwru.SimpleRTS.agent.Agent
`acceptInitialState, acceptMiddleState, acceptTerminalState, equals, getAction, getCountsTowardTermination, getPlayerNumber, hashCode, maxId, reserveIDsUpTo, setVerbose`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ScriptedGoalAgent

    public ScriptedGoalAgent(int playernumber,
                             java.io.BufferedReader commandSource,
                             java.util.Random r,
                             boolean verbose)

Method Detail

### initialStep

    public com.google.common.collect.ImmutableMap.Builder<java.lang.Integer,Action> initialStep(State.StateView newstate)

  Description copied from class: `Agent`
  Accept the initial state of an episode

  Specified by:
    `initialStep` in class `Agent`
  Parameters:
    `newstate` - The new state of the system

### middleStep

    public com.google.common.collect.ImmutableMap.Builder<java.lang.Integer,Action> middleStep(State.StateView newstate)

  Description copied from class: `Agent`
  Accept an intermediate state of an episode

  Specified by:
    `middleStep` in class `Agent`
  Parameters:
    `newstate` - The new state of the system

### terminalStep

    public void terminalStep(State.StateView newstate)

  Description copied from class: `Agent`
  Receive notification that the episode has terminated.

  Specified by:
    `terminalStep` in class `Agent`
  Parameters:
    `newstate` - The final state of the system

### act

    public com.google.common.collect.ImmutableMap.Builder<java.lang.Integer,Action> act(State.StateView state)
                                                                                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### getUsage

    public static java.lang.String getUsage()