Experiment File

class or_suite.experiment.experiment.Experiment(env, agent, dict)[source]

Optional instrumentation for running an experiment.

Runs a simulation between an arbitrary openAI Gym environment and an algorithm, saving a dataset of (reward, time, space) complexity across each episode, and optionally saves trajectory information.

seed

random seed set to allow reproducibility

dirPath

(string) location to store the data files

nEps

(int) number of episodes for the simulation

deBug

(bool) boolean, when set to true causes the algorithm to print information to the command line

env

(openAI env) the environment to run the simulations on

epLen

(int) the length of each episode

numIters

(int) the number of iterations of (nEps, epLen) pairs to iterate over with the environment

save_trajectory

(bool) boolean, when set to true saves the entire trajectory information

render_flag

(bool) boolean, when set to true renders the simulations

agent

(or_suite.agent.Agent) an algorithm to run the experiments with

data

(np.array) an array saving the metrics along the sample paths (rewards, time, space)

trajectory_data

(list) a list saving the trajectory information

run()[source]

Runs the simulations between an environment and an algorithm

save_data()[source]

Saves the acquired dataset to the noted location

Returns

dataframe corresponding to the saved data