Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PacktPublishing/Hands-On-Reinforcement-Learning-for-Games
/ functions
Functions
857 in github.com/PacktPublishing/Hands-On-Reinforcement-Learning-for-Games
⨍
Functions
857
◇
Types & classes
147
↳
Endpoints
9
↓ 76 callers
Method
mean
(self)
Chapter08/Chapter_8/TRPO/running_state.py:30
↓ 56 callers
Method
reset
(self)
Chapter07/Chapter_7/wrappers.py:160
↓ 56 callers
Method
size
(self)
Chapter09/Chapter_9/Chapter_9_ACER.py:55
↓ 55 callers
Method
tensor
(self, x)
Chapter13/Chapter_13/obs_tower2/model.py:60
↓ 54 callers
Method
step
(self, action)
Chapter07/Chapter_7/wrappers.py:166
↓ 41 callers
Method
sum
Returns arr[start] + ... + arr[end]
Chapter10/Chapter_10/common/replay_buffer.py:101
↓ 24 callers
Method
load
(cls, dir_path, name)
Chapter13/Chapter_13/obs_tower2/labels.py:55
↓ 21 callers
Method
device
(self)
Chapter13/Chapter_13/obs_tower2/model.py:21
↓ 20 callers
Method
step
Like forward() but with numpy arrays.
Chapter13/Chapter_13/obs_tower2/model.py:42
↓ 18 callers
Method
close
(self)
Chapter09/Chapter_9/Chapter_9_A2C.py:105
↓ 18 callers
Method
copy
(self)
Chapter13/Chapter_13/obs_tower2/rollout.py:48
↓ 18 callers
Method
reset
(self)
Chapter10/Chapter_10/common/wrappers.py:160
↓ 18 callers
Method
step
(self, action)
Chapter10/Chapter_10/common/wrappers.py:166
↓ 16 callers
Method
features
(self, obses)
Chapter13/Chapter_13/obs_tower2/states.py:111
↓ 16 callers
Method
step
(self, actions)
Chapter09/Chapter_9/Chapter_9_A2C.py:101
↓ 14 callers
Method
sample
(self)
Chapter08/Chapter_8/TRPO/replay_memory.py:19
↓ 13 callers
Method
reset
(self)
Chapter13/Chapter_13/obs_tower2/recorder/env_interactor.py:68
↓ 13 callers
Method
step
(self, action)
Chapter14/Chapter_14/Chapter_14_HER.py:48
↓ 12 callers
Method
reset
(self)
Chapter09/Chapter_9/Chapter_9_A2C.py:96
↓ 12 callers
Method
reset
(self)
Chapter11/Chapter_11/common/wrappers.py:160
↓ 12 callers
Method
step
(self, action)
Chapter11/Chapter_11/common/wrappers.py:166
↓ 11 callers
Method
sample
(self, on_policy=False)
Chapter09/Chapter_9/Chapter_9_ACER.py:29
↓ 10 callers
Method
cuda
(self)
Chapter06/Chapter_6/Chapter_6_3.py:69
↓ 10 callers
Method
imshow
(self, image)
Chapter13/Chapter_13/obs_tower2/recorder/env_interactor.py:24
↓ 10 callers
Method
put
(self, seq_data)
Chapter09/Chapter_9/Chapter_9_ACER.py:26
↓ 10 callers
Method
sum
Returns arr[start] + ... + arr[end]
Chapter11/Chapter_11/common/replay_buffer.py:101
↓ 9 callers
Method
save
(self, image)
Chapter13/Chapter_13/obs_tower2/labels.py:65
↓ 9 callers
Method
size
(self)
Chapter08/Chapter_8/Chapter_8_DDPG.py:41
↓ 8 callers
Method
__init__
Warp frames to 84x84 as done in the Nature paper and later work.
Chapter07/Chapter_7/wrappers.py:133
↓ 8 callers
Method
__init__
Warp frames to 84x84 as done in the Nature paper and later work.
Chapter10/Chapter_10/common/wrappers.py:133
↓ 8 callers
Method
__init__
Warp frames to 84x84 as done in the Nature paper and later work.
Chapter11/Chapter_11/common/wrappers.py:133
↓ 8 callers
Method
close
(self)
Chapter13/Chapter_13/obs_tower2/batched_env.py:40
↓ 7 callers
Method
__init__
(self, *args, **kwargs)
Chapter13/Chapter_13/obs_tower2/model.py:155
↓ 6 callers
Method
_init_level
Initialises the level.
Chapter14/Chapter_14/deepmind.py:276
↓ 6 callers
Method
_queue_get
(queue)
Chapter13/Chapter_13/obs_tower2/batched_env.py:140
↓ 6 callers
Function
linear_init
(module)
Chapter14/Chapter_14/policies.py:13
↓ 6 callers
Method
push
(self, state, action, reward, next_state, done)
Chapter10/Chapter_10/Chapter_10_HDQN.py:19
↓ 6 callers
Method
sample
(self, batch_size)
Chapter14/Chapter_14/Chapter_14_HER.py:30
↓ 6 callers
Method
start
Starts a new episode.
Chapter14/Chapter_14/deepmind.py:396
↓ 5 callers
Method
__init__
(self, env)
Chapter13/Chapter_13/obs_tower2/util.py:209
↓ 5 callers
Method
apply
(self, image)
Chapter13/Chapter_13/obs_tower2/util.py:145
↓ 5 callers
Function
atomic_save
Save a model to a file, making sure that the file will never be partly written. This prevents the model from getting corrupted in the
Chapter13/Chapter_13/obs_tower2/util.py:119
↓ 5 callers
Method
cuda
(self)
Chapter14/Chapter_14/actor_critic.py:81
↓ 5 callers
Function
load_data
Load training and test recordings from disk. Args: dirpaths: a sequence of directories where recordings are stored.
Chapter13/Chapter_13/obs_tower2/recording.py:24
↓ 5 callers
Method
load_frame
Load an array for the frame image at the given timestep index.
Chapter13/Chapter_13/obs_tower2/recording.py:238
↓ 5 callers
Method
reset
(self)
Chapter14/Chapter_14/Chapter_14_HER.py:41
↓ 5 callers
Method
reset_noise
(self)
Chapter10/Chapter_10/Chapter_10_C51.py:57
↓ 5 callers
Method
sample
(self, batch_size)
Chapter10/Chapter_10/Chapter_10_HDQN.py:24
↓ 4 callers
Method
act
(self, x, deterministic=False)
Chapter14/Chapter_14/actor_critic.py:15
↓ 4 callers
Method
batches
Yield `count` batches, where each batch is a list of (timestep, batch_idx) tuples.
Chapter13/Chapter_13/obs_tower2/rollout.py:104
↓ 4 callers
Function
big_obs
Big obs takes a retro observation and an info dictionary and produces a higher resolution observation with the retro features tacked on.
Chapter13/Chapter_13/obs_tower2/util.py:22
↓ 4 callers
Function
create_batched_env
A helper function to create a batch of environments. Args: num_envs: size of the batch. start: the starting worker index num
Chapter13/Chapter_13/obs_tower2/util.py:33
↓ 4 callers
Function
create_single_env
Create a single, wrapped environment. Args: idx: the ML-Agents worker index to use. clear: erase most of the info dictionary
Chapter13/Chapter_13/obs_tower2/util.py:50
↓ 4 callers
Function
get_random_position
Gets a random available position in a binary map array. Args: map_array: numpy array of the map to search an available position on. Returns:
Chapter14/Chapter_14/deepmind.py:25
↓ 4 callers
Method
min
Returns min(arr[start], ..., arr[end])
Chapter10/Chapter_10/common/replay_buffer.py:139
↓ 4 callers
Method
pack_labels
(self)
Chapter13/Chapter_13/obs_tower2/labels.py:70
↓ 4 callers
Method
pi
(self, x, softmax_dim=0)
Chapter09/Chapter_9/Chapter_9_A3C.py:31
↓ 4 callers
Method
reset
(self, **kwargs)
Chapter13/Chapter_13/obs_tower2/util.py:213
↓ 4 callers
Method
reward
Bin reward to {+1, 0, -1} by its sign.
Chapter10/Chapter_10/common/wrappers.py:128
↓ 4 callers
Function
set_flat_params_to
(model, flat_params)
Chapter08/Chapter_8/TRPO/utils.py:30
↓ 4 callers
Function
to_discrete_states
(observation)
Chapter05/Chapter_5/Chapter_5_4.py:17
↓ 4 callers
Function
to_discrete_states
(observation)
Chapter05/Chapter_5/Chapter_5_5y.py:21
↓ 3 callers
Method
__init__
Build a Segment Tree data structure. https://en.wikipedia.org/wiki/Segment_tree Can be used as regular array, but with two imp
Chapter10/Chapter_10/common/replay_buffer.py:11
↓ 3 callers
Method
__init__
Build a Segment Tree data structure. https://en.wikipedia.org/wiki/Segment_tree Can be used as regular array, but with two imp
Chapter11/Chapter_11/common/replay_buffer.py:11
↓ 3 callers
Method
_force
(self)
Chapter07/Chapter_7/wrappers.py:194
↓ 3 callers
Method
_force
(self)
Chapter10/Chapter_10/common/wrappers.py:194
↓ 3 callers
Method
_force
(self)
Chapter11/Chapter_11/common/wrappers.py:194
↓ 3 callers
Method
_make_image
Represents world in a `height x width x 6` `Tensor`.
Chapter14/Chapter_14/deepmind.py:381
↓ 3 callers
Method
_scale_noise
(self, size)
Chapter10/Chapter_10/Chapter_10_C51.py:64
↓ 3 callers
Method
_scale_noise
(self, size)
Chapter10/Chapter_10/Chapter_10_NDQN.py:64
↓ 3 callers
Method
_scale_noise
(self, size)
Chapter10/Chapter_10/common/layers.py:60
↓ 3 callers
Method
_scale_noise
(self, size)
Chapter11/Chapter_11/common/layers.py:60
↓ 3 callers
Method
act
(self, state)
Chapter10/Chapter_10/Chapter_10_Rainbow.py:64
↓ 3 callers
Method
act
(self, state)
Chapter11/Chapter_11/Chapter_10_Rainbow.py:64
↓ 3 callers
Method
apply_np
(self, np_image)
Chapter13/Chapter_13/obs_tower2/util.py:148
↓ 3 callers
Method
close
Clean up the environments' resources.
Chapter14/Chapter_14/multiprocessing_env.py:72
↓ 3 callers
Function
f
()
Chapter13/Chapter_13/obs_tower2/bugs/stuck_box.py:18
↓ 3 callers
Function
load_all_data
(**kwargs)
Chapter13/Chapter_13/obs_tower2/recording.py:19
↓ 3 callers
Function
load_all_labeled_images
(dir_path="C:\images")
Chapter13/Chapter_13/obs_tower2/labels.py:11
↓ 3 callers
Function
load_frame
(name)
Chapter13/Chapter_13/obs_tower2/labeler/main.py:96
↓ 3 callers
Method
log_prob
(self, state, action)
Chapter14/Chapter_14/policies.py:44
↓ 3 callers
Function
lookahead
(env, state, V, gamma)
Chapter02/Chapter_2/Chapter_2_7.py:26
↓ 3 callers
Function
lookahead
(env, state, V, gamma)
Chapter02/Chapter_2/Chapter_2_8.py:26
↓ 3 callers
Function
mirror_obs
Mirror an observation, not including the time and key bars.
Chapter13/Chapter_13/obs_tower2/util.py:95
↓ 3 callers
Function
model_tensor
(model, nparray)
Chapter13/Chapter_13/obs_tower2/scripts/run_classifier.py:147
↓ 3 callers
Method
outer_loop
Run training indefinitely, saving periodically.
Chapter13/Chapter_13/obs_tower2/ppo.py:25
↓ 3 callers
Method
pi
(self, x, softmax_dim=1)
Chapter09/Chapter_9/Chapter_9_A2C.py:27
↓ 3 callers
Method
pi
(self, x, softmax_dim = 0)
Chapter09/Chapter_9/Chapter_9_PPO.py:26
↓ 3 callers
Method
pi
(self, x, softmax_dim = 0)
Chapter08/Chapter_8/Chapter_8_ActorCritic.py:22
↓ 3 callers
Method
push
(self, state, action, reward, next_state, done)
Chapter11/Chapter_11/common/replay_buffer.py:161
↓ 3 callers
Function
recording_rollout
Create a rollout of segments from recordings. Args: recordings: a sequence of recordings. batch: the number of segments to g
Chapter13/Chapter_13/obs_tower2/recording.py:97
↓ 3 callers
Method
reset
(self, **kwargs)
Chapter13/Chapter_13/obs_tower2/states.py:40
↓ 3 callers
Method
reset
(self)
Chapter13/Chapter_13/obs_tower2/batched_env.py:33
↓ 3 callers
Method
step
(self, action)
Chapter13/Chapter_13/obs_tower2/states.py:47
↓ 3 callers
Method
step
(self, action)
Chapter13/Chapter_13/obs_tower2/util.py:218
↓ 3 callers
Function
to_discrete_states
(observation)
Chapter05/Chapter_5/Chapter_5_2.py:15
↓ 3 callers
Function
to_discrete_states
(observation)
Chapter05/Chapter_5/Chapter_5_3.py:15
↓ 3 callers
Function
to_discrete_states
(observation)
Chapter05/Chapter_5/Chapter_5_1.py:15
↓ 3 callers
Function
update_2d_pos
(array_map, pos, action, pos_result)
Chapter14/Chapter_14/deepmind.py:51
↓ 3 callers
Method
v
(self, x)
Chapter09/Chapter_9/Chapter_9_A2C.py:33
next →
1–100 of 857, ranked by callers