2025年HearthBuddy Ai 调试实战2 在使用海巨人的时候,少召唤了一个图腾(费用是对的)...

HearthBuddy Ai 调试实战2 在使用海巨人的时候,少召唤了一个图腾(费用是对的)...问题 游戏面板 8 是青玉之爪 13 是海巨人 17 是恐狼前锋 64 是萨满 66 是圣骑士 63 99 46 是微型木乃伊 其中 99 和 46 都是 2 血 3 攻 63 是 2 血 1 攻 57 是鱼人木乃伊 微型木乃伊 LocStringZhC b 复生 b

大家好,我是讯享网,很高兴认识大家。

问题

游戏面板

8是青玉之爪
13是海巨人
17是恐狼前锋

64是萨满

 

66是圣骑士
63,99,46,是微型木乃伊【其中99和46都是2血3攻,63是2血1攻】
57是鱼人木乃伊

微型木乃伊 "LocStringZhCn": "<b>复生</b>\n在你的回合结束时,随机使另一个友方随从获得+1攻击力。",

鱼人木乃伊,可以复生

 

目前的计算出的策略是

value of best board 49
Best actions as following:
Action1:
play id 8 pos 1 青玉之爪
Action2:
play id 13 pos 1 海巨人
Action3:
attacker: 17 enemy: 66 恐狼前锋攻击圣骑士
Action4:
attack with hero, enemy: 99 己方英雄攻击微型木乃伊

问题在于,使用青玉之爪后,可以召唤一个图腾,然后再上海巨人

 

ai调试

调试1

通过战斗日志,进行ai计算。花了44秒(因为测试使用单线程),并且ai进行了7层计算。

因为silverfish采用了暴力算法进行处理,手牌和场上的随从都会影响计算的复杂度(指数级的增长)。

调试2

因为上面的计算过于复杂,不方便调试。所以可以直接删除2张无用的手牌(火元素和风怒),重新计算。

调整后的计算结果

value of best board 39
Best actions as following:
Action1:
play id 8 pos 1
Action2:
play id 13 pos 1
Action3:
attack with hero, enemy: 99
Action4:
attacker: 17 enemy: 66

和上面的结果相同,但是面板分值减少(这是删除2张手牌导致的)。并且好处是ai的计算,减少到了5层。

 

ailoops

ailoop1
deep 1 len 7 dones 0
cut to len 7

ailoop2
deep 2 len 32 dones 0
cut to len 23

ailoop3
deep 3 len 72 dones 0
cut to len 36

ailoop4
deep 4 len 78 dones 0
cut to len 27

ailoop5
deep 5 len 0 dones 0
cut to len 0

 

ailoop1  有效操作7个

do all moves in Ai start
ailoop1
startEnemyTurnSimThread1
start print 7 actions startIndex = 0,endIndex = 1
a1.print(); start
play id 13 pos 1    操作1,使用海巨人
a1.print(); end

start pf.complete = False
end pf.complete = False
a2.print(); start
play id 8 pos 1   操作2,使用青玉之爪
a2.print(); end

start pf.complete = False
end pf.complete = False
a3.print(); start
attacker: 17 enemy: 63    操作3,恐狼前锋攻击微型木乃伊【2血1攻的木乃伊】
a3.print(); end

start pf.complete = False
end pf.complete = False
a4.print(); start
attacker: 17 enemy: 99   操作4,恐狼前锋攻击微型木乃伊  【2血3攻的木乃伊】
a4.print(); end

start pf.complete = False
end pf.complete = False
a5.print(); start
attacker: 17 enemy: 57    操作5,恐狼前锋攻击鱼人木乃伊
a5.print(); end

start pf.complete = False
end pf.complete = False
a6.print(); start
attacker: 17 enemy: 66    操作6,恐狼前锋攻击圣骑士
a6.print(); end

start pf.complete = False
end pf.complete = False
a7.print(); start
useability                        操作7,使用英雄技能
a7.print(); end

start pf.complete = False
end pf.complete = False
end print 7 actions startIndex = 0,endIndex = 1,

 

ailoop4  有效操作27个

使用青玉之爪是必须的,从ailoop4中找这个。【复制ailoop4到ailoop5之间的】

战斗日志筛选起来非常复杂,筛选青玉之爪或者海巨人,都有20多个记录。逐条排查太慢了。

重新分析一下,正确的操作,应该有5个。所以在打印action的时候,显示编号,找到有action5的就可以了。

尝试之后,发现找不到action5,所以需要5个不步骤的操作,在ailoop3里面就被淘汰了?

 

ailoop2  有效操作23个

搜搜itemPlayfield1 chuck deep2==2,可以看到23个操作。复制出来,然后搜useability,看看是否有这个和青玉之爪配合的。

23个里面,使用英雄技能的,一共找到7个,需要进行淘汰【这个搜索方案不一定正确,有可能影响技能不需要第一个action中使用】

 

ailoop2里面的1个待考察的,在ailoop3里面的操作。(先使用海巨人,不使用英雄技能召唤图腾的问题)   后面的验证,证实了上面的猜测,不一定要在前两个回合中使用英雄技能

 

淘汰标准

1.不能海巨人

2.不能击杀敌方随从

淘汰结果是:

1个完美,1个待考察,2个因为海巨人淘汰,3个因为击杀随从淘汰

 

itemPlayfield2 chuck deep2==2 boardvalue==52  海巨人,淘汰
action1
play id 13 pos 1 
action2
useability

 

 

itemPlayfield10 chuck deep2==2 boardvalue==42  海巨人,淘汰
action1
useability
action2
play id 13 pos 1   

 

itemPlayfield12 chuck deep2==2 boardvalue==22   待考察,召唤图腾和恐狼前锋攻击圣骑士
action1
attacker: 17 enemy: 66
action2
useability

 

itemPlayfield13 chuck deep2==2 boardvalue==20        击杀随从,淘汰
action1
attacker: 17 enemy: 63    恐狼前锋攻击2血1攻的微型木乃伊,击杀随从
action2
useability

 

itemPlayfield14 chuck deep2==2 boardvalue==19   使用青玉之爪和英雄技能,完美
action1
play id 8 pos 1
action2
useability

 

itemPlayfield15 chuck deep2==2 boardvalue==17    击杀随从淘汰
action1
useability
action2
attacker: 17 enemy: 57             恐狼前锋攻击鱼人木乃伊,击杀随从【虽然会复生,但是目前不支持这个卡牌的sim,以及复生机制】

 

itemPlayfield19 chuck deep2==2 boardvalue==16     击杀随从,淘汰
action1
attacker: 17 enemy: 99   恐狼前锋攻击2血3攻的微型木乃伊,击杀随从
action2
useability

 

 

ailoop3 有36个有效操作

搜索上面完美的那个

action1
play id 8 pos 1
action2
useability

然后有3个结果

itemPlayfield16 chuck deep2==3 boardvalue==33
action1
play id 8 pos 1
action2
useability
action3
attack with hero, enemy: 99     英雄攻击2血3攻的微型木乃伊,淘汰。因为随从死亡,会导致海巨人的后续费用增加

 

itemPlayfield21 chuck deep2==3 boardvalue==26
action1
play id 8 pos 1
action2
useability
action3
attack with hero, enemy: 63     英雄攻击2血1攻的微型木乃伊,这个也不行。

打印这个的面板数据看看?

 

itemPlayfield23 chuck deep2==3 boardvalue==25
action1
play id 8 pos 1
action2
useability
action3
attacker: 17 enemy: 63   恐狼前锋攻击2血1攻的木乃伊,这个也不行。

所以这条路不通。应该是计算重复的时候,这个里面的某一个操作和ailoop2里面4个待考察的重叠了。

 

重新算一次ailoop4

分别搜索上ailoop3里面的3个完美操作,只搜索到了1个

itemPlayfield18 chuck deep2==4 boardvalue==34
action1
play id 8 pos 1   青玉之爪
action2
useability       英雄技能
action3
attack with hero, enemy: 63   英雄攻击
action4
attacker: 17 enemy: 66   恐狼前锋攻击

打印这个的面板18数据,分值34

 int chuck1 = 0; foreach (var itemPlayfield in posmoves) { chuck1++; var boardValue = botBase.getPlayfieldValue(itemPlayfield); Helpfunctions.Instance.logg($"itemPlayfield{chuck1} chuck deep2=={deep} boardvalue=={boardValue}"); itemPlayfield.printActions(); if (chuck1 == 18 && deep == 4) { itemPlayfield.printBoard(); } }
讯享网
小讯
上一篇 2025-01-05 11:54
下一篇 2025-03-19 08:52

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/91710.html