|
a |
|
b/configs/configs.txt |
|
|
1 |
#Parameters for uSim/nuSim |
|
|
2 |
#Visualze the MuJoCo environment during training |
|
|
3 |
visualize = False |
|
|
4 |
|
|
|
5 |
#Print output statistics during training |
|
|
6 |
verbose_training = True |
|
|
7 |
|
|
|
8 |
###PATHS TO THE INPUT DATA/FILES### |
|
|
9 |
###------------------------------------------------------------------- |
|
|
10 |
## DO NOT change these paths if using the default paths for input data/files |
|
|
11 |
|
|
|
12 |
#The path to the folder that contains the musculoskeletal model file |
|
|
13 |
musculoskeletal_model_path = musculoskeletal_model/musculoskeletal_model.xml |
|
|
14 |
|
|
|
15 |
#Path to the folder that contains intial pose (init_qpos.npy and init_qvel.npy) files |
|
|
16 |
initial_pose_path = initial_pose |
|
|
17 |
|
|
|
18 |
#Path to the folder that contains the experimental kinematics data |
|
|
19 |
kinematics_path = kinematics_data |
|
|
20 |
|
|
|
21 |
#Path to the folder that contains the experimental neural data |
|
|
22 |
nusim_data_path = nusim_neural_data |
|
|
23 |
|
|
|
24 |
#Path to the folder that contains the experimental stimulus data |
|
|
25 |
stimulus_data_path = stimulus_data |
|
|
26 |
|
|
|
27 |
### PATHS FOR SAVING THE OUTPUT / TEST DATA### |
|
|
28 |
### DO NOT change these paths if using the default paths for the saved output/test data |
|
|
29 |
###-------------------------------------------------- |
|
|
30 |
#Save the agent networks after save_iter |
|
|
31 |
save_iter = 100 |
|
|
32 |
|
|
|
33 |
#Path to the root directory |
|
|
34 |
root_dir = "." |
|
|
35 |
|
|
|
36 |
#Path to save the agent's neural networks |
|
|
37 |
checkpoint_folder = "./checkpoint" |
|
|
38 |
|
|
|
39 |
#Path for saving the statististics for training |
|
|
40 |
statistics_folder = "training_statistics" |
|
|
41 |
|
|
|
42 |
#Save name for the agent's networks |
|
|
43 |
checkpoint_file = "agent_networks" |
|
|
44 |
|
|
|
45 |
#Save name for saving the test data |
|
|
46 |
test_data_filename = "test_data" |
|
|
47 |
|
|
|
48 |
#Load the saved networks from the previous session for further training |
|
|
49 |
load_saved_nets_for_training = False |
|
|
50 |
|
|
|
51 |
### Kinematics Preprocessing Parameters |
|
|
52 |
###---------------------------------------------------------------------- |
|
|
53 |
#Kinematics preprocessing for simulation |
|
|
54 |
#Adjustment instructions: |
|
|
55 |
|
|
|
56 |
#The timestep for the simulation: Keep 0 for default simulation timestep |
|
|
57 |
sim_dt = 0 # in seconds |
|
|
58 |
|
|
|
59 |
#The frames/timepoints for which the same action should be repeated during training of the agent |
|
|
60 |
#For finer movements user smaller frame_repeat, but it will also increase the training time |
|
|
61 |
frame_repeat = 5 |
|
|
62 |
|
|
|
63 |
#Number of fixedsteps in the beginning of the simulation. The target will remain at kinematic[timestep=0] for n_fixedsteps |
|
|
64 |
#If a good initial position is found using CMA-ES / IK Optimization, n_fixedsteps = 25 is a good estimate. Otherwise increase |
|
|
65 |
#if the starting reward does not increase with the training iterations. |
|
|
66 |
n_fixedsteps = 25 |
|
|
67 |
|
|
|
68 |
#Timestep limit is max number of timesteps after which the episode will terminate. |
|
|
69 |
#Multiple cycles of the same condition will be simulated if the timestep_limit > number of timsteps for that condition. |
|
|
70 |
timestep_limit = 8000 |
|
|
71 |
|
|
|
72 |
#Adjusts/scales the length of the trajectory |
|
|
73 |
#Should be the same as num_markers/targets |
|
|
74 |
trajectory_scaling = [26.3157894737] |
|
|
75 |
|
|
|
76 |
#Adjusts the starting point of the kinematics trajectory |
|
|
77 |
#Should be the same as num_markers/targets, num_coords=3 |
|
|
78 |
center = [[0.06, 0.083, 0]] |
|
|
79 |
|
|
|
80 |
###----------------------------------------------------------------------------------- |
|
|
81 |
|
|
|
82 |
###Sensory Feedback Processing Parameters -------------------------------------------- |
|
|
83 |
#Specifies the sensory feedback to the agent/network |
|
|
84 |
#True, if this feedback should be included in state feedback to the agent's network/controller |
|
|
85 |
#False, if this feedback should not be included in the state feedback to the agent's network/controller |
|
|
86 |
|
|
|
87 |
#Stimulus feedback consists of provided experimental stimulus data |
|
|
88 |
stimulus_feedback = False |
|
|
89 |
|
|
|
90 |
#Proprioceptive feedback consists of muscle lengths and velocities |
|
|
91 |
proprioceptive_feedback = True |
|
|
92 |
|
|
|
93 |
#Muscle forces consist of appled muscle forces |
|
|
94 |
muscle_forces = False |
|
|
95 |
|
|
|
96 |
#Joint feedback consists of joint positions and velocities |
|
|
97 |
joint_feedback = False |
|
|
98 |
|
|
|
99 |
#Visual feedback consists of x/y/z coordinates of the specified bodies in the model |
|
|
100 |
#If visual_feedback is True, specify the names of the bodies from musculoskeletal_model.xml for which the feedback should be included |
|
|
101 |
visual_feedback = False |
|
|
102 |
|
|
|
103 |
#Append the musculo bodies from which visual feedback should be included |
|
|
104 |
#This list can also consist of targets/markers |
|
|
105 |
#Append targetn-1 for visual feedback from targets/markers in the kinematics.pkl file |
|
|
106 |
#'target0' corresponds to the visual feedback from the first target/marker, target1 to the second target/marker and so on |
|
|
107 |
visual_feedback_bodies = [hand, target0] |
|
|
108 |
|
|
|
109 |
#Specify the names of the bodies as tuples(separated by ; with no spaces) for which the visual distance should be included in the feedback |
|
|
110 |
#Leave blank if the visual distance is not to be included in the feedback |
|
|
111 |
#Visual distance between the bodies will be included |
|
|
112 |
#e.g visual_distance_bodies = [[hand;target0], [elbow;target0]] will include the distance between the hand/elbow and first marker in sensory feedback |
|
|
113 |
visual_distance_bodies = [[hand;target0]] |
|
|
114 |
|
|
|
115 |
#Specify the names of the bodies for which the visual velocity should be included in the feedback |
|
|
116 |
#Leave blank if the visual velocity is not to be included in the feedback |
|
|
117 |
#Appends the absolute musculo body velocity, e.g. visual_velocity = [hand, target0] |
|
|
118 |
#will include the xyz velocities of hand and target0 |
|
|
119 |
visual_velocity = [] |
|
|
120 |
|
|
|
121 |
#Specify the delay in the sensory feedback in terms of the timepoints |
|
|
122 |
sensory_delay_timepoints = 0 |
|
|
123 |
|
|
|
124 |
### ----------------------------------------------------------------------------------- |
|
|
125 |
###Specifications for Regularizations with the policy network |
|
|
126 |
#Specify the weighting with various neural regularizations used in uSim/nuSim |
|
|
127 |
|
|
|
128 |
#weighting with loss for enforcing simple neural dynamics for uSim/nuSim |
|
|
129 |
alpha_usim = 0.1 |
|
|
130 |
|
|
|
131 |
#weighting with loss for minimizing the neural activations for uSim/nuSim |
|
|
132 |
beta_usim = 0.01 |
|
|
133 |
|
|
|
134 |
#weighting with loss for minimizing the synaptic weights for uSim/nuSim |
|
|
135 |
gamma_usim = 0.001 |
|
|
136 |
|
|
|
137 |
#weighting with loss for nuSim constraining a sub-population of RNN units to experimentally recorded neurons for nuSim |
|
|
138 |
zeta_nusim = 0 |
|
|
139 |
|
|
|
140 |
### -------------------------------------------------------------------------------------- |
|
|
141 |
|
|
|
142 |
### SAC TRAINING ### |
|
|
143 |
|
|
|
144 |
#The neural network model to use in the agent, can be ['rnn', 'gru'] |
|
|
145 |
model = rnn |
|
|
146 |
|
|
|
147 |
#The number of hidden units in the layers of the agent's neural network |
|
|
148 |
hidden_size = 256 |
|
|
149 |
|
|
|
150 |
#The mode of simulation can be [train, test, SFE, sensory_pert, neural_pert, musculo_properties] |
|
|
151 |
mode = "train" |
|
|
152 |
|
|
|
153 |
#DRL specific parameters. |
|
|
154 |
gamma = 0.99 |
|
|
155 |
tau = 0.005 |
|
|
156 |
lr = 0.0003 |
|
|
157 |
alpha = 0.20 |
|
|
158 |
automatic_entropy_tuning = True |
|
|
159 |
seed = 123456 |
|
|
160 |
policy_batch_size = 8 |
|
|
161 |
policy_replay_size = 4000 |
|
|
162 |
multi_policy_loss = True |
|
|
163 |
batch_iters = 1 |
|
|
164 |
total_episodes = 1000000 |
|
|
165 |
condition_selection_strategy = "reward" |
|
|
166 |
cuda = True |
|
|
167 |
|
|
|
168 |
|