Giter VIP home page Giter VIP logo

Comments (18)

Gablers avatar Gablers commented on July 2, 2024

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.

ardamavi avatar ardamavi commented on July 2, 2024

Can you share all output?

from game-bot.

Gablers avatar Gablers commented on July 2, 2024

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.

Gablers avatar Gablers commented on July 2, 2024

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.

ardamavi avatar ardamavi commented on July 2, 2024

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.

Gablers avatar Gablers commented on July 2, 2024

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.

ardamavi avatar ardamavi commented on July 2, 2024

You must create a dataset firstly.
Learn how to do this from the README file: ardamavi/Game-Bot#creating-training-dataset

from game-bot.

Gablers avatar Gablers commented on July 2, 2024

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.

ardamavi avatar ardamavi commented on July 2, 2024

I fixed this error in new commit.
Thanks.

from game-bot.

Gablers avatar Gablers commented on July 2, 2024

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.

ardamavi avatar ardamavi commented on July 2, 2024

What character did you press?

from game-bot.

Gablers avatar Gablers commented on July 2, 2024

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.

ardamavi avatar ardamavi commented on July 2, 2024

I guess a character isn't saved?

from game-bot.

Gablers avatar Gablers commented on July 2, 2024

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.

ardamavi avatar ardamavi commented on July 2, 2024

You must show how to play game to AI. We run Create Dataset` for getting dataset for training AI.

from game-bot.

Gablers avatar Gablers commented on July 2, 2024

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.

ardamavi avatar ardamavi commented on July 2, 2024

I need more detailed information to solve the problem.

from game-bot.

Gablers avatar Gablers commented on July 2, 2024

I shall record myself.

from game-bot.

Related Issues (20)

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.