All Projects → vdutor → Tf Rex

vdutor / Tf Rex

Licence: mit
Play Google Chrome's T-rex game with TensorFlow

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Tf Rex

Easy Rl
强化学习中文教程,在线阅读地址:https://datawhalechina.github.io/easy-rl/
Stars: ✭ 3,004 (+770.72%)
Mutual labels:  deep-reinforcement-learning, q-learning
2048 Deep Reinforcement Learning
Trained A Convolutional Neural Network To Play 2048 using Deep-Reinforcement Learning
Stars: ✭ 169 (-51.01%)
Mutual labels:  deep-reinforcement-learning, q-learning
Tetris Ai
A deep reinforcement learning bot that plays tetris
Stars: ✭ 109 (-68.41%)
Mutual labels:  deep-reinforcement-learning, q-learning
Dissecting Reinforcement Learning
Python code, PDFs and resources for the series of posts on Reinforcement Learning which I published on my personal blog
Stars: ✭ 512 (+48.41%)
Mutual labels:  deep-reinforcement-learning, q-learning
Deep-Reinforcement-Learning-With-Python
Master classic RL, deep RL, distributional RL, inverse RL, and more using OpenAI Gym and TensorFlow with extensive Math
Stars: ✭ 222 (-35.65%)
Mutual labels:  deep-reinforcement-learning, q-learning
Hands On Reinforcement Learning With Python
Master Reinforcement and Deep Reinforcement Learning using OpenAI Gym and TensorFlow
Stars: ✭ 640 (+85.51%)
Mutual labels:  deep-reinforcement-learning, q-learning
Accel Brain Code
The purpose of this repository is to make prototypes as case study in the context of proof of concept(PoC) and research and development(R&D) that I have written in my website. The main research topics are Auto-Encoders in relation to the representation learning, the statistical machine learning for energy-based models, adversarial generation networks(GANs), Deep Reinforcement Learning such as Deep Q-Networks, semi-supervised learning, and neural network language model for natural language processing.
Stars: ✭ 166 (-51.88%)
Mutual labels:  deep-reinforcement-learning, q-learning
Deep Qlearning Agent For Traffic Signal Control
A framework where a deep Q-Learning Reinforcement Learning agent tries to choose the correct traffic light phase at an intersection to maximize traffic efficiency.
Stars: ✭ 136 (-60.58%)
Mutual labels:  deep-reinforcement-learning, q-learning
king-pong
Deep Reinforcement Learning Pong Agent, King Pong, he's the best
Stars: ✭ 23 (-93.33%)
Mutual labels:  deep-reinforcement-learning, q-learning
Learningx
Deep & Classical Reinforcement Learning + Machine Learning Examples in Python
Stars: ✭ 241 (-30.14%)
Mutual labels:  deep-reinforcement-learning, q-learning
Deer
DEEp Reinforcement learning framework
Stars: ✭ 455 (+31.88%)
Mutual labels:  deep-reinforcement-learning, q-learning
RL
Reinforcement Learning Demos
Stars: ✭ 66 (-80.87%)
Mutual labels:  deep-reinforcement-learning, q-learning
Reinforcement learning tutorial with demo
Reinforcement Learning Tutorial with Demo: DP (Policy and Value Iteration), Monte Carlo, TD Learning (SARSA, QLearning), Function Approximation, Policy Gradient, DQN, Imitation, Meta Learning, Papers, Courses, etc..
Stars: ✭ 442 (+28.12%)
Mutual labels:  deep-reinforcement-learning, q-learning
Async Deeprl
Playing Atari games with TensorFlow implementation of Asynchronous Deep Q-Learning
Stars: ✭ 44 (-87.25%)
Mutual labels:  deep-reinforcement-learning, q-learning
Deep Rl Trading
playing idealized trading games with deep reinforcement learning
Stars: ✭ 228 (-33.91%)
Mutual labels:  deep-reinforcement-learning, q-learning
DRL in CV
A course on Deep Reinforcement Learning in Computer Vision. Visit Website:
Stars: ✭ 59 (-82.9%)
Mutual labels:  deep-reinforcement-learning, q-learning
Explorer
Explorer is a PyTorch reinforcement learning framework for exploring new ideas.
Stars: ✭ 54 (-84.35%)
Mutual labels:  deep-reinforcement-learning, q-learning
Mydeeplearning
A deep learning library to provide algs in pure Numpy or Tensorflow.
Stars: ✭ 281 (-18.55%)
Mutual labels:  q-learning
Reward Learning Rl
[RSS 2019] End-to-End Robotic Reinforcement Learning without Reward Engineering
Stars: ✭ 310 (-10.14%)
Mutual labels:  deep-reinforcement-learning
Deep reinforcement learning course
Implementations from the free course Deep Reinforcement Learning with Tensorflow and PyTorch
Stars: ✭ 3,232 (+836.81%)
Mutual labels:  deep-reinforcement-learning

TF-rex

In this project we play Google's T-rex game using Reinforcement Learning. The RL algorithm is based on the Deep Q-Learning algorithm [1] and is implemented from scratch in TensorFlow.

===========================================================================

CHECK OUT THE ACCOMPAGNYING BLOGPOST - it contains a lot more useful information.

===========================================================================

Dependencies

  • Python 3.5 or higher
  • Pillow 4.3.0
  • scipy 0.19.1
  • tensorflow 1.7.0 or higher
  • optional: tensorflow tensorboard

Installation

Tested on MacOs, Debian, Ubuntu, and Ubuntu-based distros.

Start by cloning the repository

$ git clone https://github.com/vdutor/TF-rex

We recommend creating a virtualenv before installing the required packages. See virtualenv or virtualenv-wrapper on how to do so.

The dependencies can be easly installed using pip.

$ optional: open the virtualenv
$ pip install -r requirements.txt

Getting started

Webserver for running the javascript T-rex game

A simple webserver is required to run the T-rex javascript game. The easiest way to achieve this is by using python's Simple HTTP Server module. Open a new terminal and navigate to TF-Rex/game, then run the following command

$ cd /path/to/project/TF-Rex/game
$ python2 -m SimpleHTTPServer 8000

The game is now accessable on your localhost 127.0.0.1:8000. This approach was tested for Chrome and Mozilla Firefox.

Tf-Rex

First, all the commandline arguments can be retrieved with

$ cd /path/to/project/TF-Rex/tf-rex
$ python main.py --help

Quickly check if the installation was successful by playing with a pretrained Q-learner.

$ python main.py --notraining --logdir ../trained-model

This command will restore the pretrained model, stored in ../trained-model and play the T-rex game.

IMPORTANT: The browser needs to connect with the python side. Therefore, refresh the browser after firing python main.py --notraining --logdir ../trained-model.

TF-REX

Training a new model can be done as follows

$ python main.py --logdir logs

Again, the browser needs to be refreshed to start the process. The directory passed as logdir argument will be used to store intermediate tensorflow checkpoints and tensorboard information.

While training, a different terminal can be opened to launch the tensorboard

$ tensorboard --logdir logs

The tensorboards will be visible on http://127.0.0.1:6006/.

References

[1] Playing Atari with Deep Reinforcement Learning

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].