Coder Social home page Coder Social logo

cdil's Introduction

CDIL

https://github.com/openai/mujoco-py/blob/master/mujoco_py/pxd/mjdata.pxd

environment customization

In this explanation, we assume you only use Mujoco for testing reinforcement learning algorithms. You need to do the followings for customizing your environment.

  1. add asset file to /envs/mujoco/assets/

This file describes your physical agent or all of things in your environment such as obstacles or walls. You can define custom model via mujoco XML format.

  1. add environment code to /envs/mujoco/

This python code is constructed by typical python gym code format. It needs 'init', 'step', 'reset' functions. Please refer other environment codes for writing your custion environment script.

  1. register your environment

You can import your custom code with the follow code.

env = gym.make({YOUR_ENV_NAME})

Before importing the environment, you need to register the environment. Please open "/envs/init.py code". You can see the registered environment in this code. You register your environment similar to the others, then it works.

Writing your algorithm scripts

In sac.py example, it constitutes the following process.

  1. Load yaml which contains hyperparameter information.

  2. Set hyperparameter and make environment.

  3. Define model, loss function, update rule.

  4. Training with exploration environment.

You can find yaml file from /yaml/*.yaml. And models are defined by scripts/model.py

example command is the following.

python sac.py --yaml sac_ant_4legged

cdil's People

Contributors

ohjeongwoo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.