pyrieef.learning package¶
Subpackages¶
Submodules¶
pyrieef.learning.common_imports module¶
pyrieef.learning.dataset module¶
-
class
pyrieef.learning.dataset.CostmapDataset(filename)¶ Bases:
object-
property
epochs_completed¶
-
next_batch(batch_size, shuffle=True)¶ Return the next batch_size examples from this data set.
-
normalize_maps()¶ normalize all maps
-
property
num_examples¶
-
reshape_data_to_tensors()¶
-
split_data(data)¶ Load datasets afresh, train_per should be between 0 and 1
-
property
-
class
pyrieef.learning.dataset.WorkspaceData¶ Bases:
object
-
pyrieef.learning.dataset.create_circles_workspace(box, ws)¶ Creates circle dataset from array
-
pyrieef.learning.dataset.get_yaml_options()¶
-
pyrieef.learning.dataset.import_tf_data(filename='costdata2d_10k.hdf5')¶ Works with version 1.9.0rc1
-
pyrieef.learning.dataset.learning_data_dir()¶
-
pyrieef.learning.dataset.load_data_from_file(filename='costdata2d_10k.hdf5')¶
-
pyrieef.learning.dataset.load_data_from_hdf5(filename, train_per)¶ Setup training / test data
-
pyrieef.learning.dataset.load_dictionary_from_file(filename='costdata2d_10k.hdf5')¶
-
pyrieef.learning.dataset.load_paths_from_file(filename='paths_1k_demos.hdf5')¶
-
pyrieef.learning.dataset.load_trajectories_from_file(filename='trajectories_1k_small.hdf5')¶ Load data from an hdf5 file
-
pyrieef.learning.dataset.load_workspace_dataset(basename='1k_small.hdf5')¶
-
pyrieef.learning.dataset.load_workspaces_from_file(filename='workspaces_1k_small.hdf5')¶ Load data from an hdf5 file
-
pyrieef.learning.dataset.save_paths_to_file(paths, filename='paths_1k_demos.hdf5')¶
-
pyrieef.learning.dataset.save_trajectories_to_file(trajectories, filename='trajectories_1k_demos.hdf5')¶
-
pyrieef.learning.dataset.write_data_to_file(data_out, filename='costdata2d_10k.hdf5')¶
-
pyrieef.learning.dataset.write_dictionary_to_file(data_out, filename='costdata2d_10k.hdf5')¶
pyrieef.learning.demonstrations module¶
-
pyrieef.learning.demonstrations.compute_demonstration(workspace, graph, nb_points, show_result, average_cost, verbose, no_linear_interpolation)¶
-
pyrieef.learning.demonstrations.generate_demonstrations(nb_points)¶
-
pyrieef.learning.demonstrations.generate_one_demonstration(nb_points, demo_id)¶
-
pyrieef.learning.demonstrations.getrandbits(k) → x. Generates an int with k random bits.¶
-
pyrieef.learning.demonstrations.obsatcle_potential(workspace)¶
-
pyrieef.learning.demonstrations.optimize(path, workspace, costmap, verbose=False)¶
-
pyrieef.learning.demonstrations.random() → x in the interval [0, 1).¶
pyrieef.learning.inverse_optimal_control module¶
-
class
pyrieef.learning.inverse_optimal_control.InverseOptimalControl(nb_demonstrations)¶ Bases:
objectAbstract class for IOC problems
-
abstract
on_step()¶
-
abstract
solution(env_id)¶
-
abstract
-
class
pyrieef.learning.inverse_optimal_control.Learch(nb_demonstrations)¶ Bases:
pyrieef.learning.inverse_optimal_control.InverseOptimalControl-
one_step(iteration)¶
-
abstract
planning(env_id)¶
-
abstract
supervised_learning()¶
-
-
class
pyrieef.learning.inverse_optimal_control.Learch2D(dataset)¶ Bases:
pyrieef.learning.inverse_optimal_control.Learch-
initialize_data()¶
-
planning()¶
-
supervised_learning()¶
-
-
pyrieef.learning.inverse_optimal_control.goodness_map(trajectory, nb_points, box, goodness_scalar, goodness_stddev)¶
pyrieef.learning.networks module¶
pyrieef.learning.one_demo module¶
pyrieef.learning.random_environment module¶
-
class
pyrieef.learning.random_environment.RandomEnvironmentOptions(dataset_id=None)¶ Bases:
object-
environment_parser()¶
-
get_options()¶ Load dataset options from file or option parser
-
-
pyrieef.learning.random_environment.chomp_obstacle_cost(min_dist, epsilon)¶ Compute the cost function now (From CHOMP paper) If min_dist < 0, cost = -min_dist + epsilon/2 If min_dist >= 0 && min_dist < epsilon, have a different cost If min_dist >= epsilon, cost = 0
-
pyrieef.learning.random_environment.get_dataset_id(data_id)¶
-
pyrieef.learning.random_environment.getrandbits(k) → x. Generates an int with k random bits.¶
-
pyrieef.learning.random_environment.grids(workspace, grid_to_world, epsilon)¶ Creates a boolean matrix of occupancies To convert it to int or floats, use the following matrix.astype(int) matrix.astype(float)
-
pyrieef.learning.random_environment.random() → x in the interval [0, 1).¶
-
pyrieef.learning.random_environment.random_environments(opt)¶
-
pyrieef.learning.random_environment.remove_file_if_exists(file)¶
-
pyrieef.learning.random_environment.sample_circle_workspace(box, nobjs_max=3, random_max=False, maxnumtries=100)¶ Samples a workspace made of a maximum of nobjs_max circles that do not intersect todo replace the random environment script to use this function
-
pyrieef.learning.random_environment.samplerandpt(lims)¶ Sample a random point within limits
pyrieef.learning.random_paths module¶
-
pyrieef.learning.random_paths.cost_grid(workspace, nb_points)¶
-
pyrieef.learning.random_paths.generate_paths(nb_points)¶
-
pyrieef.learning.random_paths.getrandbits(k) → x. Generates an int with k random bits.¶
-
pyrieef.learning.random_paths.graph_search_path(graph, workspace, nb_points)¶ Find feasible path using Dijkstra’s algorithm
- samples a path that has collision with the enviroment
and perform graph search on a grid (nb_points x nb_points)
convert path to world coordinates
interpolate path continuously
-
pyrieef.learning.random_paths.grid_to_world_path(workspace, path, nb_points)¶
-
pyrieef.learning.random_paths.obsatcle_potential(workspace)¶
-
pyrieef.learning.random_paths.random() → x in the interval [0, 1).¶
-
pyrieef.learning.random_paths.sample_path(workspace, graph, nb_points, no_linear_interpolation)¶ finds a path that does not collide with enviroment but that is significantly difficult to perform
pyrieef.learning.tf_autoencoder module¶
pyrieef.learning.tf_autoencoder_2 module¶
pyrieef.learning.tf_costpredict module¶
pyrieef.learning.tf_costpredict_2 module¶
pyrieef.learning.tf_costpredict_3 module¶
pyrieef.learning.tf_costpredict_4 module¶
pyrieef.learning.tf_networks module¶
-
class
pyrieef.learning.tf_networks.ConvDeconv64¶ Bases:
pyrieef.learning.tf_networks.NetworkDefines a Convolution Deconvolution network sized for the Mnist 28x28 matrix format
-
define(x_input)¶
-
lrelu(x, alpha=0.3)¶
-
placeholder()¶
-
resize_batch(imgs)¶
-
resize_output(imgs, i)¶
-
-
class
pyrieef.learning.tf_networks.ConvDeconvResize¶ Bases:
pyrieef.learning.tf_networks.Networkhttps://towardsdatascience.com/ autoencoders-introduction-and-implementation-3f40483b0a85
-
define(x_inputs)¶
-
placeholder()¶
-
resize_batch(imgs)¶
-
resize_output(imgs, i)¶
-