Code Monkey home page Code Monkey logo

q_learning_demo's Introduction

q_learning_demo

This is the code for "How to use Q Learning in Video Games Easily" by Siraj Raval on Youtube

##Overview

This is the associated code for this video on Youtube by Siraj Raval. This is a simple example of a type of reinforcement learning called Q learning.

● Rules: The agent (yellow box) has to reach one of the goals to end the game (green or red cell).
● Rewards: Each step gives a negative reward of -0.04. The red cell gives a negative reward of -1. The green one gives a positive reward of +1.
● States: Each cell is a state the agent can be.
● Actions: There are only 4 actions. Up, Down, Right, Left.

##Dependencies

-Python 2.7 -tkinter

If on Ubuntu you can install tkinter for python2.7 with $sudo apt-get install python-tk

##Usage

Run python Learner.py in terminal to see the the bot in action. It'll find the optimal strategy pretty fast (like in 15 seconds)

##Challenge

The challenge for this video is to

  • modify the the game world so that it's bigger
  • add more obstacles
  • have the bot start in a different position

Bonus points if you modify the bot in some way that makes it more efficient

#Due Date is Thursday at noon PST January 12th 2017

##Credits

The credits for this code go to PhillipeMorere. I've merely created a wrapper to get people started.

q_learning_demo's People

Contributors

llsourcell avatar pleabargain 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  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  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  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

q_learning_demo's Issues

Results

Hi,
When I run this code, there is nothing happened. I use python 2.7. It should show the figure or something? I couldn't see anything. Can you help me to visualize the results? thank you so much.

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.