Comments (18)
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
Is what I've gotten now.
I got past the other stuff earlier today.
from game-bot.
Can you share all output?
from game-bot.
Using TensorFlow backend.
AI start now!
Traceback (most recent call last):
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\ai.py", line 58, in
main()
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\ai.py", line 28, in main
Y = predict(model, img)
NameError: name 'img' is not defined
This is for ai.py
I've ran all the other .py's too.
from game-bot.
Also, when using cmd in the folder
"ai.py" returns:
Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\ai.py", line 58, in
main()
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\ai.py", line 14, in main
model_file = open('Data/Model/model.json', 'r')
FileNotFoundError: [Errno 2] No such file or directory: 'Data/Model/model.json'
from game-bot.
For first error:
Update img
with screen
. I do it with new commit.
For second error:
Train your model before running the AI with python3 train.py
.
from game-bot.
I updated the ai.py got this error
Using TensorFlow backend. AI start now! Traceback (most recent call last): File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\ai.py", line 58, in <module> main() File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\ai.py", line 29, in main if Y == [0,0,0,0]: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
This error is from train.py
`Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\get_dataset.py", line 21, in get_dataset
X = np.load('Data/npy_train_data/X.npy')
File "C:\Users\jakef\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\npyio.py", line 415, in load
fid = open(os_fspath(file), "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'Data/npy_train_data/X.npy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\train.py", line 31, in
main()
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\train.py", line 24, in main
X, X_test, Y, Y_test = get_dataset()
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\get_dataset.py", line 24, in get_dataset
labels = os.listdir(dataset_path) # Geting labels
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'Data/Train_Data'`
I'd like to thank you for the help, too.
from game-bot.
You must create a dataset firstly.
Learn how to do this from the README file: ardamavi/Game-Bot#creating-training-dataset
from game-bot.
Thanks again for your patients. I ran the create_dataset. This was the result:
Using TensorFlow backend. Traceback (most recent call last): File "create_dataset.py", line 76, in <module> main() TypeError: main() missing 1 required positional argument:
from game-bot.
I fixed this error in new commit.
Thanks.
from game-bot.
Another issue, create_dataset.py :
`
C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\create_dataset.py =
Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\create_dataset.py", line 76, in <module>
main()
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\create_dataset.py", line 72, in main
listen_keyboard()
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\create_dataset.py", line 63, in listen_keyboard
listener.join()
File "C:\Users\jakef\AppData\Local\Programs\Python\Python36\lib\site-packages\pynput\_util\__init__.py", line 199, in join
six.reraise(exc_type, exc_value, exc_traceback)
File "C:\Users\jakef\AppData\Local\Programs\Python\Python36\lib\site-packages\six.py", line 692, in reraise
raise value.with_traceback(tb)
File "C:\Users\jakef\AppData\Local\Programs\Python\Python36\lib\site-packages\pynput\_util\__init__.py", line 154, in inner
return f(self, *args, **kwargs)
File "C:\Users\jakef\AppData\Local\Programs\Python\Python36\lib\site-packages\pynput\keyboard\_win32.py", line 237, in _process
self.on_press(key)
File "C:\Users\jakef\AppData\Local\Programs\Python\Python36\lib\site-packages\pynput\_util\__init__.py", line 75, in inner
if f(*args) is False:
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\create_dataset.py", line 57, in on_press
save_event_keyboard(data_path, 1, key)
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\create_dataset.py", line 25, in save_event_keyboard
key = get_id(key)
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\game_control.py", line 13, in get_id
return get_keys().index(key)
ValueError: <Key.enter: <13>> is not in list
>>>
`
from game-bot.
What character did you press?
from game-bot.
Not sure I did, I just ran it
Using create_dataset while playing, it didn't recognise CTRL, ALT.
Also, Using train.py gave this.
Game-Bot-master>train.py
Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\get_dataset.py", line 21, in get_dataset
X = np.load('Data/npy_train_data/X.npy')
File "C:\Users\jakef\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\npyio.py", line 415, in load
fid = open(os_fspath(file), "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'Data/npy_train_data/X.npy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\train.py", line 31, in <module>
main()
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\train.py", line 24, in main
X, X_test, Y, Y_test = get_dataset()
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\get_dataset.py", line 41, in get_dataset
Y = to_categorical(Y, count_categori[0]+1)
File "C:\Users\jakef\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\utils\np_utils.py", line 31, in to_categorical
num_classes = np.max(y) + 1
File "C:\Users\jakef\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\core\fromnumeric.py", line 2505, in amax
initial=initial)
File "C:\Users\jakef\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\core\fromnumeric.py", line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity
from game-bot.
I guess a character isn't saved?
from game-bot.
It seems upon pressing CTRL or ALT, it completely closes.
I don't suppose you know of another program that may do this job?
It seems I can't get any further with ai.py either.
''
Using TensorFlow backend.
AI start now!
Traceback (most recent call last):
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\ai.py", line 59, in <module>
dain()
File "C:\Users\jakef\OneDrive\Desktop\Game-Bot-master\ai.py", line 30, in dain
if Y == [0,0,0,0]:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
''
from game-bot.
You must show how to play game to AI. We run Create
Dataset` for getting dataset for training AI.
from game-bot.
I understand it learns from you playing, but it physically doesn't run, unfortunately.
I run CreateDataset
And it closes abruptly while I play, making it impossible to record my actions
from game-bot.
I need more detailed information to solve the problem.
from game-bot.
I shall record myself.
from game-bot.
Related Issues (20)
- Many Errors HOT 1
- versions
- some keys wont work HOT 2
- mac support HOT 1
- Error in create_dataset.py HOT 1
- The key presses being passed to game_control.py aren't formatted right
- ImportError: cannot import name 'imresize' from 'scipy.misc' HOT 4
- SyntaxError: invalid syntax
- This project is still being worked on ? HOT 8
- Not working on mac M1
- Module not found error
- how do i fix this.
- Traceback (most recent call last): File "C:\Users\OneDrive\Desktop\Game-Bot-master\Game-Bot-master\train.py", line 4, in <module> from get_dataset import get_dataset File "C:\Users\OneDrive\Desktop\Game-Bot-master\Game-Bot-master\get_dataset.py", line 4, in <module> from keras.utils import to_categorical ImportError: cannot import name 'to_categorical' from 'keras.utils' (C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\keras\utils\__init__.py) ------------------ (program exited with code: 1) Press any key to continue . . . HOT 1
- how do i get everything to work HOT 2
- Lots of errors
- issue with imwrite HOT 1
- Gg
- FileNotFoundError: [Errno 2] No such file or directory: 'Data/Model/model.json' HOT 1
- Tensorflow and keras doesn't give me to create_dataset and also code doesn't actually worked then i made everything like readme file so i have no idea what to do
- I can't train or run Ai.py and train.py and i don't know why HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from game-bot.