Giter VIP home page Giter VIP logo

autobtd6's Issues

invalid arguments! exiting!

I created my own playthrough by recording a playthrough, everything seems in order until I want to play the playthrough...

(OwnML) E:\Visual Studio projects\SerpentAI\AutoBTD6>python replay.py monkey_meadow#easy#1920x1080.btd6
2023-09-20 01:19:37.762547: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
[2023-09-20 01:19:38] stats logging enabled!
[2023-09-20 01:19:38] "-mk" (for monkey knowledge enabled) or "-nomk" (for monkey knowledge disabled) must be specified! exiting!

(OwnML) E:\Visual Studio projects\SerpentAI\AutoBTD6>python replay.py monkey_meadow#easy#1920x1080.btd6 -nomk
2023-09-20 01:19:48.899565: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
[2023-09-20 01:19:49] stats logging enabled!
[2023-09-20 01:19:49] ignoring playthroughs with monkey knowledge enabled!
[2023-09-20 01:19:49] invalid arguments! exiting!

Why is it telling me that I have invalid arguments?

DLL porblem

when implement this

D:\AutoBTD6-main>py replay.py mm -mk -r
Traceback (most recent call last):
File "C:\Python\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 62, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 找不到指定的模組。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\AutoBTD6-main\replay.py", line 2, in
from ocr import custom_ocr
File "D:\AutoBTD6-main\ocr.py", line 3, in
import keras
File "C:\Python\lib\site-packages\keras_init_.py", line 21, in
from keras import models
File "C:\Python\lib\site-packages\keras\models_init_.py", line 18, in
from keras.engine.functional import Functional
File "C:\Python\lib\site-packages\keras\engine\functional.py", line 24, in
import tensorflow.compat.v2 as tf
File "C:\Python\lib\site-packages\tensorflow_init_.py", line 37, in
from tensorflow.python.tools import module_util as module_util
File "C:\Python\lib\site-packages\tensorflow\python_init
.py", line 36, in
from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
File "C:\Python\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 77, in
raise ImportError(
ImportError: Traceback (most recent call last):
File "C:\Python\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 62, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 找不到指定的模組。

I don't know which DLL missing
Can I ask every pip's version .
here is my pip's version :
absl-py 1.3.0
ahk 0.14.2
astunparse 1.6.3
cachetools 5.2.0
certifi 2022.12.7
charset-normalizer 2.1.1
flatbuffers 22.12.6
gast 0.4.0
google-auth 2.15.0
google-auth-oauthlib 0.4.6
google-pasta 0.2.0
grpcio 1.51.1
h5py 3.7.0
idna 3.4
importlib-metadata 5.2.0
Jinja2 3.1.2
keras 2.11.0
keyboard 0.13.5
libclang 14.0.6
Markdown 3.4.1
MarkupSafe 2.1.1
MouseInfo 0.1.3
numpy 1.19.3
oauthlib 3.2.2
opencv-python 4.6.0.66
opt-einsum 3.3.0
packaging 22.0
Pillow 9.3.0
pip 20.2.3
protobuf 3.19.6
pyasn1 0.4.8
pyasn1-modules 0.2.8
PyAutoGUI 0.9.53
PyGetWindow 0.0.9
PyMsgBox 1.0.9
pyperclip 1.8.2
PyRect 0.2.0
PyScreeze 0.1.28
pytweening 1.0.4
requests 2.28.1
requests-oauthlib 1.3.1
rsa 4.9
setuptools 49.2.1
six 1.16.0
tensorboard 2.11.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
tensorflow 2.11.0
tensorflow-estimator 2.11.0
tensorflow-intel 2.11.0
tensorflow-io-gcs-filesystem 0.29.0
termcolor 2.1.1
typing-extensions 4.4.0
urllib3 1.26.13
Werkzeug 2.2.2
wheel 0.38.4
wrapt 1.14.1
zipp 3.11.0

Video Tutorial

I am new to python and a video tutorial would be quite handy for the install :). Thank you!

New feature help

Hi, I'm working on a feature that allows users to wait for a spesific round before performing an action.
This is to allow playthroughs to be possible on advanced maps like glacial trail since it allows selling after an interval and round dependant placements.

However, the image recognition model cannot recognise the / in the displayed round and recognises it as a 2.

Please could you release the data and code you used to train the model so that I can train it on the slash aswell (or suggest an alternate solution).

Thanks!

Too complicated for me :)

Hi, I wanted to ask if there is a more userfriendly guide avaiable. I tried it with the written guide on the page, but I couldnt get everything to work.

break when starting

So its hard to explain, but evrytime i try to start it works, but doesnt do what its supposed to.

What i mean by that is:
It keeps pressing esc so i get back to main screen and get "Do you want to quit"
Screenshot 2023-02-03 175215

AHK not found on PATH

Traceback (most recent call last):
File "C:\Users\orsin\Desktop\AutoBTD6-main\replay.py", line 1, in
from helper import *
File "C:\Users\orsin\Desktop\AutoBTD6-main\helper.py", line 20, in
ahk = AHK()
File "C:\Users\orsin\AppData\Roaming\Python\Python310\site-packages\ahk_sync\engine.py", line 138, in init
transport = TransportClass(executable_path=executable_path, directives=directives)
File "C:\Users\orsin\AppData\Roaming\Python\Python310\site-packages\ahk_sync\transport.py", line 662, in init
super().init(executable_path=executable_path, directives=directives)
File "C:\Users\orsin\AppData\Roaming\Python\Python310\site-packages\ahk_sync\transport.py", line 325, in init
self._executable_path: str = _resolve_executable_path(executable_path=executable_path)
File "C:\Users\orsin\AppData\Roaming\Python\Python310\site-packages\ahk_sync\transport.py", line 291, in _resolve_executable_path
raise AhkExecutableNotFoundError(
ahk._sync.transport.AhkExecutableNotFoundError: Could not find AutoHotkey.exe on PATH. Provide the absolute path with the executable_path keyword argument or in the AHK_PATH environment variable. You may be able to resolve this error by installing the binary extra: pip install "ahk[binary]"

I installed ahk[binary] too but it didn't fix anything

Own playthrough doesnt work

So i made a playthrough for the new expert map, but it doesnt work for some reason
Bild_2023-02-25_223725430

hero etienne
map dark dungeons
mode easy

Code is:

place etienne hero0 at 763, 1282
place sub sub0 at 1827, 1150
upgrade sub0 path 0
upgrade sub0 path 0
place dart dart0 at 326, 1064
upgrade dart0 path 2
upgrade dart0 path 2
upgrade dart0 path 2
upgrade dart0 path 0
upgrade dart0 path 0
place dart dart1 at 2137, 1177
upgrade dart1 path 2
upgrade dart1 path 2
upgrade dart1 path 2
upgrade dart1 path 0
upgrade dart1 path 0
upgrade sub0 path 1
upgrade sub0 path 1
upgrade sub0 path 1
upgrade dart0 path 2
upgrade dart1 path 2
retarget sub0
retarget sub0
retarget sub0
place dart dart2 at 995, 1272
upgrade dart2 path 2
upgrade dart2 path 2
upgrade dart2 path 2
upgrade dart2 path 0
upgrade dart2 path 0
upgrade dart2 path 2
upgrade sub0 path 1
place bomb bomb0 at 1229, 1318
upgrade bomb0 path 1
upgrade bomb0 path 1
upgrade bomb0 path 1
upgrade bomb0 path 1
upgrade bomb0 path 0
upgrade bomb0 path 0

Import Error for pyautogui

$ python replay.py l
Traceback (most recent call last):
File "C:\Users\Cobalt\Desktop\AutoBTD6-main\replay.py", line 1, in
from helper import *
File "C:\Users\Cobalt\Desktop\AutoBTD6-main\helper.py", line 4, in
import pyautogui
File "C:\Users\Cobalt\AppData\Roaming\Python\Python311\site-packages\pyautogui_init_.py", line 542, in
from . import _pyautogui_win as platformModule
ImportError: cannot import name 'pyautogui_win' from partially initialized module 'pyautogui' (most likely due to a circular import) (C:\Users\Cobalt\AppData\Roaming\Python\Python311\site-packages\pyautogui_init.py)

I'm pretty certain this issue could be solved with experience in coding but I have none. Scowered and no solution was found. Could you please teach how to fix this?

detected money: -1

hello
the money detection system isn't working sometimes with 1920x1080 (i'm also playing with my own 1920x1080 recorded map).
sometimes the detected money is -1 or sometimes it's not recognizing a number for example:
my real amount of money is 1,700 but it only recognizes 700.

Hero Selection Skips over Churchill

For every hero after Obyn, the hero selector selects the hero after the hero it's supposed to.

Example:
Obyn is desired hero -> Obyn is selected as expected
(same goes for first three heroes, they are selected as expected)

Churchill is desired hero -> Benjamin is selected
(same goes for each hero after this, it selects the hero after them)

Dark Castle hard

Thanks for the amazing code. It's going to be a lot of fun to play with.

I ran into an issue running Dark Castle hard. I tried several times with the exact same result: camo balloons ended the run every time before the village came out. I edited the playthrough file and moved the village + path 1 before the upgrading of druids, and that resulted in only 1 camo balloon getting through. However, much later on round 40, the moab almost ended the run (it would have if I didn't have shields + nails from MK).

Some side issues:

  1. I got the game free from Epic a few days ago. After some debugging of the python script, I found a difference between the searched window title "BloonsTD6" and the actual title "BloonsTD6-Epic" and adjusted it for my game.
  2. After it places the hero and between $900 and $1600, it consistently says screen UNKNOWN and pauses the game about 6 times. Afterwards, it doesn't do that anymore and behaves perfectly. There's a solid minute where it behaves fine after placing the druid. FYI: running 2560x1440 full screen (screenshot attached)
    ss

Own replay error

Hi, I tried to record the gameplay using the provided tool, but when i try to run it i get this error, any idea what i did wrong?

Traceback (most recent call last): File "D:\branch\AutoBTD6\replay.py", line 1218, in <module> main() File "D:\branch\AutoBTD6\replay.py", line 194, in main allAvailablePlaythroughs = getAllAvailablePlaythroughs(['own_playthroughs'], considerUserConfig=True) File "D:\branch\AutoBTD6\helper.py", line 538, in getAllAvailablePlaythroughs if considerUserConfig and not canUserUsePlaythrough({'filename': filename, 'fileConfig': fileConfig}): File "D:\branch\AutoBTD6\helper.py", line 478, in canUserUsePlaythrough mapConfig = parseBTD6InstructionsFile(playthrough['filename']) File "D:\branch\AutoBTD6\helper.py", line 224, in parseBTD6InstructionsFile newStep = {'action': 'upgrade', 'name': matches.group('name'), 'key': keybinds['path'][str(matches.group('path'))], 'pos': monkeys[matches.group('name')]['pos'], 'path': int(matches.group('path')), 'cost': adjustPrice(towers['monkeys'][monkeys[matches.group('name')]['type']]['upgrades'][int(matches.group('path'))][monkeyUpgrades[int(matches.group('path'))] - 1], newMapConfig['difficulty'], gamemode, {'action': 'upgrade', 'path': int(matches.group('path'))}, monkeys[matches.group('name')], matches.group('discount'))} KeyError: 'hero'

record playthroughs error

C:\Users\USER\Documents\1\1\AutoBTD6-main>py record_playthrough.py
mapname >
dark_castle
gamemode >
deflation
hero >
obyn_greenfoot
started recording to "own_playthroughs/dark_castle#deflation#1920x1080.btd6"
place obyn_greenfoot hero0 at 547, 470
place super super0 738, 685
selected monkey: super0
BTD6 not focused
BTD6 not focused
stopping recording!
BTD6 not focused
Traceback (most recent call last):
File "C:\Users\USER\Documents\1\1\AutoBTD6-main\record_playthrough.py", line 309, in
time.sleep(60)
File "C:\Users\USER\Documents\1\1\AutoBTD6-main\record_playthrough.py", line 30, in signalHandler
writeBTD6InstructionsFile(config)
File "C:\Users\USER\Documents\1\1\AutoBTD6-main\helper.py", line 172, in writeBTD6InstructionsFile
os.mkdir(folder)
FileNotFoundError: [WinError 2] The specified file could not be found: 'own_playthroughs'

Amd gpu support?

Hi, so i have AMD gpu and i get these errors
image
Which I found are caused by that i have AMD gpu, any alternative ideas how to fix this problem?

Active window check error

Traceback (most recent call last): File "C:\Users\Гриб\Downloads\AutoBTD6-main\replay.py", line 1230, in main() File "C:\Users\Гриб\Downloads\AutoBTD6-main\replay.py", line 662, in main if not activeWindow or not isBTD6Window(activeWindow.title.decode()): AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?

no run

D:\Games\Bloons TD 6\AutoBTD6-main\AutoBTD6-main>py replay.py file dark_castle#chimps#2560x1440#noMK#noLL.btd6 -mk
D:\Games\Bloons TD 6\AutoBTD6-main\AutoBTD6-main\helper.py:20: SyntaxWarning: invalid escape sequence '\P'
ahk = AHK(executable_path="D:\Python\python3.12\Scripts\AutoHotkey.exe")
D:\Games\Bloons TD 6\AutoBTD6-main\AutoBTD6-main\helper.py:122: SyntaxWarning: invalid escape sequence '/'
"^(?:(?:own_|unvalidated_|unsuccessful_)?playthroughs/)?(?P\w+)#(?P\w+)#(?P(?P<resolution_x>\d+)x(?P<resolution_y>\d+))(?:#(?P.+))?.btd6$",
D:\Games\Bloons TD 6\AutoBTD6-main\AutoBTD6-main\helper.py:318: SyntaxWarning: invalid escape sequence '\w'
"^(?Pplace|upgrade|retarget|special|sell|remove) ?(?P[a-z_]+)? (?P\w+)(?: (?:(?:at|to) (?P\d+), (?P\d+))?(?:path (?P[0-2]))?)?(?: for (?P\d+|???))?(?: with (?P\d{1,2}|100)% discount)?$",
Traceback (most recent call last):
File "D:\Games\Bloons TD 6\AutoBTD6-main\AutoBTD6-main\replay.py", line 1, in
from helper import *
File "D:\Games\Bloons TD 6\AutoBTD6-main\AutoBTD6-main\helper.py", line 2, in
import keyboard
ModuleNotFoundError: No module named 'keyboard'

D:\Games\Bloons TD 6\AutoBTD6-main\AutoBTD6-main>

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.