org.rlcommunity.rlglue.codec
Class NetGlue
java.lang.Object
org.rlcommunity.rlglue.codec.NetGlue
- All Implemented Interfaces:
- RLGlueInterface
public class NetGlue
- extends java.lang.Object
- implements RLGlueInterface
This is the network connection for an experiment program that will talk to the
C/C++ rl_glue executable over sockets.
- Since:
- 2.0
- Author:
- btanner
Constructor Summary |
NetGlue()
|
NetGlue(java.lang.String host)
|
NetGlue(java.lang.String host,
int port)
Specify custom host and port to connect to rl_glue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NetGlue
public NetGlue()
- Since:
- 2.0
Sets default host and port
NetGlue
public NetGlue(java.lang.String host)
- Since:
- 2.0
Custom host, default port
NetGlue
public NetGlue(java.lang.String host,
int port)
- Specify custom host and port to connect to rl_glue
- Since:
- 2.0
RL_init
public java.lang.String RL_init()
- Specified by:
RL_init
in interface RLGlueInterface
RL_start
public Observation_action RL_start()
- Specified by:
RL_start
in interface RLGlueInterface
RL_env_start
public Observation RL_env_start()
- Specified by:
RL_env_start
in interface RLGlueInterface
RL_env_step
public Reward_observation_terminal RL_env_step(Action theAction)
- Specified by:
RL_env_step
in interface RLGlueInterface
RL_agent_start
public Action RL_agent_start(Observation theObservation)
- Specified by:
RL_agent_start
in interface RLGlueInterface
RL_agent_step
public Action RL_agent_step(double theReward,
Observation theObservation)
- Specified by:
RL_agent_step
in interface RLGlueInterface
RL_agent_end
public void RL_agent_end(double theReward)
- Specified by:
RL_agent_end
in interface RLGlueInterface
RL_step
public Reward_observation_action_terminal RL_step()
- Specified by:
RL_step
in interface RLGlueInterface
RL_cleanup
public void RL_cleanup()
- Specified by:
RL_cleanup
in interface RLGlueInterface
RL_agent_message
public java.lang.String RL_agent_message(java.lang.String message)
- Specified by:
RL_agent_message
in interface RLGlueInterface
RL_env_message
public java.lang.String RL_env_message(java.lang.String message)
- Specified by:
RL_env_message
in interface RLGlueInterface
RL_return
public double RL_return()
- Specified by:
RL_return
in interface RLGlueInterface
RL_num_steps
public int RL_num_steps()
- Specified by:
RL_num_steps
in interface RLGlueInterface
RL_num_episodes
public int RL_num_episodes()
- Specified by:
RL_num_episodes
in interface RLGlueInterface
RL_episode
public int RL_episode(int numSteps)
- Specified by:
RL_episode
in interface RLGlueInterface