Wechat_jump_game: 小米5X参数讨论

Created on 31 Dec 2017  ·  9Comments  ·  Source: wangshub/wechat_jump_game

{
"under_game_score_y": 300,
"press_coefficient": 1.532,
"piece_base_height_1_2": 25,
"piece_body_width": 80,

"swipe" : {
  "x1": 320,
  "y1": 410,
  "x2": 320,
  "y2": 410
}

}
我用的这个参数,每次都只是200分左右。。
有用小米5X的同学,来推荐一下自己的参数吗?

Most helpful comment

@Gtarget
试下这个,需要改2处
config改成:
{
"under_game_score_y": 300,
"press_coefficient": 3.86,
"piece_base_height_1_2": 25,
"piece_body_width": 80
}
wechat_jump_auto.py第115行改成:
press_time = math.pow(distance,0.85) * press_coefficient

All 9 comments

@Gtarget #278 #292 已合并到master,你可以试试看

@xu42 OK,谢谢!

292 这个参数在我的MI 5X上效果并不明显,最多只有一百多分。。

希望小伙伴们多多分享哈

@Gtarget
试下这个,需要改2处
config改成:
{
"under_game_score_y": 300,
"press_coefficient": 3.86,
"piece_base_height_1_2": 25,
"piece_body_width": 80
}
wechat_jump_auto.py第115行改成:
press_time = math.pow(distance,0.85) * press_coefficient

@632026344 感谢,亲测红米note4x可用,MI 5X应该也通用

@632026344 你这个参数好,可以提交给作者,踩白点很准分加的快

@632026344 谢谢,参数很好,刷到1000+不敢刷了

@Gtarget 忘了说了还需要改这个 #291 一直没合进master

我重新写了找小人中心点的代码,是用ps量的。。。比较2,然后用tf重新归回了一下距离,按压时间的关系(线性),目前还不错,
wechat_auto_jump.py
165行左右:
for i in range(scan_start_y, int(h * 2 / 3)):
for j in range(scan_x_border, w - scan_x_border): # 横坐标方面也减少了一部分扫描开销
pixel = im_pixel[j,i]
# 根据棋子的最低行的颜色判断,找最后一行那些点的平均值,这个颜色这样应该 OK,暂时不提出来
if (50 < pixel[0] < 60) and (53 < pixel[1] < 63) and (95 < pixel[2] < 110):
piece_x_sum += j
piece_x_c += 1
piece_y_max = max(i, piece_y_max)

118行左右:
def jump(distance, cnt):
print "distance : " + str(distance)
press_time = distance*1.341+67.6 #这个参数在1000分以内10次有9次可以踩着白块
press_time = max(press_time, 200) # 设置 200 ms 是最小的按压时间
press_time = int(press_time)
cmd = 'adb shell input swipe {x1} {y1} {x2} {y2} {duration}'.format(
x1=swipe['x1'],
y1=swipe['y1'],
x2=swipe['x2'],
y2=swipe['y2'],
duration=press_time
)
print(cmd)
os.system(cmd)

目前才3000分。。。不过还没跑完,继续跑吧,里面仍然有bug,貌似是方块的位置有bug,可惜我是菜鸟什么也不会。。。改不了。。。再见。。。

Was this page helpful?
0 / 5 - 0 ratings