Giter Club home page Giter Club logo

env's Introduction

VIS - Environment for Reinforcement Learning

vis is an open source Python library for developing and comparing reinforcement learning algorithms by providing a standard API to communicate between learning algorithms and environments, as well as a standard set of environments compliant with that API

Python package

Wiki Docs

Installation

We are support Python 3.7, 3.8, 3.9, 3.10 on Linux and Windows
To install the base vis library, use:

  • Using pip:

    Update later
  • Directly from source (recommended):

    git clone https://github.com/ngoxuanphong/vis.git
    cd vis
    pip install -r requirements.txt

API

import env

env.make()
# Run game
print(env.run())

# Visualization one game
env.render(Agent = env.Agent_random)

#Play with bot in game
env.render(Agent = 'human')
import env
from numba import njit
import numpy as np

@njit()
def Agent(state, agent_data):
    validActions = env.getValidActions(state)
    actions = np.where(validActions==1)[0]
    action = np.random.choice(actions)
    return action, agent_data
    
env.make()
env.run(Agent, num_game = 1000, agent_model = [0], level = 0)

env.render(Agent = Agent)

Example

Please refer to Wiki for complete usage details

Environment

vis includes 20 games, which are listed below along with the number of actions, observations, time run, win rate they have:

Game Win-lv0 win-lv1 win-lv2 Time-lv0 Time-lv1 Time-lv2 Graphics Link
Catan 2440 354 7 252 230 183 True Catan
CatanNoExchange 2491 424 22 168 1021 96 True CatanNoExchange
Century 1970 7 36 61 True Century
Durak 2540 460 15 21 True Durak
Exploding_Kitten 2044 1695 24 35 True Exploding_Kitten
Fantan 2464 114 17 31 Fantan
GoFish 2466 2517 497 9 34 13 True GoFish
Imploding_Kitten 1646 1274 62 51 True Imploding_Kitten
MachiKoro 2468 31 3 11 9 8 True MachiKoro
Poker 1100 1112 81 127 True Poker
Sheriff 2481 4 365 29 29 19 True Sheriff
Splendor 2517 21 4 105 154 85 True Splendor
Splendor_v2 2632 9 4 50 180 123 True Splendor_v2
Splendor_v3 2700 681 28 34 33 41 True Splendor_v3
StoneAge 2485 40 0 65 229 100 True StoneAge
SushiGo 2096 144 187 8 14 14 True SushiGo
TicketToRide 2017 0 84 313 True TicketToRide
TLMN 2532 766 279 23 25 31 True TLMN
WelcomeToTheDungeon_v1 2512 830 5 11 WelcomeToTheDungeon_v1
WelcomeToTheDungeon_v2 2458 889 443 8 11 23 WelcomeToTheDungeon_v2

Please refer to Wiki for more details.

env's People

Contributors

datvodinh avatar hieublack avatar ngoxuanphong avatar quynhtrangdao avatar tandat17z avatar vis-laboratory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.