Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RLAgent/gated-path-planning-networks
/ functions
Functions
85 in github.com/RLAgent/gated-path-planning-networks
⨍
Functions
85
◇
Types & classes
10
↓ 8 callers
Function
print_stats
Prints performance statistics output from Runner.
utils/experiment.py:148
↓ 8 callers
Method
test
Tests the model on the given dataset.
utils/runner.py:271
↓ 6 callers
Function
create_dataloader
Creates a maze DataLoader. Args: datafile (string): Path to the dataset dataset_type (string): One of "train", "valid", or "test"
utils/experiment.py:101
↓ 4 callers
Function
_plot
(train, valid, name)
train.py:82
↓ 4 callers
Method
_swap_index
(self, idx1, idx2)
utils/dijkstra.py:62
↓ 4 callers
Method
insert
(self, key, val)
utils/dijkstra.py:16
↓ 4 callers
Function
print_row
Prints the given items. Args: width (int): Character length for each column. items (list): List of items to print.
utils/experiment.py:128
↓ 3 callers
Method
_run
Runs the model on the given data. Args: model (torch.nn.Module): The Planner model dataloader (torch.utils.data.D
utils/runner.py:139
↓ 3 callers
Function
get_mechanism
(mechanism)
utils/experiment.py:87
↓ 3 callers
Method
neighbors_func
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:232
↓ 2 callers
Method
__init__
(self)
utils/mechanism.py:186
↓ 2 callers
Method
_east
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:133
↓ 2 callers
Method
_east
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:194
↓ 2 callers
Method
_getState
Returns the current state.
utils/maze.py:132
↓ 2 callers
Method
_isGoalPos
Returns true if pos is equal to the goal position.
utils/maze.py:128
↓ 2 callers
Method
_is_out_of_bounds
(self, maze, p_y, p_x)
utils/mechanism.py:37
↓ 2 callers
Method
_north
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:128
↓ 2 callers
Method
_north
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:189
↓ 2 callers
Method
_northeast
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:209
↓ 2 callers
Method
_northwest
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:215
↓ 2 callers
Method
_percolate_up
(self, curr_idx)
utils/dijkstra.py:82
↓ 2 callers
Method
_south
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:143
↓ 2 callers
Method
_south
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:204
↓ 2 callers
Method
_southeast
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:220
↓ 2 callers
Method
_southwest
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:226
↓ 2 callers
Method
_turnleft
(self, p_orient, p_y, p_x)
utils/mechanism.py:65
↓ 2 callers
Method
_turnright
(self, p_orient, p_y, p_x)
utils/mechanism.py:61
↓ 2 callers
Method
_west
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:138
↓ 2 callers
Method
_west
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:199
↓ 2 callers
Function
create_dataset
(data_size, compare_mazes=None)
generate_dataset.py:66
↓ 2 callers
Function
create_save_dir
Creates and returns path to the save directory.
utils/experiment.py:116
↓ 2 callers
Method
decrease
(self, key, new_val)
utils/dijkstra.py:32
↓ 2 callers
Function
dijkstra_dist
(maze, mechanism, goal)
utils/dijkstra.py:119
↓ 2 callers
Method
empty
(self)
utils/dijkstra.py:13
↓ 2 callers
Method
extract
(self)
utils/dijkstra.py:44
↓ 2 callers
Function
hash_maze_to_string
(maze)
generate_dataset.py:35
↓ 2 callers
Method
invneighbors_func
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:244
↓ 2 callers
Function
parse_args
()
utils/experiment.py:11
↓ 1 callers
Method
_backward
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:69
↓ 1 callers
Method
_compute_stats
(self, batch_size, map_design, goal_map, outputs, predictions, labels, loss, opt_p
utils/runner.py:73
↓ 1 callers
Method
_forward
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:41
↓ 1 callers
Method
_percolate_down
(self, curr_idx)
utils/dijkstra.py:91
↓ 1 callers
Method
_process
Data format: list, [train data, test data]
utils/maze.py:29
↓ 1 callers
Function
add_stack
(next_pos, next_dir)
utils/maze.py:75
↓ 1 callers
Function
dijkstra_policy
(maze, mechanism, goal, policy)
utils/dijkstra.py:156
↓ 1 callers
Function
extract_goal
(goal_map)
generate_dataset.py:59
↓ 1 callers
Function
extract_goal
Returns the goal location.
utils/maze.py:225
↓ 1 callers
Function
extract_policy
Extracts the policy from the given values.
utils/maze.py:198
↓ 1 callers
Function
fmt_item
(x)
utils/experiment.py:135
↓ 1 callers
Function
generate_data
(filename, train_size, valid_size, test_size,
generate_dataset.py:18
↓ 1 callers
Function
generate_maze
(maze_size, decimation, start_pos=(1, 1))
utils/maze.py:70
↓ 1 callers
Function
get_optimizer
(args, parameters)
utils/runner.py:13
↓ 1 callers
Function
hashed_check_maze_exists
(mazekey, mazehash)
generate_dataset.py:42
↓ 1 callers
Function
main
()
eval.py:15
↓ 1 callers
Function
main
()
train.py:25
↓ 1 callers
Function
main
()
generate_dataset.py:154
↓ 1 callers
Method
reset
Resets the maze.
utils/maze.py:153
↓ 1 callers
Method
step
(self, action)
utils/maze.py:188
↓ 1 callers
Method
train
Trains the model on the given training dataset.
utils/runner.py:257
↓ 1 callers
Method
validate
Evaluates the model on the given validation dataset. Stores the current model if it achieves the best validation performance.
utils/runner.py:264
Method
__getitem__
(self, index)
utils/maze.py:55
Method
__init__
(self)
utils/dijkstra.py:7
Method
__init__
Args: model (torch.nn.Module): The Planner model mechanism (utils.mechanism.Mechanism): Environment transition kernel
utils/runner.py:30
Method
__init__
(self, num_actions, num_orient)
utils/mechanism.py:9
Method
__init__
(self)
utils/mechanism.py:32
Method
__init__
(self)
utils/mechanism.py:125
Method
__init__
Args: filename (str): Dataset filename (must be .npz format). dataset_type (str): One of "train", "valid", or "test".
utils/maze.py:14
Method
__init__
(self, mechanism, min_maze_size, max_maze_size,
utils/maze.py:114
Method
__init__
(self, num_orient, num_actions, args)
models/GPPN.py:10
Method
__init__
(self, num_orient, num_actions, args)
models/VIN.py:12
Method
__len__
(self)
utils/maze.py:66
Method
calc_optimal_and_success
(i)
utils/runner.py:95
Function
check_maze_exists
(maze, compare_mazes)
generate_dataset.py:49
Method
forward
(self, map_design, goal_map)
models/GPPN.py:64
Method
forward
(self, map_design, goal_map)
models/VIN.py:62
Method
invneighbors_func
Computes previous states for each action.
utils/mechanism.py:18
Method
invneighbors_func
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:96
Method
invneighbors_func
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:156
Method
neighbors_func
Computes next states for each action.
utils/mechanism.py:14
Method
neighbors_func
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:89
Method
neighbors_func
(self, maze, p_orient, p_y, p_x)
utils/mechanism.py:148
Method
print_policy
Prints the given policy.
utils/mechanism.py:22
Method
print_policy
(self, maze, goal, policy)
utils/mechanism.py:103
Method
print_policy
(self, maze, goal, policy)
utils/mechanism.py:164
Method
print_policy
(self, maze, goal, policy)
utils/mechanism.py:256