Skip to content

Optimizing A Controller

Neo-X edited this page Feb 13, 2018 · 1 revision

These are instructions on how to optimize a controller (which are typically used to bootstrap a policy).

These optimization fit the FSM parameters to a particular metric function. The metrics are usually a combination velocity terms, jump height, pose matching provided motions and energy terms. It is not a simple process to combine these to get the motion you want to good luck.

This is an example of the arg_file used to optimize the biped2d controller to match a particular velocity.

// -scenario= opt_jump
-scenario= opt_vel_ctrl
-output_path= output/opt_vel_result.txt
-int_output_path= output/opt_results/opt

-character_file= data/characters/biped2D.txt
// -motion_file= data/motions/biped_run.txt
-state_file= data/states/biped2D/biped_jog_state.txt

-char_type= biped2D
-char_ctrl= biped2D

-num_update_steps= 20
-num_sim_substeps= 5
-world_scale= 4

-terrain_file= data/terrain/flat.txt

-enable_rand_perturbs= false
-perturb_time_min= 2
-perturb_time_max= 4
-min_perturb= 50
-max_perturb= 150
-min_pertrub_duration= 0.1
-max_perturb_duration= 0.4

-target_ctrl_id= 0
-target_actions= 0

-scene_max_time= 30

-cma_sigma= 0.3
-cma_step_tol= 0.0001
-cma_max_gen= 1000000
-cma_max_iter= 1
-cma_pop_size= 15

-opt_eval_samples= 6
-num_threads= 15

In the Main.cpp file there is a list of optimization classes that can be used, e.g. opt_vel_ctrl, opt_jump.

Clone this wiki locally