Game-Bot icon indicating copy to clipboard operation
Game-Bot copied to clipboard

Fixed Entire Code to a working point and some grammar fixes

Open FidgetySo opened this issue 4 years ago • 13 comments

FidgetySo avatar Jan 25 '21 01:01 FidgetySo

No description provided.

It seems that the original project is no longer maintained. Do you plan to continue?

2563411574 avatar Jan 30 '21 14:01 2563411574

I am not a 100% sure if I plan to continue I might there and there of issues but not much you can continue based on how this code works. All I could do is complete the mouse inputs and that is really about it.

FidgetySo avatar Mar 08 '21 16:03 FidgetySo

Thanks very much for your work on this @FidgetySo. Does this PR work yet? How much more is left to go?

dav-ell avatar Mar 25 '21 18:03 dav-ell

I feel like the model could be improved but besides that I think it is somewhat working like an 80%. I also should update the requirements

FidgetySo avatar Mar 28 '21 14:03 FidgetySo

When I install the requirements it keeps saying that there is no version of tenserflow==1.9.0

Userman1242 avatar Apr 04 '22 04:04 Userman1242

When I install the requirements it keeps saying that there is no version of tenserflow==1.9.0

Newer versions of python3 won't support tensorflow 1.9.0. The version that works best for me is python 3.6.5

Edit: Also use anaconda for various installed versions of python for the best support for most things (venv also works but never used it and I know anaconda is much more largerly supported and is always being updated but not sure about virtual env)

FidgetySo avatar Apr 09 '22 17:04 FidgetySo

FidgetySo thanks for your continue support!, i wish test this compatible with only 1 version of python 😄

YinDragonSS avatar Jun 24 '22 08:06 YinDragonSS

Hi, my name is Michael, and I am having a problem with your production here and I am going to list what my problem is here and hopefully someone can help me with it. Here is where I am having the problem thanks in advance:

D:\1\python3.dll

This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed , create an association in the Default Apps Settings page.

ThatMichaelGuy2020 avatar Sep 08 '22 07:09 ThatMichaelGuy2020

(gamebot) C:\WBC\Game-Bot-master-1>python create_dataset.py
Key Pressed: Key.up
Unhandled exception in listener callback
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\pynput\_util\__init__.py", line 228, in inner
    return f(self, *args, **kwargs)
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\pynput\keyboard\_win32.py", line 287, in _process
    self.on_press(key)
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\pynput\_util\__init__.py", line 144, in inner
    if f(*args) is False:
  File "create_dataset.py", line 129, in on_press
    save_event_keyboard(data_path, 1, key)
  File "create_dataset.py", line 48, in save_event_keyboard
    screenshot = get_screenshot()
  File "create_dataset.py", line 33, in get_screenshot
    img = img.resize((img.size[0] / 12, img.size[1] / 12), resample=Image.BICUBIC)
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\PIL\Image.py", line 1922, in resize
    return self._new(self.im.resize(size, resample, box))
TypeError: integer argument expected, got float
Traceback (most recent call last):
  File "create_dataset.py", line 152, in <module>
    main()
  File "create_dataset.py", line 148, in main
    listen_keyboard()
  File "create_dataset.py", line 135, in listen_keyboard
    listener.join()
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\pynput\_util\__init__.py", line 276, in join
    six.reraise(exc_type, exc_value, exc_traceback)
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\six.py", line 718, in reraise
    raise value.with_traceback(tb)
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\pynput\_util\__init__.py", line 228, in inner
    return f(self, *args, **kwargs)
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\pynput\keyboard\_win32.py", line 287, in _process
    self.on_press(key)
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\pynput\_util\__init__.py", line 144, in inner
    if f(*args) is False:
  File "create_dataset.py", line 129, in on_press
    save_event_keyboard(data_path, 1, key)
  File "create_dataset.py", line 48, in save_event_keyboard
    screenshot = get_screenshot()
  File "create_dataset.py", line 33, in get_screenshot
    img = img.resize((img.size[0] / 12, img.size[1] / 12), resample=Image.BICUBIC)
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\PIL\Image.py", line 1922, in resize
    return self._new(self.im.resize(size, resample, box))
TypeError: integer argument expected, got float
Data/Train_Data/Mouse 439 718 Button.left True
Unhandled exception in listener callback
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\pynput\_util\win32.py", line 386, in _handler
    converted = self._convert(code, msg, lpdata)
  File "C:\ProgramData\Anaconda3\envs\gamebot\lib\site-packages\pynput\_util\win32.py", line 401, in _convert
    raise NotImplementedError()
NotImplementedError

I can't run it gives an error. Can you tell me what to do?

Aspector1 avatar Oct 19 '22 12:10 Aspector1

@FidgetySo hi ,thanks for your sharing, but how to know train is complete? I try to run ai.py, but no any response, so could you help me to know more details about this opensource?

m31527 avatar Oct 31 '22 01:10 m31527

@Aspector1 try to replace "/" to double "//" as below

File "create_dataset.py", line 33, in get_screenshot img = img.resize((img.size[0] // 12, img.size[1] //12), resample=Image.BICUBIC)

m31527 avatar Nov 01 '22 14:11 m31527

@Aspector1 try to replace "/" to double "//" as below

File "create_dataset.py", line 33, in get_screenshot img = img.resize((img.size[0] // 12, img.size[1] //12), resample=Image.BICUBIC)

@m31527, thanks, it worked, but now I have another error in train.py

Traceback (most recent call last):
  File "train.py", line 60, in <module>
    main()
  File "train.py", line 51, in main
    x, x_test, y, y_test, action_total = get_dataset()
  File "C:\WBC\Game-Bot-master-1\get_dataset.py", line 68, in get_dataset
    img = get_img(datas_path + '/' + data)
  File "C:\WBC\Game-Bot-master-1\get_dataset.py", line 25, in get_img
    img = img(Image.fromarray(img).resize((size[0] * 4, size[1] * 4),
TypeError: 'function' object is not subscriptable

Aspector1 avatar Nov 02 '22 09:11 Aspector1