Giter Club home page Giter Club logo

2048-ql's Introduction

2048-ql

Implementation of a 2048 AI using Q-Learning and following an algorithm very similar to the one described in Playing Atari with Deep Reinforcement Learning. Currently, the AI plays better than random moves but can't make it to 1024 :(.

Getting Started

Set up virtualenv

(pip install virtualenv if you don't have it)

cd 2048-ql/
virtualenv venv
source venv/bin/activate

Installing python dependencies

(venv)$ pip install -r requirements.txt

Installing Chromedriver

You can download Chromedriver here: https://sites.google.com/a/chromium.org/chromedriver/ After unzipping the folder, there will be an executable chromedriver (OS X). Place chromedriver in venv/bin/. Chromedriver should be located in venv/bin/chromedriver

If you aren't using OS X, place the equivalent executable in venv/bin/ and change the CHROMEDRIVER_DIR variable in main.py to the appropriate directory.

Train the Model

Train the model using Selenium and Chromedriver:

(venv)$ python main.py

Train the model locally, using my Python implementation of 2048:

(venv)$ python main.py -t local

Credits

Credits to Mikhail Sannikov's 2048 bot for without-animation.js and inspiration to use Selenium.

2048-ql's People

Stargazers

 avatar Yijie avatar monk avatar Joseph Cheng avatar

Watchers

James Cloos avatar yx 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.