Code Monkey home page Code Monkey logo

hitmanenv's Introduction

HitmanEnv

Hitman-Go environments based on OpenAI gym.

Requirements

  • gym 0.14.0
  • numpy

Installation (clone this repository and just import it)

cd HitmanEnv
pip install -e .

Usage (hitman-v0)

hitman-v0 environments is collective version of Hitman-Go environments. You can select maps by parameters (map_id)

import gym
import hitman_gym

from gym.envs.registration import register

map_id = 'simple'  # 'simple', 'blue', 'yellow'

register(
        id='hitman-v0',
        entry_point='hitman_gym.envs:HitmanGO',
        kwargs={'map_id': map_id}
        )

env = gym.make('hitman-v0')
done = False
ep_reward = 0

while not done:
  obs, reward, done, info = env.step(env.action_space.sample())
  ep_reward += reward

env.close()

Usage (hitman-v1 ~ hitman-v4)

Another versions of Hitman-Go do not need to register environments. By "gym.make" helps you use the hitman-go environments.

import gym
import hitman_gym

env = gym.make('hitman-v1')  # hitman-v1: 'simple' , hitman-v2: 'blue', hitman-v3: 'yellow', hitman-v4: 'yellow_yr'
done = False
ep_reward = 0

while not done:
  obs, reward, done, info = env.step(env.action_space.sample())
  ep_reward += reward

env.close()

Dueling DQN Train (hitman-v0)

python train.py --num_episodes 10000 --min_eps 0.01 --max_mem 1000 --map simple

Dueling DQN Train (hitman-v1 ~ hitman-v4)

python train2.py --num_episodes 10000 --min_eps 0.01 --max_mem 1000 --ver 1

Notice

Sungkyunkwan University Reinforcement Learning Spring 2020 Youngrok Song Jiwung Hyun

RL OpenAI Gym Environment for Hitman Go

hitmanenv's People

Contributors

id4thomas avatar kabbi159 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.