Command Line Agent

class or_suite.agents.ambulance.command_line_metric.commandLineAgent(epLen)[source]

Allows the user to act as the agent by entering locations for each of the ambulances through the command line. Only works with the metric environment.

reset()[source]

clears data and call_locs which contain data on what has occurred so far in the environment

update_config()

(UNIMPLEMENTED)

pick_action(state, step)[source]

the user is prompted to enter a new location for each ambulance, and these locations are used as the action

epLen

(int) number of time steps to run the experiment for

data

(float list list) a list of all the states of the environment observed so far

call_locs

(float list) the locations of all calls observed so far

__init__(epLen)[source]
Parameters

epLen – (int) number of time steps to run the experiment for

greedy(state, timestep, epsilon=0)[source]

The user is prompted to choose an action by choosing a new location for each ambulance.

update_obs(obs, action, reward, newObs, timestep, info)[source]

adds newObs, the most recently observed state, to data adds the most recent call arrival, found in info[‘arrival’] to call_locs

update_policy(k)[source]

Update internal policy based upon records.

Not used, because action is chosen by user.