Giter Club home page Giter Club logo

robot-evo-learning's Introduction

ENV FILES for Course Computational Intelligence and Robotics

Description

This repo provides robot learning environments for course Computational Intelligence and Robotics directed by Prof. Huaping Liu at Tsinghua University.

The task is training a (Bipedalwalker / Ant) to learn control and evolve its morph for better control.

Two difficulties of tasks are provided:

  1. easy: training a (Bipedalwalker / Ant) on flat.
  2. hard: training a (Bipedalwalker / Ant) on rough terrain.

Build Image from Dockerfile

cd docker
docker build -t 'evo-learning:v1' . 

Get the image_id.

Run Container

docker run -it --name evo-learning -v ws:/root/ws -v /tmp/.x11-unix:/tmp/.x11-unix -e DISPLAY=$DISPLAY -e GDK_SCALE -e GDK_DPI_SCALE -p 9022:22 {image_id} /bin/bash

Important: The 'ws' is the docker volume where you should clone and put this repo, so that you can edit code inside the container.

Note: Replace the {image_id} with the image_id in the last step.

Entering Containner

Entering containner using ssh with default passwd '123123':

ssh -Y [email protected] -p 9022

Note: It's necessary to use "-Y" option to allow X11 forwarding.

Example

We provide a gym like environment api:

    env = make_env(args.env, render_mode="human")
    env.seed(seed=42)

    num_param = 8
    augment_vector = (1.0 + (np.random.rand(num_param)*2-1.0)*0.5)
    env.augment_env(augment_vector)
    observation, info = env.reset()
    for _ in range(1000):
        observation, reward, done, info = env.step(env.action_space.sample())
        env.render()
        if done:
            observation, info = env.reset()
    env.close()

ENVNAME can be one of:

AugmentBipedalWalker
AugmentBipedalWalkerSmallLegs
AugmentBipedalWalkerHardcore
AugmentBipedalWalkerHardcoreSmallLegs

AugmentAnt

Run main.py to create a bipedalwalker or ant environment with random morph and random control policy.

python main.py --env ENVNAME

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.