org.rlcommunity.rlglue.codec.util
Class AgentLoader

java.lang.Object
  extended by org.rlcommunity.rlglue.codec.util.AgentLoader
All Implemented Interfaces:
java.lang.Runnable

public class AgentLoader
extends java.lang.Object
implements java.lang.Runnable

This class can be called from the command line to load an agent and create an executable RL agent program. We've recently refactored it to make it useful if anyone ever wants to create local instances of network-bound agents from inside a JVM (like Matlab)

Author:
btanner

Constructor Summary
AgentLoader(AgentInterface theAgent)
           
AgentLoader(java.lang.String hostString, java.lang.String portString, AgentInterface theAgent)
           
 
Method Summary
 void killProcess()
           
static AgentLoader loadAgent(java.lang.String agentClassName)
          Loads the class agentClassName as an rl-glue agent.
static void main(java.lang.String[] args)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentLoader

public AgentLoader(AgentInterface theAgent)

AgentLoader

public AgentLoader(java.lang.String hostString,
                   java.lang.String portString,
                   AgentInterface theAgent)
Method Detail

loadAgent

public static AgentLoader loadAgent(java.lang.String agentClassName)
Loads the class agentClassName as an rl-glue agent. Doesn't make much sense to do the work in here... we can do it in a constructor and then get things straight about who is supposed to be setting things from the environment variables.

Parameters:
agentClassName -

killProcess

public void killProcess()

run

public void run()
Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception