Git Product home page Git Product logo

dinoruntutorial's People

Contributors

dkobran avatar dte avatar iamkumar0512 avatar ravi72munde avatar sbrugman 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

dinoruntutorial's Issues

Cannot use chromedriver in paperspace

Unable to use chromedriver in paperspace, i have uploaded the chromedriver in paperspace and i use a macos. Please help
from selenium import webdriver
driver = webdriver.Chrome('chromedriver')

Doubt on javascript code -- usage of `Runner`

Thanks for this article. I didn’t understand how did you know Runner is for checking the state like current score, gamer running or not, crashed or not, resume, start, …

Is that present in every canvas game? Mean did it work only for chrome://dino ? How can I find out Runner kind of variable to check the game state in other websites?

Permission denied: '/usr/bin' for ChromeDriver

I start the code in a virtual environment of python and i get the following error:
How can I fix the permission conflict?

`(ENV) te@te-ThinkPad-T460s:~/Programming/Python/DinoRunTutorial$ python3 Main.py
Using TensorFlow backend.
Traceback (most recent call last):
File "/home/te/Programming/Python/DinoRunTutorial/ENV/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/usr/bin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Main.py", line 372, in
playGame(observe=False);
File "Main.py", line 362, in playGame
game = Game()
File "Main.py", line 66, in init
self._driver = webdriver.Chrome(executable_path = chrome_driver_path,chrome_options=chrome_options)
File "/home/te/Programming/Python/DinoRunTutorial/ENV/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init
self.service.start()
File "/home/te/Programming/Python/DinoRunTutorial/ENV/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'bin' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home`

Downsample too fast

The 3 layers of conv with proposed values of stride , pooling .ect. leads the feature map to be small too fast ( supposed 80*80 input). is there any other settings I missed ?

Thanks a lot

FileNotFoundError: [Errno 2] No such file or directory: 'objects/D.pkl'

I am experiencing the above the error when I run the command, I copied the objects folder to the directory already. I am running it on windows 10 and the chrome browser did pop up and the game started but in the command prompt shows the error below.

`C:\Users\Tom\Desktop\Chrome-Dino-Reinforcement-Learning-master\DinoRunTutorial-master>jupyter nbconvert --execute "Reinforcement Learning Dino Run.ipynb"
[NbConvertApp] Converting notebook Reinforcement Learning Dino Run.ipynb to html
[NbConvertApp] Executing notebook with kernel: python3

DevTools listening on ws://127.0.0.1:64177/devtools/browser/b0ad5ad8-8ca7-44f6-a4fa-7a1de1a2553e
[NbConvertApp] ERROR | Error while converting 'Reinforcement Learning Dino Run.ipynb'
Traceback (most recent call last):
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\nbconvertapp.py", line 407, in export_single_notebook
output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\exporter.py", line 178, in from_filename
return self.from_file(f, resources=resources, **kw)
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\exporter.py", line 196, in from_file
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\html.py", line 95, in from_notebook_node
output, resources = super(HTMLExporter, self).from_notebook_node(nb, resources, **kw)
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\templateexporter.py", line 300, in from_notebook_node
nb_copy, resources = super(TemplateExporter, self).from_notebook_node(nb, resources, **kw)
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\exporter.py", line 138, in from_notebook_node
nb_copy, resources = self._preprocess(nb_copy, resources)
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\exporter.py", line 315, in _preprocess
nbc, resc = preprocessor(nbc, resc)
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\preprocessors\base.py", line 47, in call
return self.preprocess(nb, resources)
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\preprocessors\execute.py", line 361, in preprocess
nb, resources = super(ExecutePreprocessor, self).preprocess(nb, resources)
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\preprocessors\base.py", line 69, in preprocess
nb.cells[index], resources = self.preprocess_cell(cell, resources, index)
File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\preprocessors\execute.py", line 385, in preprocess_cell
raise CellExecutionError.from_cell_and_msg(cell, out)
nbconvert.preprocessors.execute.CellExecutionError: An error occurred while executing the following cell:

playGame(observe=False);

�[1;31m---------------------------------------------------------------------------�[0m
�[1;31mFileNotFoundError�[0m Traceback (most recent call last)
�[1;32m�[0m in �[0;36m�[1;34m�[0m
�[1;32m----> 1�[1;33m �[0mplayGame�[0m�[1;33m(�[0m�[0mobserve�[0m�[1;33m=�[0m�[1;32mFalse�[0m�[1;33m)�[0m�[1;33m;�[0m�[1;33m�[0m�[0m
�[0m
�[1;32m�[0m in �[0;36mplayGame�[1;34m(observe)�[0m
�[0;32m 6�[0m �[0mmodel�[0m �[1;33m=�[0m �[0mbuildmodel�[0m�[1;33m(�[0m�[1;33m)�[0m�[1;33m�[0m�[0m
�[0;32m 7�[0m �[1;32mtry�[0m�[1;33m:�[0m�[1;33m�[0m�[0m
�[1;32m----> 8�[1;33m �[0mtrainNetwork�[0m�[1;33m(�[0m�[0mmodel�[0m�[1;33m,�[0m�[0mgame_state�[0m�[1;33m,�[0m�[0mobserve�[0m�[1;33m=�[0m�[0mobserve�[0m�[1;33m)�[0m�[1;33m�[0m�[0m
�[0m�[0;32m 9�[0m �[1;32mexcept�[0m �[0mStopIteration�[0m�[1;33m:�[0m�[1;33m�[0m�[0m
�[0;32m 10�[0m �[0mgame�[0m�[1;33m.�[0m�[0mend�[0m�[1;33m(�[0m�[1;33m)�[0m�[1;33m�[0m�[0m

�[1;32m�[0m in �[0;36mtrainNetwork�[1;34m(model, game_state, observe)�[0m
�[0;32m 9�[0m �[0mlast_time�[0m �[1;33m=�[0m �[0mtime�[0m�[1;33m.�[0m�[0mtime�[0m�[1;33m(�[0m�[1;33m)�[0m�[1;33m�[0m�[0m
�[0;32m 10�[0m �[1;31m# store the previous observations in replay memory�[0m�[1;33m�[0m�[1;33m�[0m�[0m
�[1;32m---> 11�[1;33m �[0mD�[0m �[1;33m=�[0m �[0mload_obj�[0m�[1;33m(�[0m�[1;34m"D"�[0m�[1;33m)�[0m �[1;31m#load from file system�[0m�[1;33m�[0m�[0m
�[0m�[0;32m 12�[0m �[1;31m# get the first state by doing nothing�[0m�[1;33m�[0m�[1;33m�[0m�[0m
�[0;32m 13�[0m �[0mdo_nothing�[0m �[1;33m=�[0m �[0mnp�[0m�[1;33m.�[0m�[0mzeros�[0m�[1;33m(�[0m�[0mACTIONS�[0m�[1;33m)�[0m�[1;33m�[0m�[0m

�[1;32m�[0m in �[0;36mload_obj�[1;34m(name)�[0m
�[0;32m 3�[0m �[0mpickle�[0m�[1;33m.�[0m�[0mdump�[0m�[1;33m(�[0m�[0mobj�[0m�[1;33m,�[0m �[0mf�[0m�[1;33m,�[0m �[0mpickle�[0m�[1;33m.�[0m�[0mHIGHEST_PROTOCOL�[0m�[1;33m)�[0m�[1;33m�[0m�[0m
�[0;32m 4�[0m �[1;32mdef�[0m �[0mload_obj�[0m�[1;33m(�[0m�[0mname�[0m �[1;33m)�[0m�[1;33m:�[0m�[1;33m�[0m�[0m
�[1;32m----> 5�[1;33m �[1;32mwith�[0m �[0mopen�[0m�[1;33m(�[0m�[1;34m'objects/'�[0m �[1;33m+�[0m �[0mname�[0m �[1;33m+�[0m �[1;34m'.pkl'�[0m�[1;33m,�[0m �[1;34m'rb'�[0m�[1;33m)�[0m �[1;32mas�[0m �[0mf�[0m�[1;33m:�[0m�[1;33m�[0m�[0m
�[0m�[0;32m 6�[0m �[1;32mreturn�[0m �[0mpickle�[0m�[1;33m.�[0m�[0mload�[0m�[1;33m(�[0m�[0mf�[0m�[1;33m)�[0m�[1;33m�[0m�[0m
�[0;32m 7�[0m �[1;33m�[0m�[0m

�[1;31mFileNotFoundError�[0m: [Errno 2] No such file or directory: 'objects/D.pkl'
FileNotFoundError: [Errno 2] No such file or directory: 'objects/D.pkl'`

Selenium and dino game

Hi, While trying to open 'chrome://dino' url in selenium, it is throwing the following error:

WebDriverException Traceback (most recent call last)
in
----> 1 driver.get("chrome://dino/")

F:\Anaconda\envs\opencv\lib\site-packages\selenium\webdriver\remote\webdriver.py in get(self, url)
331 Loads a web page in the current browser session.
332 """
--> 333 self.execute(Command.GET, {'url': url})
334
335 @Property

F:\Anaconda\envs\opencv\lib\site-packages\selenium\webdriver\remote\webdriver.py in execute(self, driver_command, params)
319 response = self.command_executor.execute(driver_command, params)
320 if response:
--> 321 self.error_handler.check_response(response)
322 response['value'] = self._unwrap_value(
323 response.get('value', None))

F:\Anaconda\envs\opencv\lib\site-packages\selenium\webdriver\remote\errorhandler.py in check_response(self, response)
240 alert_text = value['alert'].get('text')
241 raise exception_class(message, screen, stacktrace, alert_text)
--> 242 raise exception_class(message, screen, stacktrace)
243
244 def _value_or_default(self, obj, key, default):

WebDriverException: Message: unknown error: net::ERR_INTERNET_DISCONNECTED

i tried googling for a solution but, couldn't find any that fixed the issue.
Kindly help me resolve this.

init_cache() not working

I set up the ML-in-a-Box, machine on Paperspace.
Unfortunately when I run init_cache() get the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'objects/epsilon.pkl

How long to run for?

Hi, I managed to get the code running and have used CPU only to train it. Below are the runtime result. How long do I have to run it for to observe any improvement in training?
FYI, I ran this code on my surface pro 3 i5 for about 20 hours or so.

01playgame

02score

03maxscore

04q_max

Adding duck functionality

Hi! I was looking through the code, and I realized that there's no way for the dino to duck during the game. There's a duck method for the DinoAgent class, but there's nothing in the Game class to support it.

I added in the functionality, and I was wondering if I could make a pull request.

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.