natescarlet / auto-derby Goto Github PK
View Code? Open in Web Editor NEW🐎🖥《赛马娘》(ウマ娘: Pretty Derby)辅助脚本
License: MIT License
🐎🖥《赛马娘》(ウマ娘: Pretty Derby)辅助脚本
License: MIT License
DEBUG [12:32:46]:auto_derby.template:55: load: single_mode_continuous_race_title.pos.png
DEBUG [12:32:46]:auto_derby.template:71: can not load: single_mode_continuous_race_title.pos.png: [Errno 2] No such file or directory: 'D:\\dev\\auto-derby\\auto_derby\\templates\\single_mode_continuous_race_title.pos.png'
DEBUG [12:32:46]:auto_derby.template:55: load: single_mode_continuous_race_title.png
DEBUG [12:32:46]:auto_derby.template:158: not match: tmpl=tmpl<single_mode_continuous_race_title.png>, pos=(197, 583), similarity=0.467
INFO [12:32:46]:auto_derby.template:178: no match: tmpl=('single_mode_continuous_race_title.png',)
WARNING[12:32:47]:auto_derby.window:118: recover foreground window failed: (1400, 'SetForegroundWindow', '無效的視窗控制代碼。')
from #42
再次出现相同问题,这次应该不是字体的锅
重新启动后可以通过上图,但是会卡在新的图片上,比如下图:
Originally posted by @fatinghenji in #16 (comment)
已经安装了新的依赖,log文件入下:
launcher.zip
I would like to express my respect for your hard work.
Version: 2e4c9e7
just in case
launcher.log
auto_derby.log
On a personal note, the developers and I have slightly different environments,
so I delete the default "ocr_labels.json" and recreate it.
If my "ocr_labels.json" is working fine, I will try to merge it with the default "ocr_labels.json" to see if there is any problem.
报告一个新bug
在选择比赛的时候滑动事件会变成点击事件。log如下:
auto_derby.log
手动adb执行adb shell input swipe 232 1391 232 1353 200
同样为点击,应该不是触摸时间或者延迟的问题吧。
感觉依旧是超出了屏幕的最大值
Originally posted by @fatinghenji in #69 (comment)
貌似是因为ocr出错?
从仓库里面手动下载覆盖了ocr_labels.json同样报错。
应该不是字体的问题,因为刚刚成功养了一只了。
lastest.zip
from #42
用于 URA 前加点或者其他用途
貌似在遇到連續出走的警告後,雖然腳本會按下取消,但是會在選擇屬性/休息之後,仍舊尋找single_mode_race_detail_button.png。
一次是取消後休息,一次是訓練,兩次log都在這裏了:https://gist.github.com/Small-Ku/b72d59f4745196631acb76bbc8ba26c9
The training job does not work.
I thought I saw the word "級", so I typed it in. But then it stops working.
screenshot
(I wrote a bat to make it easier to run, but don't worry about it)
log:
INFO [2021-05-31 17:41:15]:auto_derby.window:58: width=466 height=828
INFO [2021-05-31 17:41:15]:auto_derby.window:60: already in wanted size
INFO [2021-05-31 17:41:15]:main:52: game window: 8787092
INFO [2021-05-31 17:41:15]:auto_derby.template:168: match: tmpl=tmpl<nurturing_command_training.png>, pos=(172, 655), similarity=0.94
Corresponding text for current displaying image:級
INFO [2021-05-31 17:43:18]:auto_derby.ocr:82: labeled: hash=001e0c3ffe3f3e3f1e271c273e673e67fe27fe3ffc3ffe3ffe7f9e7f1c260000, value=級
Traceback (most recent call last):
File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "D:\Users\UserName\umamusume\auto-derby\auto-derby\auto_derby_main.py", line 80, in
main()
File "D:\Users\UserName\umamusume\auto-derby\auto-derby\auto_derby_main.py", line 53, in main
job()
File "D:\Users\UserName\umamusume\auto-derby\auto-derby\auto_derby\jobs\nurturing.py", line 560, in nurturing
ctx.update_by_command_scene(template.screenshot())
File "D:\Users\UserName\umamusume\auto-derby\auto-derby\auto_derby\jobs\nurturing.py", line 297, in update_by_command_scene
self.date = _ocr_date(screnshot.crop(date_bbox))
File "D:\Users\UserName\umamusume\auto-derby\auto-derby\auto_derby\jobs\nurturing.py", line 245, in _ocr_date
month_end = year_end + text[year_end:].index("月") + 1
ValueError: substring not found
from #42
adb和模拟器没法指定分辨率 模版匹配难度会提升
DEBUG [2021-06-14 17:02:37]:auto_derby.ocr:65: match label: value=フ, current=ff3fffffffffffff00f800f8007c003c003e001f801fc007f003f801f8007000, match=ff7ffffffffff7f100f000f8007c007c003e003f801fc007f803f801f8007800, similarity=0.922
DEBUG [2021-06-14 17:02:37]:auto_derby.ocr:65: match label: value=ア, current=feffffff3efe007c007ce03fe03ff01ff01ff00ff80078007c003c003e001e00, match=ffffffffffff007c0078003ce03ff01ff01ff007f00078007c007c003e001e00, similarity=0.891
DEBUG [2021-06-14 17:02:37]:auto_derby.ocr:65: match label: value=イ, current=00f000f800fc007fc03fe00ffc0ffe0fff0f1f0f020f000f000f000f000f000f, match=00f000f800fc007f801fe00ffc07ff07ff073f07000700070007000700070007, similarity=0.883
DEBUG [2021-06-14 17:02:37]:auto_derby.ocr:65: match label: value=ナ, current=8007c007c003c007ffffffffffffc007c003c003e003e001f001f800f8007800, match=000380038007800ffe7fffffffffe007c003c003e003f001f801f800f8007800, similarity=0.898
DEBUG [2021-06-14 17:02:37]:auto_derby.ocr:65: match label: value=ル, current=8001c001dc01dc019c019e019e01dee1def1def99e7f8f3f8f1fc70fc703c601, match=c00180019c019c019c019e019e01dee1def1def9de7fce3fcf1fc70fc707c401, similarity=0.922
DEBUG [2021-06-14 17:02:37]:auto_derby.ocr:65: match label: value=ズ, current=0c0efe2ffcff00ff800f80078003c003e007f00ff00ffc1f7e3e1f3c0f380630, match=1c07fe6ffcff00ff000f80078003c003e007f00ff00ffc1f3e3e1f3c0f380630, similarity=0.953
DEBUG [2021-06-14 17:02:37]:auto_derby.ocr:65: match label: value=開, current=3e7c777e636673667f7e7f7e07600340e347e347e347e347f37f737e337e0030, match=3c3c7e7e7ffe7ffe7ffe3ffe07e003c063c263c673c6f3fff3ff73fe02760000, similarity=0.656
INFO [2021-06-14 17:02:47]:auto_derby.ocr:82: labeled: hash=3e7c777e636673667f7e7f7e07600340e347e347e347e347f37f737e337e0030, value=開
DEBUG [2021-06-14 17:02:47]:auto_derby.ocr:88: use label: hash=3e7c777e636673667f7e7f7e07600340e347e347e347e347f37f737e337e0030, value=開
DEBUG [2021-06-14 17:02:47]:auto_derby.ocr:65: match label: value=催, current=1844fcefcc7fcc19ce19ce3fce1dfe1dfc3ffc1cfc1ccc3dcc3dcc1ccc1c801c, match=3844fceecc7fce00ce00cf7fcf3cce1cfc7ffc3dfc18cc3dcc3c4c18cc3c843d, similarity=0.781
INFO [2021-06-14 17:02:52]:auto_derby.ocr:82: labeled: hash=1844fcefcc7fcc19ce19ce3fce1dfe1dfc3ffc1cfc1ccc3dcc3dcc1ccc1c801c, value=催
DEBUG [2021-06-14 17:02:52]:auto_derby.ocr:88: use label: hash=1844fcefcc7fcc19ce19ce3fce1dfe1dfc3ffc1cfc1ccc3dcc3dcc1ccc1c801c, value=催
DEBUG [2021-06-14 17:02:52]:auto_derby.ocr:65: match label: value=中, current=8001e003ff7fff7fff7fc76187418761c761ef73ff7fff7fc661800180018001, match=8001c003ff7fff7fff7fc361836083608761ef73ff7fcffb8761800180018001, similarity=0.891
DEBUG [2021-06-14 17:02:52]:auto_derby.ocr:247: ocr result: フアイナルズ開催中
ERROR [2021-06-14 17:02:52]:__main__:107: unexpected exception
Traceback (most recent call last):
File "D:\dev\auto-derby\auto_derby\__main__.py", line 105, in <module>
main()
File "D:\dev\auto-derby\auto_derby\__main__.py", line 64, in main
job()
File "D:\dev\auto-derby\auto_derby\jobs\nurturing.py", line 302, in nurturing
_update_context_by_command_scene(ctx)
File "D:\dev\auto-derby\auto_derby\jobs\nurturing.py", line 243, in _update_context_by_command_scene
ctx.update_by_command_scene(template.screenshot(max_age=0))
File "D:\dev\auto-derby\auto_derby\single_mode\context.py", line 236, in update_by_command_scene
self.date = _ocr_date(screenshot.crop(date_bbox))
File "D:\dev\auto-derby\auto_derby\single_mode\context.py", line 41, in _ocr_date
year_end = text.index("級") + 1
ValueError: substring not found
這個匹配的 ocr label 貌似不是我新增的,貌似把ァ的 label 加進去就好了
"feffffff3efe007c007ce03fe03ff01ff01ff00ff80078007c003c003e001e00": "ァ"
这个字无法被打出。可能是windows自带字库的原因。
参看这个解答请问谁能打出日本汉字的“直”(下面是竖折的)?
最后一次运行文件如下:
auto_derby.log
出现死循环的图片如下:
死循环就是在以上图片之间循环选择。
重新运行launcher.cmd
同样复现.
Originally posted by @fatinghenji in #28 (comment)
发现虽然 bitblt 后台截图不行 但是管理员权限下赛马娘支持 PrintWindow
以下是日志文件。
launcher.log
是否会加入随机休眠时间或是随机偏移鼠标位置之类的反检测功能呢, 刚刚我在测试程序的时候似乎被游戏检测出来了:q
日志和最终截图都在这个压缩包里面了
日志+最终截图.zip
Thanks for the response the other day.
The program was working fine, but the current version is failing to OCR.
OCR frequently mistakes "ジ" for "シ".
Is there something wrong with my settings?
I have not changed any settings in NVIDIA Control Panel -> Manage 3D Settings. (Factory default)
Does the graphics board or Windows settings affect OCR?
TEST VERSION fed9276
launcher.log
If you need any other logs or screenshots, please let me know.
這張截圖中,識別出了
New text encountered前的一小段記錄:
DEBUG [16:29:33]:auto_derby.ocr:65: match label: value=+, current=00000000e001e001f003f003ff3fff7fff7ffe3ff003f003e001e00100000000, match=000000000000c001e003e003fe1fff7fff7fff7ff007e003e003e00100000000, similarity=0.891
DEBUG [16:29:33]:auto_derby.ocr:65: match label: value=2, current=f00ff83ffc7f3c7c0878007c007e003fe00ff003f8007c007e00fffffffffe7f, match=e00ff83ffc7f3efc1cfc00fc007c003fc01ff007fc017e007e00ff7ffffffe7f, similarity=0.875
DEBUG [16:29:33]:auto_derby.ocr:65: match label: value=1, current=00fc00fe80ffe0ffe0ffc0ff00fc00fc00fc00fc00fe00fe00fe00fc00fc00fc, match=00fc00fe00ffc0ffe0ffe0ffc0fc00fc00fc00fc00fc00fc00fc00fc00fc00f8, similarity=0.930
DEBUG [16:29:33]:auto_derby.ocr:247: ocr result: +21
DEBUG [16:29:33]:auto_derby.ocr:152: ocr result is empty
DEBUG [16:29:33]:auto_derby.ocr:65: match label: value=+, current=00000000c000e001e001e003ff3fff7fff3fff3fe007e003e003c00100000000, match=000000000000c001e003e003fe1fff7fff7fff7ff007e003e003e00100000000, similarity=0.922
DEBUG [16:29:33]:auto_derby.ocr:65: match label: value=1, current=001e003fe03ff03ff03fe03f003f003f003f003f003f003f003f003f003f001e, match=003e003fc03ff03ff03fe03f003e003e003e003e003e003f003f003f003e001c, similarity=0.930
DEBUG [16:29:33]:auto_derby.ocr:65: match label: value=0, current=e007f81f7c3f3c3c1e781e780f780ff80ff81ff81ff81f783e7cfc3ff81ff00f, match=e007f81f7c3f3c3c1e781e780f780ff80ff81ff81ff81f783e7cfc3ff81ff00f, similarity=1.000
DEBUG [16:29:33]:auto_derby.ocr:247: ocr result: +10
DEBUG [16:29:33]:auto_derby.ocr:152: ocr result is empty
DEBUG [16:29:33]:auto_derby.ocr:65: match label: value=1, current=0000fe00fe03fc0ff81fe07fe0ffe0ffc0ffc07f80ff803f801f001f00060000, match=0000801ff03ffc3ffc1fe01f801f801f801f801f801f801f801f801f00000000, similarity=0.633
Corresponding text for current displaying image:
报错文件如下:
launcher.log
不清楚是否因为user为中文的原因
选择训练项目的时候有时候会点不到然后就去点下一个,好像会影响选择
commit 7693ff8
env: android - noxplayer / 1080x1920
log共兩次,搬商店時會無法完成,目測現象是drag後的點擊app沒辦法立刻回應而造成後續的狀況出錯
auto_derby.log
auto_derby.1.log
launcher.log
以我现在的练度,跑每日只能拿满normal难度,脚本自动跑hard会亏物品。
希望可以自主选择跑的难度或者根据每次不同的天气调整上场的马和跑法。
因為我很少去跑GIII的比賽 😂
嚴格來說也不用特別修正,遇到一次就手動一次就好,總有一天會消滅光 🐿️
screenshot
log
auto_derby.log
pull了之后出现新的错误
DEBUG [2021-06-18 01:01:57]:auto_derby.plugin:43: loaded: example_custom_context, example_custom_race_score, example_custom_training_score, hello_world
ERROR [2021-06-18 01:01:57]:__main__:107: unexpected exception
Traceback (most recent call last):
File "E:\auto-derby\auto_derby\__main__.py", line 103, in <module>
main()
File "E:\auto-derby\auto_derby\__main__.py", line 46, in main
plugin.install(i)
File "E:\auto-derby\auto_derby\plugin.py", line 47, in install
g.plugins[name].install()
KeyError: ''
貌似是因为没有选择plugins?plugins文件夹里的文件里能否加上//说明
或#说明
指导下怎么调用?
Originally posted by @fatinghenji in #63 (comment)
跑到第三年六月後半,寶塚紀念時崩潰了
貌似是因爲場地換了?
ERROR [2021-06-16 15:02:08]:__main__:108: unexpected exception
Traceback (most recent call last):
File "D:\dev\auto-derby\auto_derby\__main__.py", line 106, in <module>
main()
File "D:\dev\auto-derby\auto_derby\__main__.py", line 65, in main
job()
File "D:\dev\auto-derby\auto_derby\jobs\nurturing.py", line 311, in nurturing
_handle_race(ctx)
File "D:\dev\auto-derby\auto_derby\jobs\nurturing.py", line 207, in _handle_race
race1 = race1 or _current_race(ctx)
File "D:\dev\auto-derby\auto_derby\jobs\nurturing.py", line 30, in _current_race
race1 = race.find_by_race_detail_image(ctx, template.screenshot())
File "D:\dev\auto-derby\auto_derby\single_mode\race.py", line 547, in find_by_race_detail_image
raise ValueError("find_by_race_details_image: can race match spec: %s", full_spec)
ValueError: ('find_by_race_details_image: can race match spec: %s', ('京都', 1, 2200, 1, 3, 15000))
大佬好,请问下载好的文件应该放到哪个路径?
我输入py -3.8 -m pip install -r requirements.txt报错找不到文件,之后尝试在cmd里面cd到auto-derby-master所在路径再使用上面的语句会读条安装pip依赖,pip list里面也能看到opencv等依赖
现在双击launcher.cmd会闪一下命令提示符界面,但是没有GUI。
现在不知道该怎么弄了,希望大佬能指点一下我。
使用的是真机,网络adb调试,log如下:
auto_derby.zip
问题:在训练页面识别5次第一个训练,没有切换然后就选择了第一个训练方法。
使用模拟器/真机有线链接的方法,查不到adb的端口,显示的都是设备名。
Version: b9389ff
This last_screenshot does not show the actual error screen.
Here's a screenshot of the actual error screen.
The script will stop when it reaches this screen.
I tried 1831812.
Select the training menu all the way through, choose wise, and then stop.
This is a screenshot taken just after stopping.
C:\test\auto-derby>py -3.8 -m auto_derby nurturing
INFO [2021-05-31 22:08:59]:auto_derby.window:58: width=466 height=828
INFO [2021-05-31 22:08:59]:auto_derby.window:60: already in wanted size
INFO [2021-05-31 22:08:59]:main:52: game window: 12456814
DEBUG [2021-05-31 22:09:00]:auto_derby.template:49: screenshot
DEBUG [2021-05-31 22:09:00]:auto_derby.template:63: load: connecting.pos.png
DEBUG [2021-05-31 22:09:00]:auto_derby.template:63: load: connecting.png
DEBUG [2021-05-31 22:09:00]:auto_derby.template:165: not match: tmpl=tmpl<connecting.png>, pos=(344, 57), similarity=0.193
DEBUG [2021-05-31 22:09:00]:auto_derby.template:63: load: retry_button.pos.png
DEBUG [2021-05-31 22:09:00]:auto_derby.template:78: can not load: retry_button.pos.png: [Errno 2] No such file or directory: 'C:\test\auto-derby\auto_derby\templates\retry_button.pos.png'
DEBUG [2021-05-31 22:09:00]:auto_derby.template:63: load: retry_button.png
DEBUG [2021-05-31 22:09:00]:auto_derby.template:165: not match: tmpl=tmpl<retry_button.png>, pos=(130, 799), similarity=0.379
DEBUG [2021-05-31 22:09:00]:auto_derby.template:63: load: nurturing_command_training.pos.png
DEBUG [2021-05-31 22:09:00]:auto_derby.template:63: load: nurturing_command_training.png
DEBUG [2021-05-31 22:09:00]:auto_derby.template:117: lightness match: tmpl=tmpl<nurturing_command_training.png>, similarity=1.0
INFO [2021-05-31 22:09:00]:auto_derby.template:168: match: tmpl=tmpl<nurturing_command_training.png>, pos=(172, 655), similarity=0.94
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=3800f800f801f001e0010f001f703ff83cfc007e803fe01ffc0ffe01fe003c00, value=ジ, similarity=0.969
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=f00ff01ff81ff81ff01f001e001e001e001e001f001f001f001fff7ffffffe7f, value=ュ, similarity=0.969
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=fc3ffc3ffc3ffc1ff80f000000000000000000000000fe1fff3fff7ffffffe7f, value=ニ, similarity=0.961
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=fffffffffeff00f000f0c0f8e07fe07fe03fe003f000f800f80078003c001c00, value=ア, similarity=0.906
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=001e0c3ffe3fbe3f1e271c273c473e47fe27fc3ffc3ffe3ffe7f9e7f1c260000, value=級, similarity=0.922
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=ffffffffff3fff3fc01fc01fe007e007e003e001f800f800fc00fc00f8003000, value=7, similarity=0.844
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=fc7ffcfffcff0cf00cf0fcff3cf81ce01cf03cf8feff0ff007e007f003f80070, value=月, similarity=0.977
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=00008400c619c21fc01ff81ffe7fff7fcf37cf3fff3fef3fc71fc71fc71fc21f, value=後, similarity=0.820
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=8031c439c439cc31cc03c003f807fe3fe007fe7fffffffffe007c003c0038001, value=半, similarity=0.930
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:222: ocr result: ジュニア級7月後半
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=e007fc3ffe7f3e7c0c7c007c007e803fe01ff007fc017e007e00ff3fff7fff7f, value=2, similarity=0.898
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=c003f81ffc3f3e7c1f7c1ff80ff80ff81ff81ff81f783f7c7e7ffc3ff81fc001, value=0, similarity=0.867
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=000c001f801fc01fe01ff81f781e3c1e3e1e3f3fffffffffffff003f001e001e, value=4, similarity=0.906
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:222: ocr result: 204
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=c007f81ffc3f3e7c0efc007c007e003fc01ff007f8017c007e00ff7fffffff7f, value=2, similarity=0.906
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=e003fc1ffe3f1c3e003e003ee01fe01fe03f007e00fc0efc3f7fff3ffc1ff007, value=3, similarity=0.883
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=003880ffe0fffefffffffcff80ff00ff00ff00ff00ff00ff00ff00ff00ff00fe, value=1, similarity=0.906
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:222: ocr result: 231
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=003880ffe0fffffffffffeff80ff00ff00ff00ff00ff00ff00ff00ff00ff007e, value=1, similarity=0.914
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=003c807ff0fffefffffffeff80ff00ff00ff00ff00ff00ff00ff00ff00ff003e, value=1, similarity=0.922
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=fc1ffe3ffe3f3e003e00fe07fe1ffe3f3c7e007800f8007c3e3efe3ff80fe003, value=5, similarity=0.805
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:222: ocr result: 115
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=000080fff0fffcfffefffcff80ff80ff00ff00ff00ff00ff00ff00ff00ff003e, value=1, similarity=0.883
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=e007fc3ffc7f1c7c007c003ee03fe03fe07f00fc00fc04fc3ffcfe7ffc3fe007, value=3, similarity=0.906
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=c007f03ff83f3c101e001e00ff1fff3f7f7e1ff81ef03ef87c7cfc7ff01f8007, value=6, similarity=0.852
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:222: ocr result: 136
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=001e803ff03ffe3ffe3ffc3fc03f807f80ff80ff807f803f803f803f807f003f, value=1, similarity=0.859
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=e007fc1ffc3f1c7e007c003fe03fe03fe07f007c00fc047c3f7eff7ffc1fe007, value=3, similarity=0.852
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:69: match label: hash=fe0fff7ffe7ffc7f803f801fc00fc007e007f003f003f001f801f801f801f800, value=7, similarity=0.852
DEBUG [2021-05-31 22:09:00]:auto_derby.ocr:222: ocr result: 137
INFO [2021-05-31 22:09:00]:auto_derby.jobs.nurturing:561: update context: Context<turn=13,vit=0.654,spd=204,sta=231,pow=115,per=136,int=137>
DEBUG [2021-05-31 22:09:00]:auto_derby.template:63: load: nurturing_scheduled_race_opening_banner.pos.png
DEBUG [2021-05-31 22:09:00]:auto_derby.template:63: load: nurturing_scheduled_race_opening_banner.png
DEBUG [2021-05-31 22:09:00]:auto_derby.template:165: not match: tmpl=tmpl<nurturing_scheduled_race_opening_banner.png>, pos=(302, 681), similarity=0.169
INFO [2021-05-31 22:09:00]:auto_derby.template:186: no match: tmpl=('nurturing_scheduled_race_opening_banner.png',)
DEBUG [2021-05-31 22:09:01]:auto_derby.template:49: screenshot
DEBUG [2021-05-31 22:09:01]:auto_derby.template:63: load: nurturing_training_confirm.pos.png
DEBUG [2021-05-31 22:09:01]:auto_derby.template:63: load: nurturing_training_confirm.png
DEBUG [2021-05-31 22:09:01]:auto_derby.template:117: lightness match: tmpl=tmpl<nurturing_training_confirm.png>, similarity=0.9607843137254902
INFO [2021-05-31 22:09:01]:auto_derby.template:168: match: tmpl=tmpl<nurturing_training_confirm.png>, pos=(53, 727), similarity=0.98
DEBUG [2021-05-31 22:09:02]:auto_derby.template:49: screenshot
DEBUG [2021-05-31 22:09:03]:auto_derby.template:49: screenshot
DEBUG [2021-05-31 22:09:04]:auto_derby.template:49: screenshot
DEBUG [2021-05-31 22:09:05]:auto_derby.template:49: screenshot
DEBUG [2021-05-31 22:09:05]:auto_derby.template:49: screenshot
DEBUG [2021-05-31 22:09:05]:auto_derby.template:117: lightness match: tmpl=tmpl<nurturing_training_confirm.png>, similarity=0.9607843137254902
INFO [2021-05-31 22:09:05]:auto_derby.template:168: match: tmpl=tmpl<nurturing_training_confirm.png>, pos=(53, 727), similarity=0.97
DEBUG [2021-05-31 22:09:05]:auto_derby.ocr:69: match label: hash=c001e003e003e003e003f003ff7fffffffffffffe003e003e003e003e003c001, value=+, similarity=0.906
DEBUG [2021-05-31 22:09:05]:auto_derby.ocr:69: match label: hash=000cc01fe01ffc1ffe1f801f001f001e003e00fe00ff80ffc0ffc0ffc0ff003f, value=1, similarity=0.805
DEBUG [2021-05-31 22:09:05]:auto_derby.ocr:222: ocr result: +1
DEBUG [2021-05-31 22:09:05]:auto_derby.ocr:155: ocr result is empty
DEBUG [2021-05-31 22:09:05]:auto_derby.ocr:69: match label: hash=c001e003e003e003e003e007ff7fffffffffffffe003e003e003e003e003c001, value=+, similarity=0.922
DEBUG [2021-05-31 22:09:06]:auto_derby.ocr:69: match label: hash=ffffffff007f003e001f800fc007e007e007f003f001f001f801f801f801f800, value=7, similarity=0.875
DEBUG [2021-05-31 22:09:06]:auto_derby.ocr:222: ocr result: +7
DEBUG [2021-05-31 22:09:06]:auto_derby.ocr:155: ocr result is empty
DEBUG [2021-05-31 22:09:06]:auto_derby.ocr:155: ocr result is empty
DEBUG [2021-05-31 22:09:06]:auto_derby.ocr:69: match label: hash=8003c007c007c007c007c00ffeffffffffffffffc007c007c007c007c0078003, value=+, similarity=0.828
DEBUG [2021-05-31 22:09:06]:auto_derby.ocr:222: ocr result: +
Traceback (most recent call last):
File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\test\auto-derby\auto_derby_main.py", line 80, in
main()
File "C:\test\auto-derby\auto_derby_main.py", line 53, in main
job()
File "C:\test\auto-derby\auto_derby\jobs\nurturing.py", line 599, in nurturing
_handle_training(ctx)
File "C:\test\auto-derby\auto_derby\jobs\nurturing.py", line 148, in _handle_training
t = Training.from_traning_scene(screenshot)
File "C:\test\auto-derby\auto_derby\jobs\nurturing.py", line 496, in from_traning_scene
self.skill = _ocr_traning_effect(img.crop((387, t, 450, b)))
File "C:\test\auto-derby\auto_derby\jobs\nurturing.py", line 466, in _ocr_traning_effect
return int(text.lstrip("+"))
ValueError: invalid literal for int() with base 10: ''
DEBUG [2021-06-18 00:47:16]:auto_derby.template:41: screenshot
DEBUG [2021-06-18 00:47:16]:auto_derby.template:55: load: return_button.pos.png
DEBUG [2021-06-18 00:47:16]:auto_derby.template:71: can not load: return_button.pos.png: [Errno 2] No such file or directory: 'E:\\auto-derby\\auto_derby\\templates\\return_button.pos.png'
DEBUG [2021-06-18 00:47:16]:auto_derby.template:55: load: return_button.png
DEBUG [2021-06-18 00:47:16]:auto_derby.template:117: lightness match: tmpl=tmpl<return_button.png>, similarity=1.000
INFO [2021-06-18 00:47:16]:auto_derby.template:162: match: tmpl=tmpl<return_button.png>, pos=(42, 911), similarity=0.97
DEBUG [2021-06-18 00:47:16]:auto_derby.template:41: screenshot
DEBUG [2021-06-18 00:47:16]:auto_derby.template:55: load: single_mode_command_race.pos.png
DEBUG [2021-06-18 00:47:16]:auto_derby.template:55: load: single_mode_command_race.png
DEBUG [2021-06-18 00:47:16]:auto_derby.template:117: lightness match: tmpl=tmpl<single_mode_command_race.png>, similarity=0.957
INFO [2021-06-18 00:47:16]:auto_derby.template:162: match: tmpl=tmpl<single_mode_command_race.png>, pos=(379, 860), similarity=0.95
DEBUG [2021-06-18 00:47:17]:auto_derby.template:55: load: single_mode_continuous_race_title.pos.png
DEBUG [2021-06-18 00:47:17]:auto_derby.template:71: can not load: single_mode_continuous_race_title.pos.png: [Errno 2] No such file or directory: 'E:\\auto-derby\\auto_derby\\templates\\single_mode_continuous_race_title.pos.png'
DEBUG [2021-06-18 00:47:17]:auto_derby.template:55: load: single_mode_continuous_race_title.png
DEBUG [2021-06-18 00:47:17]:auto_derby.template:158: not match: tmpl=tmpl<single_mode_continuous_race_title.png>, pos=(145, 893), similarity=0.469
INFO [2021-06-18 00:47:17]:auto_derby.template:178: no match: tmpl=('single_mode_continuous_race_title.png',)
WARNING[2021-06-18 00:47:19]:auto_derby.window:113: recover foreground window failed: (1400, 'SetForegroundWindow', '无效的窗口句柄。')
DEBUG [2021-06-18 00:47:20]:auto_derby.template:41: screenshot
DEBUG [2021-06-18 00:47:20]:auto_derby.template:55: load: single_mode_race_detail_button.pos.png
DEBUG [2021-06-18 00:47:20]:auto_derby.template:55: load: single_mode_race_detail_button.png
DEBUG [2021-06-18 00:47:20]:auto_derby.template:158: not match: tmpl=tmpl<single_mode_race_detail_button.png>, pos=(495, 354), similarity=0.000
INFO [2021-06-18 00:47:20]:auto_derby.template:178: no match: tmpl=(tmpl<single_mode_race_detail_button.png>,)
DEBUG [2021-06-18 00:47:20]:auto_derby.template:41: screenshot
DEBUG [2021-06-18 00:47:20]:auto_derby.template:158: not match: tmpl=tmpl<single_mode_race_detail_button.png>, pos=(495, 354), similarity=0.000
INFO [2021-06-18 00:47:20]:auto_derby.template:178: no match: tmpl=(tmpl<single_mode_race_detail_button.png>,)
养历战种马需要规划赛程来增加胜鞍
更新到最新的1e96017后,OCR确认量大幅度上升。
暂时想法是将自动将属性和赛事结果存储至本地/服务器
之后有类似情况时可以进行参考
也可以使用这个数据来优化预测算法
结合自己目前使用脚本的体验,感觉定向性不是很强,即使用了3速3力的支援卡,也会在自动养成的时候把其他属性拉的很高。
提示
usage: main.py [-h] job
main.py: error: the following arguments are required: job
请问大佬怎么解决?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.