Giter Club home page Giter Club logo

snake's Introduction

Snake

The project focuses on the artificial intelligence of the Snake game. The snake's goal is to eat the food continuously and fill the map with its bodies as soon as possible. Originally, the project was written in C++. It has now been rewritten in Python for a user-friendly GUI and the simplicity in algorithm implementations.

Algorithms >

Experiments

We use two metrics to evaluate the performance of an AI:

  1. Average Length: Average length the snake has grown to (max: 64).
  2. Average Steps: Average steps the snake has moved.

Test results (averaged over 1000 episodes):

Solver Demo (optimal) Average Length Average Steps
Hamilton 63.93 717.83
Greedy 60.15 904.56
DQN
(experimental)
24.44 131.69

Installation

Requirements: Python 3.6+ with Tkinter installed.

pip install -r requirements.txt
python run.py [-h]

Run unit tests:

python -m pytest

License

See the LICENSE file for license rights and limitations.

snake's People

Contributors

chuyangliu avatar qypea avatar ramonsaraiva 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snake's Issues

need more explanations for arguments

usage: run.py [-h] [-s {greedy,hamilton,dqn}]
              [-m {normal,bcmk,train_dqn,train_dqn_gui}]

Run snake game agent.

optional arguments:
  -h, --help            show this help message and exit
  -s {greedy,hamilton,dqn}
                        name of the solver to direct the snake (default:
                        hamilton)
  -m {normal,bcmk,train_dqn,train_dqn_gui}
                        game mode (default: normal)

how long it will take to run with dqn solver?

python run.py -s dqn -m train_dqn_gui

image

39680 illegal hardware instruction macOS

Everything is fine

  • macOS : 10.14.6
  • CPU : Intel Core i7
  • Ram : 8 GB
  • Python : 3.7.12

Virtualenv installed, and all requirements installed (no error)

python run.py give me :

[1]    39680 illegal hardware instruction  python run.py

Shouldn't the values be declared in a .cpp file?

I got 79 errors most of them are related to this problem, "only static const integral data members can be initialized within a class". Shouldn't the values of a class be declared in a .cpp file?
screesht

keep_dims is deprecated, use keepdims instead at snake\solver\dqn\__init__.py:331

run.py -s dqn Solver: DQNSolver Mode: GameMode.NORMAL
WARNING:tensorflow:From H:\git\python\snake\snake\snake\solver\dqn_init_.py:331: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating: keep_dims is deprecated, use keepdims instead。

Crashes on mac 10.12 sierra

Having issues running it on OS X Sierra:

MacBook-Pro:Snake nikolamarkovic$ python3 run.py
Solver: HamiltonSolver Mode: GameMode.NORMAL
2018-04-08 10:31:45.497 Python[9496:4740162] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fbf32ead3c0
2018-04-08 10:31:45.498 Python[9496:4740162] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fbf32ead3c0'
*** First throw call stack:
(
0 CoreFoundation 0x00007fffcdd1d2cb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffe2b3448d objc_exception_throw + 48
2 CoreFoundation 0x00007fffcdd9ef04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fffcdc8f755 forwarding + 1061
4 CoreFoundation 0x00007fffcdc8f2a8 _CF_forwarding_prep_0 + 120
5 Tk 0x0000000109491c02 TkpInit + 471
6 Tk 0x000000010940d2a9 Tk_Init + 1794
7 _tkinter.cpython-36m-darwin.so 0x00000001092e8de3 Tcl_AppInit + 82
8 _tkinter.cpython-36m-darwin.so 0x00000001092e454d _tkinter_create + 1040
9 Python 0x00000001089616c1 _PyCFunction_FastCallDict + 166
10 Python 0x00000001089c600f call_function + 489
11 Python 0x00000001089beecc _PyEval_EvalFrameDefault + 4930
12 Python 0x00000001089c67df _PyEval_EvalCodeWithName + 1829
13 Python 0x00000001089c6ecb fast_function + 227
14 Python 0x00000001089c5fe6 call_function + 448
15 Python 0x00000001089beecc _PyEval_EvalFrameDefault + 4930
16 Python 0x00000001089c67df _PyEval_EvalCodeWithName + 1829
17 Python 0x00000001089c7096 _PyFunction_FastCallDict + 444
18 Python 0x0000000108929ab9 _PyObject_FastCallDict + 196
19 Python 0x0000000108929bdc _PyObject_Call_Prepend + 156
20 Python 0x000000010892993a PyObject_Call + 101
21 Python 0x00000001089748fa slot_tp_init + 57
22 Python 0x0000000108971846 type_call + 184
23 Python 0x0000000108929a84 _PyObject_FastCallDict + 143
24 Python 0x00000001089c5fdf call_function + 441
25 Python 0x00000001089beecc _PyEval_EvalFrameDefault + 4930
26 Python 0x00000001089c67df _PyEval_EvalCodeWithName + 1829
27 Python 0x00000001089c6ecb fast_function + 227
28 Python 0x00000001089c5fe6 call_function + 448
29 Python 0x00000001089beecc _PyEval_EvalFrameDefault + 4930
30 Python 0x00000001089c67df _PyEval_EvalCodeWithName + 1829
31 Python 0x00000001089bdb15 PyEval_EvalCode + 43
32 Python 0x00000001089e525a run_mod + 54
33 Python 0x00000001089e553a PyRun_FileExFlags + 180
34 Python 0x00000001089e4ac7 PyRun_SimpleFileExFlags + 280
35 Python 0x00000001089f8878 Py_Main + 3268
36 Python 0x0000000108917e1d Python + 7709
37 libdyld.dylib 0x00007fffe341a235 start + 1
38 ??? 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

Thoughts?

Questions about the local state usage and PER updates

@chuyangliu Could you help me, please, with some questions?

  1. I read in your docs, about the algorithms, that you're using a local state vector:

The second part is the local state vector, which tells the snake its surrounding situation. The vector contains 3 values (0 or 1), indicating whether the point in front/left/right of the snake head is dangerous (i.e., wall or body in the direction).

I'm achieving more or less the same performance as you in the global state, but the local state brought, as you showed, huge improvements. In you code, you verify which of those (3 or 4) positions are safe, flatten and then you stack them horizontally (axis = 1) with the stack vector, right? Is it enough to make it usable by the model? Also, everything that is food or body or important, you assign as 1. But does the network understand by itself which is which (to get objectives like food, or avoid the body...)?

Your code

def _state(self):
        """Return a vector indicating current state."""

        # Visual state
        visual_state = np.zeros(self._SHAPE_VISUAL_STATE, dtype=np.int32)
        for i in range(1, self.map.num_rows - 1):
            for j in range(1, self.map.num_cols - 1):

                pos = Pos(i, j)
                if self._USE_RELATIVE:
                    if self.snake.direc == Direc.LEFT:
                        pos = Pos(self.map.num_rows - 1 - j, i)
                    elif self.snake.direc == Direc.UP:
                        pos = Pos(i, j)
                    elif self.snake.direc == Direc.RIGHT:
                        pos = Pos(j, self.map.num_cols - 1 - i)
                    elif self.snake.direc == Direc.DOWN:
                        pos = Pos(self.map.num_rows - 1 - i, self.map.num_cols - 1 - j)

                t = self.map.point(pos).type
                if t == PointType.EMPTY:
                    visual_state[i - 1][j - 1][0] = 1
                elif t == PointType.FOOD:
                    visual_state[i - 1][j - 1][1] = 1
                elif t == PointType.HEAD_L or t == PointType.HEAD_U or \
                     t == PointType.HEAD_R or t == PointType.HEAD_D:
                    visual_state[i - 1][j - 1][2] = 1
                elif t == PointType.BODY_LU  or t == PointType.BODY_UR or \
                     t == PointType.BODY_RD  or t == PointType.BODY_DL or \
                     t == PointType.BODY_HOR or t == PointType.BODY_VER:
                    visual_state[i - 1][j - 1][3] = 1
                else:
                    raise ValueError("Unsupported PointType: {}".format(t))

        if self._USE_VISUAL_ONLY:
            return visual_state.flatten()
        else:
            # Important state
            important_state = np.zeros(self._NUM_IMPORTANT_FEATURES, dtype=np.int32)
            head = self.snake.head()

            if self._USE_RELATIVE:
                for i, action in enumerate([SnakeAction.LEFT, SnakeAction.FORWARD, SnakeAction.RIGHT]):
                    direc = SnakeAction.to_direc(action, self.snake.direc)
                    if not self.map.is_safe(head.adj(direc)):
                        important_state[i] = 1
            else:
                for i, direc in enumerate([Direc.LEFT, Direc.UP, Direc.RIGHT, Direc.DOWN]):
                    if not self.map.is_safe(head.adj(direc)):
                        important_state[i] = 1

            return np.hstack((visual_state.flatten(), important_state))

My code

    def state(self):
        """Create a matrix of the current state of the game."""
        body = self.snake.return_body()
        canvas = zeros((var.BOARD_SIZE, var.BOARD_SIZE))

        for part in body:
            canvas[part[0] - 1, part[1] - 1] = 1.

        canvas[self.food_pos[0] - 1, self.food_pos[1] - 1] = .5

        return canvas
  1. For implementing PER, what weights do you use? Absolute difference between Q(s,a) and Q(s',a') or the MSE? Do you always update the PER in the observations you batched?

Originally posted by @Neves4 in 5a18244#commitcomment-30772870

Metrics for DQN

[2019-11-26 16:47:57] step 1080000 | mem_cnt: 4419996 | epsilon: 0.010000 | beta: 1.000000 | avg_reward: 13.777500 | avg_len: 18.70 | avg_steps: 100.20 | model saved | loss: 0.001516 | target net replaced

Can you explain what these metrics stand for ?

image

Illegal instruction (core dumped)

I am trying to run this on ubuntu and it just gives me this errors

python -m pytest
/usr/bin/python: No module named pytest
python3 -m pytest
========================================================= test session starts =========================================================
platform linux -- Python 3.8.10, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
rootdir: /home/user/bin/Eric7_workspace/snake
plugins: asyncio-0.10.0, anyio-4.0.0
collecting ... Fatal Python error: Illegal instruction

Current thread 0x00007fa99a4a4740 (most recent call first):
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1166 in create_module
  File "<frozen importlib._bootstrap>", line 556 in module_from_spec
  File "<frozen importlib._bootstrap>", line 657 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 64 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 848 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1042 in _handle_fromlist
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tfe.py", line 28 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 848 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1042 in _handle_fromlist
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/eager/context.py", line 35 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 848 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1042 in _handle_fromlist
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/__init__.py", line 40 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 848 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 961 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/__init__.py", line 41 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 848 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/home/user/bin/Eric7_workspace/snake/snake/solver/dqn/__init__.py", line 7 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 848 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/home/user/bin/Eric7_workspace/snake/snake/solver/__init__.py", line 1 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 848 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/home/user/bin/Eric7_workspace/snake/snake/game.py", line 10 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 848 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/home/user/bin/Eric7_workspace/snake/tests/gui/test_gui.py", line 2 in <module>
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/assertion/rewrite.py", line 170 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 1014 in _gcd_import
  File "/usr/lib/python3.8/importlib/__init__.py", line 127 in import_module
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/pathlib.py", line 531 in import_path
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/python.py", line 578 in _importtestmodule
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/python.py", line 500 in _getobj
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/python.py", line 291 in obj
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/python.py", line 516 in _inject_setup_module_fixture
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/python.py", line 503 in collect
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/runner.py", line 341 in <lambda>
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/runner.py", line 311 in from_call
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/runner.py", line 341 in pytest_make_collect_report
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/runner.py", line 458 in collect_one_node
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/main.py", line 808 in genitems
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/main.py", line 634 in perform_collect
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/main.py", line 333 in pytest_collection
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/main.py", line 322 in _main
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/main.py", line 269 in wrap_session
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/main.py", line 316 in pytest_cmdline_main
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/home/user/.local/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/config/__init__.py", line 162 in main
  File "/home/user/.local/lib/python3.8/site-packages/_pytest/config/__init__.py", line 185 in console_main
  ...
Illegal instruction (core dumped)
user@user-System:~/bin/Eric7_workspace/snake$ python run.py -s
  File "run.py", line 38
    print(f"Solver: {conf.solver_name}   Mode: {conf.mode}")
                                                          ^
SyntaxError: invalid syntax
user@user-System:~/bin/Eric7_workspace/snake$ python run.py
  File "run.py", line 38
    print(f"Solver: {conf.solver_name}   Mode: {conf.mode}")
                                                          ^
SyntaxError: invalid syntax
user@user-System:~/bin/Eric7_workspace/snake$ python3 run.py -s
Illegal instruction (core dumped)

Bug

I change the size of the map to 100*100. And obviously, it moves so slow and when its length
its route isn't the best one.
There are a screen picture and a vedio.
I thought if the snake's lenght is less than the lenght of the food it reaches ,it can go left or right and then go up or down .
I wish the message can help you
image
序列 01.zip

ERROR

I am getting this errror Traceback (most recent call last):
File "/Users/bob/Downloads/snake-master/run.py", line 3, in
from snake.game import Game, GameConf, GameMode
File "/Users/bob/Downloads/snake-master/snake/game.py", line 10, in
from snake.solver import DQNSolver, GreedySolver, HamiltonSolver
File "/Users/bob/Downloads/snake-master/snake/solver/init.py", line 1, in
from snake.solver.dqn import DQNSolver
File "/Users/bob/Downloads/snake-master/snake/solver/dqn/init.py", line 4, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'

OSX build issues

I'm having some issues when trying to build it in OSX. I know it is not yet supported, maybe someone fixed it and could help?

[ 33%] Building CXX object CMakeFiles/snake.dir/src/GameCtrl.cpp.o /Users/ramon/fun/snake/src/GameCtrl.cpp:56:5: error: use of undeclared identifier 'exit' exit(0); ^ 1 error generated. make[2]: *** [CMakeFiles/snake.dir/src/GameCtrl.cpp.o] Error 1 make[1]: *** [CMakeFiles/snake.dir/all] Error 2 make: *** [all] Error 2

  • Version of cmake is 3.7.1
  • g++: Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 8.0.0 (clang-800.0.42.1) Target: x86_64-apple-darwin16.3.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

ImportError: DLL load failed: The specified procedure could not be found.

I got the following error while I tried executing the repo:

Traceback (most recent call last):
  File "run.py", line 7, in <module>
    from snake.game import Game, GameConf, GameMode
  File "G:\AI IA 2\AiSnake\Snake\snake\game.py", line 12, in <module>
    from snake.solver import DQNSolver, GreedySolver, HamiltonSolver
  File "G:\AI IA 2\AiSnake\Snake\snake\solver\__init__.py", line 9, in <module>
    from snake.solver.dqn import DQNSolver
  File "G:\AI IA 2\AiSnake\Snake\snake\solver\dqn\__init__.py", line 11, in <module>
    import tensorflow as tf
  File "G:\AI IA 2\AiSnake\lib\site-packages\tensorflow\__init__.py", line 22, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "G:\AI IA 2\AiSnake\lib\site-packages\tensorflow\python\__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "G:\AI IA 2\AiSnake\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
  File "G:\AI IA 2\AiSnake\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
ImportError: DLL load failed: The specified procedure could not be found.

Kindly help at the earliest possible.

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.