diff --git a/.gitignore b/.gitignore index 4a61df8..56ac0ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ # ignore all pyc files. *.pyc - +*.venv +*/.venv diff --git a/README.md b/README.md index e7336ab..560d447 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This project follows the description of the Deep Q Learning algorithm described ## Installation Dependencies: * Python 2.7 or 3 -* TensorFlow 0.7 +* TensorFlow >= 1.15.0 * pygame * OpenCV-Python diff --git a/deep_q_network.py b/deep_q_network.py index 1294f96..f55970d 100755 --- a/deep_q_network.py +++ b/deep_q_network.py @@ -1,11 +1,11 @@ #!/usr/bin/env python from __future__ import print_function - -import tensorflow as tf +import tensorflow.compat.v1 as tf # type: ignore +tf.disable_v2_behavior() # Changed: Preserves the latest TensorFlow (old-legacy) features import cv2 import sys sys.path.append("game/") -import wrapped_flappy_bird as game +import wrapped_flappy_bird as game # type: ignore import random import numpy as np from collections import deque