Giter Site home page Giter Site logo

vmayoral / basic_reinforcement_learning Goto Github PK

View Code? Open in Web Editor NEW
1.0K 61.0 356.0 44.14 MB

An introductory series to Reinforcement Learning (RL) with comprehensive step-by-step tutorials.

License: GNU General Public License v3.0

Python 31.30% Jupyter Notebook 68.64% Shell 0.06%
reinforcement-learning openai-gym tutorial deeplearning neural-networks deep-learning artificial-intelligence q-learning ai

basic_reinforcement_learning's People

Contributors

mazzzystar avatar texify[bot] avatar vmayoral avatar vyraun 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  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

basic_reinforcement_learning's Issues

about the code

In tutorial1, qlearn_mod_random.pyline 32:

if random.random() < self.epsilon:
            minQ = min(q)
            mag = max(abs(minQ), abs(maxQ))
            # add random values to all the actions, recalculate maxQ
            q = [q[i] + random.random() * mag - .5 * mag for i in range(len(self.actions))]
            maxQ = max(q)

why use this(versus qlearn.py)?

some problems about gym in turorial3

Error

  1. openai_gym_4.py
        env.monitor.start('/tmp/cartpole-experiment-1',force=True)
        AttributeError: 'TimeLimit' object has no attribute 'monitor'
  2. openai_gym_5.py
        gym.upload('/tmp/cartpole-experiment-1', api_key='sk_5YJsWfHOQwOLiU3AAVyYeA')
        AttributeError: module 'gym' has no attribute 'upload'

Tutorial 1: code issues

I'm getting lots of errors when I try to run the code for tutorial 1. Kindly advise.

Screen dump:
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ python3 egoMouseLook.py
File "egoMouseLook.py", line 162
print len(mouse.ai.q) # print the amount of state/action, reward
^
SyntaxError: invalid syntax
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ nano egoMouseLook.py
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ python3 egoMouseLook.py
Traceback (most recent call last):
File "egoMouseLook.py", line 7, in
import cellular
File "/home/administrator/basic_reinforcement_learning/tutorial1/cellular.py", line 521
print 'Error: invalid colour:', c
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Error: invalid colour:', c)?
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ python egoMouseLook.py
Traceback (most recent call last):
File "egoMouseLook.py", line 7, in
import cellular
File "/home/administrator/basic_reinforcement_learning/tutorial1/cellular.py", line 521
print 'Error: invalid colour:', c
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Error: invalid colour:', c)?
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ nano cellular.py
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ python egoMouseLook.py
Traceback (most recent call last):
File "egoMouseLook.py", line 8, in
reload(cellular)
NameError: name 'reload' is not defined
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ python3 egoMouseLook.py
Traceback (most recent call last):
File "egoMouseLook.py", line 8, in
reload(cellular)
NameError: name 'reload' is not defined
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ cd ..
(base) administrator@ubuntu:/basic_reinforcement_learning$ python tutorial1/egoMouseLook.py
Traceback (most recent call last):
File "tutorial1/egoMouseLook.py", line 8, in
reload(cellular)
NameError: name 'reload' is not defined
(base) administrator@ubuntu:
/basic_reinforcement_learning$ cd tutorial1
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ nano egoMouseLook.py
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ python3 egoMouseLook.py
Traceback (most recent call last):
File "egoMouseLook.py", line 133, in
world = cellular.World(Cell, directions=directions, filename='../worlds/waco.txt')
File "/home/administrator/basic_reinforcement_learning/tutorial1/cellular.py", line 102, in init
data = file(filename).readlines()
NameError: name 'file' is not defined
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ nano egoMouseLook.py
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ python3 egoMouseLook.py
egoMouseLook.py:9: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Traceback (most recent call last):
File "egoMouseLook.py", line 134, in
world = cellular.World(Cell, directions=directions, filename='../worlds/waco.txt')
File "/home/administrator/basic_reinforcement_learning/tutorial1/cellular.py", line 102, in init
data = file(filename).readlines()
NameError: name 'file' is not defined

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.