net.pakl.rl
Class AgentParallelized

java.lang.Object
  extended by net.pakl.rl.Agent
      extended by net.pakl.rl.AgentParallelized

public class AgentParallelized
extends Agent

This class represents a multi-threaded agent (therefore faster if you have multiple CPUs) appropriate for reinforcement learning with full Value Iteration, since during value iteration each state can be updated independently of others (as long as testTrainSameVf is false).


Field Summary
protected  int threadsAtATime
           
 
Fields inherited from class net.pakl.rl.Agent
callNumber, DEFAULT_RANDOM_NUMBER_SEED, discountFactor, epsilon, greed, name, policy, printStartStateValueEvery, random, reinforcementFunction, state, UPDATE_ONLY_WHEN_GREEDY, world
 
Constructor Summary
AgentParallelized(int numThreads)
           
AgentParallelized(java.lang.String newName, int numThreads)
           
 
Method Summary
 ValueFunction performValueIteration(ValueFunction newValueFunction, ValueFunction valueFunction)
          This is the MAIN learning function in the Agent.
 
Methods inherited from class net.pakl.rl.Agent
experience, getAverageDelta, getBestActionForValueFrom, getDiscountFactor, getMaximumDelta, getName, getTotalDelta, initializeRandomSeed, performValueIterationTrajectorySample, performValueIterationUpdateOnState, setDiscountFactor, setEpsilon, setGreed, setPolicy, setReinforcementFunction, setState, setWorld
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threadsAtATime

protected int threadsAtATime
Constructor Detail

AgentParallelized

public AgentParallelized(java.lang.String newName,
                         int numThreads)

AgentParallelized

public AgentParallelized(int numThreads)
Method Detail

performValueIteration

public ValueFunction performValueIteration(ValueFunction newValueFunction,
                                           ValueFunction valueFunction)
Description copied from class: Agent
This is the MAIN learning function in the Agent.

Overrides:
performValueIteration in class Agent