Giter Site home page Giter Site logo

gym-tictactoe's Introduction

gym-tictactoe

OpenAI Gym Style Tic-Tac-Toe Environment.

  |O|X
 -----
  |O| 
 -----
 O|X|X

O's turn.
Enter location[1-9], q for quit:

Requirement

Python >= 3.5

Install

git https://github.com/haje01/gym-tictactoe.git
cd gym-tictactoe/
pip install -e .

Try example agents

cd examples/
python human_agent.py
python base_agent.py
python td_agent.py

Temporal Difference Agent Commands

Learn

Usage: td_agent.py learn [OPTIONS]

  Learn and save the model.

Options:
  -p, --episode INTEGER  Episode count.  [default: 17000]
  -e, --epsilon FLOAT    Exploring factor.  [default: 0.08]
  -a, --alpha FLOAT      Step size.  [default: 0.4]
  -f, --save-file TEXT   Save model data as file name.  [default:
						 td_agent.dat]
  --help                 Show this message and exit.

Bench

Usage: td_agent.py bench [OPTIONS]

  Benchmark agent with base agent.

Options:
  -p, --episode INTEGER  Episode count.  [default: 3000]
  -f, --model-file TEXT  Model data file name.  [default: td_agent.dat]
  --help                 Show this message and exit

Grid search

Usage: td_agent.py gridsearch [OPTIONS]

  Grid search hyper-parameters.

Options:
  -q, --quality [high|mid|low]  Grid search quality.  [default: mid]
  -r, --reproduce-test INTEGER  Reproducibility test count.  [default: 3]
  --help                        Show this message and exit.

Play

Usage: td_agent.py play [OPTIONS]

  Play with human.

Options:
  -f, --load-file TEXT  Load file name.  [default: td_agent.dat]
  -n, --show-number     Show location number when play.  [default: False]
  --help                Show this message and exit.

gym-tictactoe's People

Contributors

haje01 avatar

Watchers

Youngju Jaden Kim 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.