January 2019
Intermediate to advanced
342 pages
9h 17m
English
The following are a few of the helper functions that are used in this reinforcement learning framework for the purpose of action selection, storing observations used for training, state image processing and saving the weights of the trained model:
"""Created on Thu Nov 2 16:03:46 2017@author: Santanu Pattanayak"""from keras import backend as Kimport numpy as npimport shutil, osimport numpy as npimport pandas as pdfrom scipy import miscimport pickleimport matplotlib.pyplot as pltfrom sklearn.externals import joblibhuber_loss_thresh = 1 action_list = np.array([ [0.0, 0.0, 0.0], #Brake [-0.6, 0.05, 0.0], #Sharp left [0.6, 0.05, 0.0], #Sharp right [0.0, 0.3, 0.0]] ) #Staightrgb_mode = Truenum_actions = len(action_list) def sel_action(action_index): ...
Read now
Unlock full access