1. Implementing the morphology's code
The first step is to code the morphology's body in a new file that will be placed in a folder corresponding to its type of morphology inside the bodies
folder.
If the morphology to be added is of a new type, just create a new folder for this type in bodies
and code its abstract class.
2. Adding policies
Create appropriate folders in policy_models
and follow the add_policy_model
tutorial to add some policies for your new morphology.
3. Handle morphology dependencies in the code
multi_agents_continous_parkour.js
: Add a case to handle your morphology inside thecreate_agent
function.draw_p5.js
: Add a case to handle your morphology inside thedrawName
,drawObservation
anddrawReward
functions.i18n.js
: Add an entry with a title and a description for your morphology to themorphologies
entry for all languages.
4. [Optional] Set up for local launch
4.1. Convert the policy models of your new morphology to a web-friendly format
ls -d policy_models/<type>/<morphology>/*/ | xargs -I"{}" tensorflowjs_converter --input_format=tf_saved_model --saved_model_tags=serve --skip_op_check {}tf1_save web_demo/{}
4.2. Generate the list of policy models
python3 policies_to_json.py
5. Add a thumbnail for your morphology
Once all is set up and you can add an agent with your morphology to the simulation, you just need to take a screenshot of it and add it to agents_thumbnails
with the name <morphology_name>_thumbnail.png
.