Git Product home page Git Product logo

gdbot's Introduction

Reinforcement Learning - Playing Geometry Dash using PyTorch

A deep q network that plays Geometry Dash

Dependencies

Python 3.6+
Run pip3 install -r requirements.txt to install remaining dependencies (or pip install -r requirements.txt, depending on your pip installation)

How to run

Run the Geometry Dash game in top left corner of your screen on the smallest resolution and run GDBot.py, making sure that no window is covering the network's "view" of the game

gdbot's People

Contributors

cryptopapi997 avatar julianbouchard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gdbot's Issues

AI inefficiency

i left the ai to pass stereo madness, but in the morning i saw that it only put 5%, how can i improve the efficiency of the ai?

Requirements.txt won't install

i keep getting this error

    ERROR: Command errored out with exit status 1:
     command: 'c:\users\theen\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\theen\\AppData\\Local\\Temp\\pip-install-0txzhvbw\\pyobjc-framework-quartz_daa10fa6a9104fd5b65fc33da7afe157\\setup.py'"'"'; __file__='"'"'C:\\Users\\theen\\AppData\\Local\\Temp\\pip-install-0txzhvbw\\pyobjc-framework-quartz_daa10fa6a9104fd5b65fc33da7afe157\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\theen\AppData\Local\Temp\pip-pip-egg-info-f9lqsf7b'
         cwd: C:\Users\theen\AppData\Local\Temp\pip-install-0txzhvbw\pyobjc-framework-quartz_daa10fa6a9104fd5b65fc33da7afe157\
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\theen\AppData\Local\Temp\pip-install-0txzhvbw\pyobjc-framework-quartz_daa10fa6a9104fd5b65fc33da7afe157\setup.py", line 64, in <module>
        Extension(
      File "C:\Users\theen\AppData\Local\Temp\pip-install-0txzhvbw\pyobjc-framework-quartz_daa10fa6a9104fd5b65fc33da7afe157\pyobjc_setup.py", line 414, in Extension
        os_level = get_os_level()
      File "C:\Users\theen\AppData\Local\Temp\pip-install-0txzhvbw\pyobjc-framework-quartz_daa10fa6a9104fd5b65fc33da7afe157\pyobjc_setup.py", line 200, in get_os_level
        with open("/System/Library/CoreServices/SystemVersion.plist", "rb") as fp:
    FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

TypeError: argument of type 'NoneType' is not iterable PIP

C:\Users\User\Desktop\GDBot-master>pip install -r requirements.txt
Collecting numpy (from -r requirements.txt (line 1))
Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/2f/2a/34fe0b64e78347f4ea128868df0034a97e0f92b476f62947b0976caba820/numpy-1.25.1-cp311-cp311-win_amd64.whl.metadata
Downloading numpy-1.25.1-cp311-cp311-win_amd64.whl.metadata (5.7 kB)
Collecting opencv-python (from -r requirements.txt (line 2))
Obtaining dependency information for opencv-python from https://files.pythonhosted.org/packages/a6/08/583e1d8d589e80a702815f58daa317bd469a32c7dc339394e2a0dc14318b/opencv_python-4.8.0.74-cp37-abi3-win_amd64.whl.metadata
Downloading opencv_python-4.8.0.74-cp37-abi3-win_amd64.whl.metadata (19 kB)
Requirement already satisfied: torch in c:\users\user\appdata\local\programs\python\python311\lib (from -r requirements.txt (line 3)) (2.0.1)
Collecting torchvision (from -r requirements.txt (line 4))
Downloading torchvision-0.15.2-cp311-cp311-win_amd64.whl (1.2 MB)
---------------------------------------- 1.2/1.2 MB 3.8 MB/s eta 0:00:00
Collecting pyobjc-framework-Quartz (from -r requirements.txt (line 5))
Downloading pyobjc-framework-Quartz-9.2.tar.gz (3.9 MB)
---------------------------------------- 3.9/3.9 MB 10.0 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Temp\pip-build-env-e56u5cvz\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Temp\pip-build-env-e56u5cvz\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "C:\Users\User\AppData\Local\Temp\pip-build-env-e56u5cvz\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
exec(code, locals())
File "", line 68, in
File "C:\Users\User\AppData\Local\Temp\pip-install-x60kfd3j\pyobjc-framework-quartz_c2890733cb234c7892ba853630950c2d\pyobjc_setup.py", line 469, in Extension
if "clang" in get_config_var("CC"):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

TypeError: expected Tensor as element 0 in argument 0, but got int

The bot ran fine for the first 50 episodes, then it leaves this error before crashing

Traceback (most recent call last):
File "C\Users\naman\Desktop\GDBot-master\GDBot.py", line 239, in optimize_model()
File "C\Users\naman\Desktop\GDBot-master\GDBot.py", line 152, in optimize_model action_batch = torch.cat(batch.action)
TypeError: expected Tensor as element 0 in argument 0, but got int

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.