From c0ebafc6433931825d7c052c879368fb7459838c Mon Sep 17 00:00:00 2001 From: hellowaste344 Date: Sat, 25 Jul 2026 13:53:45 +0300 Subject: [PATCH 1/2] added old legacy compatibility, updated gitignore --- .gitignore | 3 ++- deep_q_network.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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/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 From 817083863ae3fd54515a90105e2114055055b598 Mon Sep 17 00:00:00 2001 From: hellowaste344 Date: Sat, 25 Jul 2026 14:01:26 +0300 Subject: [PATCH 2/2] updated Tensorflow Version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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