MCPcopy Create free account

hub / github.com/AboudyKreidieh/h-baselines / functions

Functions825 in github.com/AboudyKreidieh/h-baselines

↓ 114 callersMethodrun
See parent class.
setup.py:27
↓ 84 callersMethodupdate
Perform a gradient update step. **Note**; The target update soft updates occur at the same frequency as the actor update frequencies.
hbaselines/fcnet/td3.py:490
↓ 61 callersFunctionget_trainable_vars
Return the trainable variables. Parameters ---------- name : str the scope Returns ------- list of tf.Variable
hbaselines/utils/tf_util.py:37
↓ 44 callersFunctiontest_space
Test the shape and bounds of an action or observation space. Parameters ---------- gym_space : gym.spaces.Box gym space object to
tests/fast_tests/test_utils.py:2957
↓ 43 callersFunctionget_meta_ac_space
Compute the action space for the higher level policies. Parameters ---------- ob_space : gym.spaces.* the observation space of th
hbaselines/utils/env_util.py:815
↓ 38 callersFunctiontest_space
Test that an action or observation space is the correct size and bounds. Parameters ---------- gym_space : gym.spaces.Box gym spa
tests/fast_tests/test_envs.py:2486
↓ 35 callersMethodreset
Reset the environment.
hbaselines/envs/point2d.py:250
↓ 30 callersMethodinitialize
See parent class. This method initializes the target parameters to match the model parameters.
hbaselines/fcnet/td3.py:601
↓ 26 callersMethodadd
Add a new transition to the buffer. Parameters ---------- obs_t : Any the last observation action : array
hbaselines/fcnet/replay_buffer.py:91
↓ 26 callersFunctionget_state_indices
Return the state indices for the intrinsic rewards. This assigns the indices of the state that are assigned goals, and subsequently rewarded
hbaselines/utils/env_util.py:853
↓ 25 callersMethod_get_obs
Return the observation of the agent. See States in the description of the environment for more.
hbaselines/envs/point2d.py:276
↓ 23 callersMethodsample
Sample a batch of experiences. Returns ------- array_like batch of observations array_like ba
hbaselines/fcnet/replay_buffer.py:118
↓ 21 callersFunctionreduce_std
Get the standard deviation of a Tensor. Parameters ---------- tensor : tf.Tensor or tf.Variable the input tensor axis : int o
hbaselines/utils/tf_util.py:71
↓ 19 callersMethod_update_meta
Determine whether a meta-policy should update its action. This is done by checking the length of the observation lists that are passe
hbaselines/goal_conditioned/base.py:764
↓ 19 callersFunctionset_seed
Set the random seed for testing purposes.
tests/fast_tests/test_envs.py:2551
↓ 18 callersFunctioncreate_env
Return, and potentially create, the environment. Parameters ---------- env : str or gym.Env the environment, or the name of a reg
hbaselines/utils/env_util.py:891
↓ 18 callersFunctionget_hyperparameters
Return the hyperparameters of a training algorithm from the parser.
hbaselines/utils/train.py:19
↓ 18 callersFunctionparse_options
Parse training options user can specify in command line. Parameters ---------- description : str the description of the script us
hbaselines/utils/train.py:156
↓ 18 callersMethodupdate
Perform a gradient update step. Parameters ---------- update_actor : bool specifies whether to update the actor p
hbaselines/multiagent/base.py:196
↓ 16 callersFunctioncreate_conv
Create a convolutional network. Parameters ---------- obs : tf.Variable the input to the model image_height : int the
hbaselines/utils/tf_util.py:614
↓ 16 callersFunctioncreate_fcnet
Create a fully-connected neural network model. Parameters ---------- obs : tf.Variable the input to the model layers : list o
hbaselines/utils/tf_util.py:526
↓ 14 callersFunctionnegative_distance
Return the negative euclidean distance between next_states and goals. Parameters ---------- states : array_like A (num_state_dims
hbaselines/utils/reward_fns.py:12
↓ 13 callersMethodstore_transition
See parent class.
hbaselines/fcnet/td3.py:587
↓ 11 callersMethod__init__
Initialize the Ant Maze environment. Parameters ---------- use_contexts : bool, optional specifies whether to add
hbaselines/envs/efficient_hrl/envs.py:484
↓ 11 callersMethod_get_ob_dim
Return the processed observation dimension. If the context space is not None, it is included in the computation of this term.
hbaselines/base_policies/policy.py:274
↓ 10 callersMethod_pretrain_level
Check whether the current level should be training. When using `pretrain_worker` the lowest level policy is trained every step, and h
hbaselines/goal_conditioned/base.py:845
↓ 10 callersMethod_sample
Sample indices from a list.
hbaselines/fcnet/ppo.py:774
↓ 10 callersFunctionlayer
Create a fully-connected layer. Parameters ---------- val : tf.Variable the input to the layer num_outputs : int numb
hbaselines/utils/tf_util.py:381
↓ 10 callersFunctionprint_params_shape
Print parameter shapes and number of parameters. Parameters ---------- scope : str scope containing the parameters param_type
hbaselines/utils/tf_util.py:365
↓ 10 callersMethodrl_ids
Return the IDs of the currently observed and controlled RL vehicles. This is static in closed networks and dynamic in open networks.
hbaselines/envs/mixed_autonomy/envs/av.py:239
↓ 10 callersMethodsample
Sample a batch of experiences. Returns ------- array_like (batch_size, obs_dim) batch of observations arr
hbaselines/multiagent/replay_buffer.py:174
↓ 9 callersMethod_sample
Sample indices from a list.
hbaselines/fcnet/trpo.py:942
↓ 9 callersMethodintrinsic_reward_fn
(states, goals, next_states)
hbaselines/goal_conditioned/base.py:409
↓ 8 callersMethodcan_sample
Check if n_samples samples can be sampled from the buffer. Returns ------- bool True if enough sample exist, Fals
hbaselines/fcnet/replay_buffer.py:71
↓ 8 callersMethodcan_sample
Check if n_samples samples can be sampled from the buffer. Returns ------- bool True if enough sample exist, Fals
hbaselines/multiagent/replay_buffer.py:99
↓ 8 callersMethodget_action
See parent class.
hbaselines/fcnet/td3.py:563
↓ 8 callersMethodis_full
Check whether the replay buffer is full or not. Returns ------- bool True if it is full, False otherwise
hbaselines/fcnet/replay_buffer.py:81
↓ 8 callersMethodstep
Advance the simulation by one step. Parameters ---------- velocities : array_like the action by the agent, define
hbaselines/envs/point2d.py:185
↓ 7 callersFunctionconv_layer
Create a convolutional layer. Parameters ---------- val : tf.Variable the input to the layer filters : int the number
hbaselines/utils/tf_util.py:447
↓ 7 callersMethodrender
Render the environment state.
hbaselines/envs/point2d.py:402
↓ 6 callersMethod_update_agent_index
Update the index of individual agents. This auxiliary method helps supports assigning env_num variables when both computing actions a
hbaselines/multiagent/base.py:497
↓ 6 callersFunctionensure_dir
Ensure that the directory specified exists, and if not, create it.
hbaselines/utils/misc.py:9
↓ 6 callersFunctionget_obs
Get the observation from a (potentially unprocessed) variable. We assume multi-agent MADDPG style policies return a dictionary observations,
hbaselines/algorithms/utils.py:106
↓ 6 callersFunctionis_goal_conditioned_policy
Check whether a policy is a goal-conditioned policy.
hbaselines/algorithms/utils.py:82
↓ 6 callersFunctiontest_additional_params
Test that the environment raises an Error in any param is missing. Parameters ---------- env_class : flow.envs.Env the environmen
tests/fast_tests/test_envs.py:2430
↓ 5 callersMethod_l2_loss
Compute the L2 regularization penalty. Parameters ---------- l2_penalty : float L2 regularization penalty
hbaselines/base_policies/policy.py:298
↓ 5 callersMethod_set_initial_state
Choose an initial state for all vehicles in the network. Parameters ---------- length : float the length of the r
hbaselines/envs/mixed_autonomy/envs/ring_nonflow.py:232
↓ 5 callersMethod_set_length
Update the length of the ring road. Parameters ---------- length : float or [float, float] the length of the ring
hbaselines/envs/mixed_autonomy/envs/ring_nonflow.py:205
↓ 5 callersFunctionapply_squashing_func
Squash the output of the Gaussian distribution. This method also accounts for that in the log probability. The squashed mean is also returned
hbaselines/utils/tf_util.py:305
↓ 5 callersFunctiongaussian_likelihood
Compute log likelihood of a gaussian. Here we assume this is a Diagonal Gaussian. Parameters ---------- input_ : tf.Variable
hbaselines/utils/tf_util.py:279
↓ 5 callersMethodget_xy
Return the x,y position of the agent.
hbaselines/envs/efficient_hrl/ant.py:214
↓ 5 callersMethodlearn
Perform the complete training operation. Parameters ---------- log_dir : str the directory where the training and
hbaselines/algorithms/rl_algorithm.py:832
↓ 5 callersMethodreset
See parent class. We update the ring length to match a new value within a given range.
hbaselines/envs/mixed_autonomy/envs/ring_nonflow.py:498
↓ 5 callersFunctionsetup_target_updates
Create the soft and initial target updates. The initial model parameters are assumed to be stored under the scope name "model", while the tar
hbaselines/utils/tf_util.py:907
↓ 4 callersMethod_compute_headway
Compute the current step headway for all vehicles.
hbaselines/envs/mixed_autonomy/envs/ring_nonflow.py:299
↓ 4 callersMethod_evaluate
Perform the evaluation operation. This method runs the evaluation environment for a number of episodes and returns the cumulative rew
hbaselines/algorithms/rl_algorithm.py:1183
↓ 4 callersMethod_get_obs
Return the processed observation. If the contextual term is not None, this will look as follows: -------
hbaselines/goal_conditioned/replay_buffer.py:425
↓ 4 callersMethodadd
Add a new transition to the buffer. Parameters ---------- obs_t : array_like the last observation of an individua
hbaselines/multiagent/replay_buffer.py:119
↓ 4 callersMethodget_state
Compute the environment reward. This is defined by the child classes.
hbaselines/envs/mixed_autonomy/envs/ring_nonflow.py:404
↓ 4 callersFunctionis_ppo_policy
Check whether a policy is for designed to support PPO.
hbaselines/algorithms/utils.py:50
↓ 4 callersFunctionis_trpo_policy
Check whether a policy is for designed to support TRPO.
hbaselines/algorithms/utils.py:58
↓ 4 callersMethodmake_critic
Create a critic tensor. Parameters ---------- obs : tf.compat.v1.placeholder the input observation placeholder
hbaselines/fcnet/td3.py:430
↓ 4 callersMethodreset
Reset the stored sample data-points.
hbaselines/utils/eval.py:177
↓ 4 callersFunctionrun_exp
Run a single training procedure. Parameters ---------- env : str or gym.Env the training/testing environment policy : type [
hbaselines/utils/train.py:712
↓ 4 callersMethodset_xy
Set the x,y position of the agent.
hbaselines/envs/efficient_hrl/ant.py:205
↓ 3 callersMethod_get_obs
Return the current step observation.
hbaselines/envs/efficient_hrl/humanoid_maze_env.py:381
↓ 3 callersMethod_get_obs
Return the current step observation.
hbaselines/envs/efficient_hrl/ant_maze_env.py:491
↓ 3 callersMethod_get_obs
Return the processed observation. If the contextual term is not None, this will look as follows: -------
hbaselines/base_policies/policy.py:242
↓ 3 callersFunction_get_ring_env_attributes
Return the environment parameters of the fast ring environment. Parameters ---------- scale : int the scale of the ring environme
hbaselines/utils/env_util.py:761
↓ 3 callersMethod_log_eval
Log evaluation statistics. Parameters ---------- file_path : str path to the evaluation csv file start_ti
hbaselines/algorithms/rl_algorithm.py:1394
↓ 3 callersMethodadditional_command
See parent class. Define which vehicles are observed for visualization purposes.
hbaselines/envs/mixed_autonomy/envs/av.py:410
↓ 3 callersMethodclear_memory
Clear internal memory that is used by the replay buffer.
hbaselines/base_policies/policy.py:237
↓ 3 callersMethodcontextual_reward
(states, goals, next_states)
hbaselines/envs/efficient_hrl/envs.py:517
↓ 3 callersFunctionget_rl_accel
Compute the RL acceleration from the desired acceleration. We reduce the decelerations at smaller speeds to smoothen the effects. Parameters
hbaselines/envs/mixed_autonomy/envs/utils.py:155
↓ 3 callersFunctionimport_results
Import relevant data from each logging file in the specified folders. Parameters ---------- folders : list of str the path t
experiments/plot.py:71
↓ 3 callersFunctionis_sac_policy
Check whether a policy is for designed to support SAC.
hbaselines/algorithms/utils.py:39
↓ 3 callersFunctionis_td3_policy
Check whether a policy is for designed to support TD3.
hbaselines/algorithms/utils.py:28
↓ 3 callersMethodload
Load parameters for the replay buffer.
hbaselines/fcnet/replay_buffer.py:49
↓ 3 callersMethodmake_critic
Create the critic variables. Parameters ---------- obs : tf.compat.v1.placeholder the input observation placehold
hbaselines/fcnet/sac.py:391
↓ 3 callersMethodmake_critic
Create a critic tensor. Parameters ---------- obs : tf.compat.v1.placeholder the input observation placeholder
hbaselines/multiagent/td3.py:728
↓ 3 callersMethodmake_critic
Create the critic variables. Parameters ---------- obs : tf.compat.v1.placeholder the input observation placehold
hbaselines/multiagent/sac.py:869
↓ 3 callersFunctionplot_fig
Plot the mean/std of the different models/algorithms. Parameters ---------- mean : list of np.ndarray a list of mean returns
experiments/plot.py:172
↓ 3 callersFunctionrecursive_update
Update a nested dictionary recursively recursively.
hbaselines/utils/misc.py:53
↓ 3 callersFunctionreduce_var
Get the variance of a Tensor. Parameters ---------- tensor : tf.Tensor the input tensor axis : int or list of int the
hbaselines/utils/tf_util.py:91
↓ 3 callersMethodsample
Sample a batch of experiences. An example for how a sample is collected from the list of observations/ actions for a three-level hier
hbaselines/goal_conditioned/replay_buffer.py:168
↓ 3 callersMethodupdate
Perform a gradient update step. This is done both at every level of the hierarchy. The kwargs argument for this method contains two
hbaselines/goal_conditioned/base.py:530
↓ 3 callersMethodupdate_from_batch
Perform gradient update step given a batch of data. Parameters ---------- obs0 : array_like batch of observations
hbaselines/fcnet/td3.py:512
↓ 2 callersMethod__init__
See parent class.
hbaselines/envs/mixed_autonomy/envs/av.py:118
↓ 2 callersMethod_collect_samples
Perform the sample collection operation over multiple steps. This method calls collect_sample for a multiple steps, and attempts to r
hbaselines/algorithms/rl_algorithm.py:1038
↓ 2 callersMethod_compute_reward_util
Compute the reward over a specific list of vehicles. Parameters ---------- rl_actions : array_like the actions pe
hbaselines/envs/mixed_autonomy/envs/av.py:306
↓ 2 callersMethod_failsafe
Compute the failsafe maximum acceleration. Parameters ---------- veh_ids : array_like the IDs of vehicles whose f
hbaselines/envs/mixed_autonomy/envs/ring_nonflow.py:348
↓ 2 callersMethod_full_obs
Return the full state observation.
hbaselines/envs/mixed_autonomy/envs/ring_nonflow.py:710
↓ 2 callersMethod_get_obs
Return the Ant observations.
hbaselines/envs/efficient_hrl/ant.py:127
↓ 2 callersMethod_get_obs
Get the observation of the humanoid.
hbaselines/envs/efficient_hrl/humanoid.py:50
↓ 2 callersMethod_get_obs
(self)
hbaselines/envs/mujoco/humanoid_env.py:38
↓ 2 callersMethod_neglogp
Compute the negative log-probability of an input action (x).
hbaselines/fcnet/ppo.py:426
↓ 2 callersMethod_policy
Get the actions from a given observation. Parameters ---------- obs : array_like the observation context
hbaselines/algorithms/rl_algorithm.py:711
↓ 2 callersMethod_sample_position
Sample a starting position for the agent.
hbaselines/envs/point2d.py:269
↓ 2 callersMethod_setup_agent
Create the actor and critic variables for an individual agent. Parameters ---------- obs_ph : tf.compat.v1.placeholder
hbaselines/multiagent/td3.py:511
↓ 2 callersMethod_setup_agent
Create the actor and critic variables for an individual agent. Parameters ---------- obs_ph : tf.compat.v1.placeholder
hbaselines/multiagent/sac.py:569
next →1–100 of 825, ranked by callers