Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ShangtongZhang/reinforcement-learning-an-introduction
/ functions
Functions
359 in github.com/ShangtongZhang/reinforcement-learning-an-introduction
⨍
Functions
359
◇
Types & classes
46
↓ 66 callers
Method
plot
(self)
chapter04/car_rental_synchronous.py:193
↓ 8 callers
Method
value
(self, state)
chapter09/random_walk.py:91
↓ 7 callers
Method
value
(self, state)
chapter12/random_walk.py:45
↓ 6 callers
Function
get_card
()
chapter05/blackjack.py:47
↓ 6 callers
Method
get_tiles
Get the encoded state_action using Sutton's grid tiling software.
chapter12/lambda_effect.py:153
↓ 5 callers
Function
card_value
(card_id)
chapter05/blackjack.py:53
↓ 5 callers
Method
full
(self)
chapter12/mountain_car.py:32
↓ 5 callers
Method
hash
(self)
chapter01/tic_tac_toe.py:31
↓ 5 callers
Function
simulate
(runs, time, bandits)
chapter02/ten_armed_testbed.py:101
↓ 4 callers
Method
get_pi
(self)
chapter13/short_corridor.py:80
↓ 4 callers
Function
poisson
(n, lam)
chapter04/car_rental_synchronous.py:43
↓ 4 callers
Function
poisson_probability
(n, lam)
chapter04/car_rental.py:56
↓ 4 callers
Function
semi_gradient_n_step_sarsa
(value_function, n=1)
chapter10/mountain_car.py:172
↓ 4 callers
Method
set_state
(self, state)
chapter01/tic_tac_toe.py:191
↓ 4 callers
Function
step
(state, action)
chapter03/grid_world.py:34
↓ 4 callers
Method
step
(self, state, action)
chapter12/lambda_effect.py:574
↓ 4 callers
Function
update_trace_vector
Updates agent's trace vector (z) with then current state (or state-action pair) using to the given method. Returns the updated vector.
chapter12/lambda_effect.py:167
↓ 4 callers
Method
value
(self, free_servers, priority, action)
chapter10/access_control.py:137
↓ 3 callers
Method
__init__
(self, rate, step_size)
chapter12/random_walk.py:39
↓ 3 callers
Function
choose_action
(state, q_value)
chapter06/cliff_walking.py:85
↓ 3 callers
Function
compute_RMSVE
(theta)
chapter11/counterexample.py:179
↓ 3 callers
Function
draw_image
(image)
chapter03/grid_world.py:50
↓ 3 callers
Method
feed
(self, state, action, next_state, reward)
chapter08/maze.py:216
↓ 3 callers
Method
get_active_features
Get an array containing the ids of the current active features.
chapter12/lambda_effect.py:682
↓ 3 callers
Method
get_active_tiles
(self, position, velocity, action)
chapter12/mountain_car.py:185
↓ 3 callers
Function
gradient_monte_carlo
(value_function, alpha, distribution=None)
chapter09/random_walk.py:188
↓ 3 callers
Method
load_policy
(self)
chapter01/tic_tac_toe.py:253
↓ 3 callers
Method
next_state
(self, i, j, symbol)
chapter01/tic_tac_toe.py:82
↓ 3 callers
Function
parameter_sweep
(value_function_generator, runs, lambdas, alphas)
chapter12/random_walk.py:182
↓ 3 callers
Function
play
(policy_player, initial_state=None, initial_action=None)
chapter05/blackjack.py:60
↓ 3 callers
Method
play
(self, print_state=False)
chapter01/tic_tac_toe.py:154
↓ 3 callers
Method
print_state
(self)
chapter01/tic_tac_toe.py:89
↓ 3 callers
Method
q_hat
Compute the q value for the current state-action pair.
chapter12/lambda_effect.py:424
↓ 3 callers
Method
q_hat
Compute the q value for the current state-action pair.
chapter12/lambda_effect.py:674
↓ 3 callers
Method
q_hat
Compute the q value for the current state-action pair.
chapter12/lambda_effect.py:996
↓ 3 callers
Method
reset
(self)
chapter01/tic_tac_toe.py:144
↓ 3 callers
Method
run_sarsa_lambda
Apply Sarsa(λ) algorithm. (p.305) :param env: environment to interact with. :param n_step_max: number of steps to train on. :
chapter12/lambda_effect.py:686
↓ 3 callers
Function
sarsa
(q_value, expected=False, step_size=ALPHA)
chapter06/cliff_walking.py:97
↓ 3 callers
Method
step
(self, state, action)
chapter08/maze.py:120
↓ 3 callers
Function
temporal_difference
(values, alpha=0.1, batch=False)
chapter06/random_walk.py:36
↓ 3 callers
Function
true_value
True value of the first state Args: p (float): probability of the action 'right'. Returns: True value of the first state.
chapter13/short_corridor.py:15
↓ 3 callers
Method
v_hat
Returns the approximated value for state, w.r.t. the weight vector.
chapter12/lambda_effect.py:257
↓ 3 callers
Method
value
(self, position, velocity, action)
chapter12/mountain_car.py:194
↓ 3 callers
Method
value
(self, position, velocity, action)
chapter10/mountain_car.py:139
↓ 2 callers
Function
argmax
(value)
chapter08/trajectory_sampling.py:29
↓ 2 callers
Method
backup
(self)
chapter01/tic_tac_toe.py:211
↓ 2 callers
Function
batch_updating
(method, episodes, alpha=0.001)
chapter06/random_walk.py:132
↓ 2 callers
Function
behavior_policy
(state)
chapter11/counterexample.py:61
↓ 2 callers
Method
bellman
(self, values, action, state)
chapter04/car_rental_synchronous.py:129
↓ 2 callers
Function
changing_maze
(maze, dyna_params)
chapter08/maze.py:434
↓ 2 callers
Function
choose_action
(state, q_value)
chapter06/maximization_bias.py:54
↓ 2 callers
Function
choose_action
(state, q_value, maze, dyna_params)
chapter08/maze.py:167
↓ 2 callers
Function
compute_RMSPBE
(theta)
chapter11/counterexample.py:184
↓ 2 callers
Function
compute_state_value
(in_place=True, discount=1.0)
chapter04/grid_world.py:66
↓ 2 callers
Method
cvt_ij2xy
(self, pos_ij)
chapter12/lambda_effect.py:868
↓ 2 callers
Function
dyna_q
(q_value, model, maze, dyna_params)
chapter08/maze.py:298
↓ 2 callers
Method
empty
(self)
chapter08/maze.py:44
↓ 2 callers
Function
evaluate_pi
(q, task)
chapter08/trajectory_sampling.py:58
↓ 2 callers
Function
expected_return
@state: [# of cars in first location, # of cars in second location] @action: positive if moving cars from first location to second location,
chapter04/car_rental.py:64
↓ 2 callers
Method
extend_state
(self, state, factor)
chapter08/maze.py:94
↓ 2 callers
Function
get_action
(position, velocity, valueFunction)
chapter12/mountain_car.py:227
↓ 2 callers
Function
get_action
(free_servers, priority, value_function)
chapter10/access_control.py:161
↓ 2 callers
Function
get_action
(position, velocity, value_function)
chapter10/mountain_car.py:161
↓ 2 callers
Function
get_action
()
chapter09/random_walk.py:75
↓ 2 callers
Method
get_active_features
(self, x)
chapter09/square_wave.py:73
↓ 2 callers
Method
get_active_tiles
(self, free_servers, priority, action)
chapter10/access_control.py:130
↓ 2 callers
Method
get_active_tiles
(self, position, velocity, action)
chapter10/mountain_car.py:130
↓ 2 callers
Method
get_dist2puddle
Get state's distance (float) to the nearest puddle's border. Returns a float corresponding to the state's distance to the nearest puddle borde
chapter12/lambda_effect.py:821
↓ 2 callers
Function
hashcoords
(coordinates, m, readonly=False)
chapter12/lambda_effect.py:98
↓ 2 callers
Method
insert
(self, priority, state, action)
chapter08/maze.py:258
↓ 2 callers
Method
is_end
(self)
chapter01/tic_tac_toe.py:39
↓ 2 callers
Method
is_state_goal
(self, state)
chapter12/lambda_effect.py:815
↓ 2 callers
Method
is_state_over_bounds
Returns True if the current state is out of bounds, i.e. the current run is over. Returns False otherwise.
chapter12/lambda_effect.py:662
↓ 2 callers
Method
is_terminal_state
(self, state)
chapter12/lambda_effect.py:993
↓ 2 callers
Function
monte_carlo
(values, alpha=0.1, batch=False)
chapter06/random_walk.py:60
↓ 2 callers
Function
monte_carlo_on_policy
(episodes)
chapter05/blackjack.py:181
↓ 2 callers
Function
play
(evaluator)
chapter12/mountain_car.py:237
↓ 2 callers
Method
policy
Apply a ε-greedy policy to choose an action from state.
chapter12/lambda_effect.py:404
↓ 2 callers
Method
policy
Apply a ε-greedy policy to choose an action from state.
chapter12/lambda_effect.py:636
↓ 2 callers
Method
policy
Apply a ε-greedy policy to choose an action from state.
chapter12/lambda_effect.py:964
↓ 2 callers
Function
print_optimal_policy
(q_value)
chapter06/cliff_walking.py:143
↓ 2 callers
Function
q_learning
(q_value, step_size=ALPHA)
chapter06/cliff_walking.py:128
↓ 2 callers
Function
q_learning
(q1, q2=None)
chapter06/maximization_bias.py:69
↓ 2 callers
Method
reset
(self)
chapter13/short_corridor.py:33
↓ 2 callers
Method
sample
(self)
chapter08/maze.py:233
↓ 2 callers
Method
save_policy
(self)
chapter01/tic_tac_toe.py:249
↓ 2 callers
Function
semi_gradient_temporal_difference
(value_function, n, alpha)
chapter09/random_walk.py:211
↓ 2 callers
Method
set_symbol
(self, symbol)
chapter01/tic_tac_toe.py:195
↓ 2 callers
Method
size
(self)
chapter09/square_wave.py:28
↓ 2 callers
Method
solve
(self)
chapter04/car_rental_synchronous.py:63
↓ 2 callers
Function
step
(state, action)
chapter06/cliff_walking.py:41
↓ 2 callers
Function
step
(state, action)
chapter11/counterexample.py:41
↓ 2 callers
Function
step
(state, action)
chapter09/random_walk.py:61
↓ 2 callers
Method
step
(self, state, action)
chapter08/trajectory_sampling.py:49
↓ 2 callers
Function
trial
(num_episodes, agent_generator)
chapter13/short_corridor.py:164
↓ 2 callers
Method
update
(self, delta, state)
chapter09/random_walk.py:100
↓ 2 callers
Method
value
(self, x)
chapter09/square_wave.py:81
↓ 1 callers
Function
TDC
(state, theta, weight, alpha, beta)
chapter11/counterexample.py:110
↓ 1 callers
Method
__init__
(self)
chapter13/short_corridor.py:30
↓ 1 callers
Method
__init__
(self)
chapter08/maze.py:51
next →
1–100 of 359, ranked by callers