Coder Social home page Coder Social logo

sebastian-schuchmann / self-play-tictactoe-ai-ml-agents- Goto Github PK

View Code? Open in Web Editor NEW
33.0 6.0 9.0 8.6 MB

A Self Play reinforcement learning Agent learns to play TicTacToe using the ML-Agents Framework in Unity.

C# 100.00%
artificial-intelligence machine-learning reinforcement-learning ml-agents unity unity3d self-play neural-network tensorflow

self-play-tictactoe-ai-ml-agents-'s Introduction

Self-Play TicTacToe AI (ML-Agents)

Versions

  • Unity: 2020.1.0f1+

  • ML-Agents: 1.0.3+ (Release 5)

  • ML-Agents (Python): 0.18.1

  • TensorFlow: 2.3.0

Quickstart

Inference

A pretrained model is already included. Start up Unity, press play and try to win (It's possible).

Training

Make sure you have the ML-Agents Python package installed. For guidance, check out this page. This project was tested with Python 3.6.8 on MacOS Catalina with the ML-Agents Python Package v.0.18.1 installed.

First open up the terminal and cd into the "runs" folder of the repo.

cd Self-Play-TicTacToe-AI-ML-Agents-/ML-Agents\ runs

Then start the ML-Agents trainer referencing the trainer config located in this repo ("ML-Agents config/TicTacToe.yaml").

mlagents-learn ../ML-Agents\ config/TicTacToe.yaml --run-id="TicTacToe-0"

Now press play in the Unity Editor and the training should start. A script automatically reduces the animation and graphic settings to ensure a better training performance. Depending on your machine, you should achieve good results after 1 to 3 hours of training.

I want to use an updated version of ML-Agents

This project will probably work with the next few release versions of ML-Agents if no major changes occur. Make sure you have the latest ML-Agents Python package installed. Then, update the ML-Agents package through Unity's package manager if to prevent any version discrepancies between the package and the python communicator.

About me

Check out my Youtube: Sebastian Schuchmann - YouTube

or Medium: https://medium.com/@schuchmannsebastian

for A.I. / Machine Learning related content

self-play-tictactoe-ai-ml-agents-'s People

Contributors

sebastian-schuchmann avatar

Stargazers

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

Watchers

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