Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我直接运行的wechat_jump_auto.py,结果还没我跳的分数高呢,是我什么地方错了么 #19

Closed
mg459046365 opened this issue Dec 29, 2017 · 46 comments

Comments

@mg459046365
Copy link

我直接运行的wechat_jump_auto.py,然后界面上会自己去跳,结果得分还没我高呢,就二三十分就挂了,没明白啊

@darrenfantasy
Copy link

需要改参数 我改成press_time = distance * 1.45,一直没挂

@mg459046365
Copy link
Author

我试试,牛逼了,大半夜的!

@donng
Copy link

donng commented Dec 29, 2017

我运行自动的脚本,挑一下就挂了... 没用过python ,迷...

@mg459046365
Copy link
Author

@darrenfantasy 你是怎么算的,改成1.45

@mg459046365
Copy link
Author

@donng 哈哈,我的还在跑,不过太慢了

@mg459046365
Copy link
Author

跳了107分,就挂了

@binderclip
Copy link
Collaborator

@mg459046365 @darrenfantasy 你们的屏幕分辨率是多少?

@mg459046365
Copy link
Author

@binderclip 1920x1080

@mg459046365
Copy link
Author

@binderclip 1920 X 1080应该改成多少啊

@wangcode
Copy link

@binderclip 我分辨率2160*1080,不是每次必中中心点,只看明白貌似是逐个像素判断rgb区间,然后做一个除法求出X轴中心点。。但是Y轴没看懂。。能大概讲解一下你的思路吗

@binderclip
Copy link
Collaborator

@mg459046365 代码就是基于 1920x1080 写的,按理说不怎么需要改的,你不然根据实际情况微调一下吧

@mg459046365
Copy link
Author

@binderclip 微调这个参数么,如果是的话,我调一下试试

@binderclip
Copy link
Collaborator

binderclip commented Dec 29, 2017

@wangcode Y 轴是这样的,首先我先确定了那个图形的 X 轴的顶点的坐标,这样 X 是准的了。
假设棋子现在就在当前块儿的中间,那么应该算到下一个块儿中心的距离。
所以就先 PS 截图找了两个点的中心点坐标,把那个角度下的三角形的 X Y 轴的长度比求出来,这样一算就能算出那边 Y 的中心坐标了。

这个也是改了好几次改出来的,相对前面的版本容易命中中心一些(这样得分要多很多)。不过完全命中中心还是做不到。

这个还涉及到偶尔跑偏了能不能找回中心而不是越偏越多,现在的算法大概是 OK 的,再加上一些运气因素我最多的一局是 2800+。(然后就不想再打了

@binderclip
Copy link
Collaborator

@mg459046365 是的,其他是和坐标相关的,因为分辨率相同所以应该不用改。这个按下的时间可能和机型有关系所以调一下吧。

@mg459046365
Copy link
Author

@binderclip 好的,现在看来,每次跳的力度不够,我调一下按下时间

@donng
Copy link

donng commented Dec 29, 2017

@binderclip 坚果Pro2 在mac下寸步难行啊...

@mg459046365
Copy link
Author

@donng 我是小米note2,也是用的mac

@binderclip
Copy link
Collaborator

@donng 分辨率多少?

@donng
Copy link

donng commented Dec 29, 2017

@binderclip 2160x1080分辨率 ,什么参数都没改,基本都是第一块抖一下就掉下去了。

@binderclip
Copy link
Collaborator

@donng 方便传一张游戏截图上来吗?

@mg459046365
Copy link
Author

@binderclip 小米note2参数改成1.47会好一点,即便连续跑偏,后面也会被纠正,而且命中中心的概率相对来说,会高一些。不知道小数点精度如果调的高一点会不会更准确

@donng
Copy link

donng commented Dec 29, 2017

@binderclip 是我手机屏幕的游戏截图吗?

@mg459046365
Copy link
Author

@donng 应该是让你上传游戏屏幕截图

@donng
Copy link

donng commented Dec 29, 2017

screenshot_2017-12-30-02-23-40-316_

@mg459046365
Copy link
Author

mg459046365 commented Dec 29, 2017

@donng 最简单的方法,观察一下,落脚点距离中心点的偏移,如果感觉力度不够的话,增加一点时间以0.01为单位调整,如果力度过大就减少一点时间同样以0.01为单位调整

@donng
Copy link

donng commented Dec 29, 2017

@mg459046365 调distance相乘的那个数没用,还是第一下就掉下来了。

@darrenfantasy
Copy link

@mg459046365 就是微调时间参数吧。我就试了一些数据。

@chocolatesir
Copy link

@donng 2160*1080调成1.05到1.1就很准了

@ghost
Copy link

ghost commented Dec 30, 2017

1080x2220 手动点击参数为1.36

自动的继续使用这个参数第一次就挂了, 能说说原理吗?

@binderclip
Copy link
Collaborator

binderclip commented Dec 30, 2017

@donng @malatachehongbin 已知问题,把 300 改成 500

@donng
Copy link

donng commented Dec 30, 2017

@binderclip 还是只跳一下。

@binderclip
Copy link
Collaborator

@donng 代码已经更新了,用一下新的,里面有需要修改的参数。还不行自己 debug 下,思路也写了。

@donng
Copy link

donng commented Dec 30, 2017

@binderclip train_data文件夹加到.gitignore里吧,pull下来一堆图片

@binderclip
Copy link
Collaborator

@donng 这应该是 OpenCV 版本需要的,就先留着吧

@donng
Copy link

donng commented Dec 30, 2017

@binderclip 每次跳跃的 时间都是 200 .... find_piece_and_board()函数第一跳返回的都是 0 0 0 0

@binderclip
Copy link
Collaborator

@donng 上游戏截图吧

@6r6
Copy link

6r6 commented Dec 30, 2017

三星S6 G920F 实测通过
屏幕分辨率为2560x1440

under_game_score_y = 500
press_coefficient = 1.03

@binderclip
Copy link
Collaborator

binderclip commented Dec 30, 2017

@se4 也写一下屏幕分辨率吧,方便其他人参考,多谢!

@binderclip
Copy link
Collaborator

binderclip commented Dec 30, 2017

@donng 哦,截图上面传过了,你有改参数吗?
比如 under_game_score_y = 500

@donng
Copy link

donng commented Dec 30, 2017

1514612903782
这里一直都是返回零,上面的颜色判断我就不太了解了。
@binderclip

@binderclip
Copy link
Collaborator

@donng 这个是没找到棋子,你在棋子稳的时候再开始游戏试试

@790396054
Copy link

1080P 屏幕,press_coefficient长按的时间系数,调1.45 确实是一个很好的系数

@binderclip
Copy link
Collaborator

@donng
Copy link

donng commented Dec 30, 2017

@binderclip 我现在时间系数调到1.35(坚果pro2),正在测试,感觉还算精确。之前的问题可能是脚本执行先于游戏打开的问题。还是谢谢不吝赐教 !

@yanxileo
Copy link

@donng 坚果 pro2 配置应该怎么样?

@zhv9
Copy link

zhv9 commented Jan 1, 2018

自动识别的参数不太好,得专门调

@F-loat F-loat closed this as completed Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests