HearthBuddy 调试肯瑞托法师寒冰屏障的配合
35疯狂的科学家
63肯瑞托法师
13过期货物专卖商
64对面的英雄术士
比较好的出牌策略是,肯瑞托法师+寒冰屏障
ailoop1
startEnemyTurnSimThread1
start print 6 actions startIndex = 0,endIndex = 1
a1.print(); start
play id 63 pos 2 肯瑞托法师
a1.print(); end
a2.print(); start
attacker: 35 enemy: 13 疯狂的科学家 攻击 过期货物专卖商
a2.print(); end
a3.print(); start
attacker: 35 enemy: 64 疯狂的科学家 攻击 术士
a3.print(); end
a4.print(); start
useability 法师英雄技能 攻击 术士
on enemy: 64
a4.print(); end
a5.print(); start
useability 法师英雄技能 攻击 己方随从疯狂的科学家
on enemy: 35
a5.print(); end
a6.print(); start
useability 法师英雄技能 攻击 过期货物专卖商
on enemy: 13
a6.print(); end
end print 6 actions startIndex = 0,endIndex = 1,
ailoop2
deep 2 len 14 dones 0
cut to len 10
上面6个操作,456都淘汰,考察123
首先考察ailoop1中的action1,有3个后续操作
(搜索
action1
play id 63 pos 2
)
得到以下结果
itemPlayfield1 chuck deep2==2 boardvalue==18
action1
play id 63 pos 2
action2
attacker: 35 enemy: 64 疯狂科学家攻击术士
attacker: 35 enemy: 64
itemPlayfield5 chuck deep2==2 boardvalue==13
action1
play id 63 pos 2
action2
play id 60 pos 1 寒冰屏障
itemPlayfield6 chuck deep2==2 boardvalue==8
action1
play id 63 pos 2
action2
attacker: 35 enemy: 13 疯狂科学家攻击过期货物专卖商
ailoop3
ailoop2中的第5个是完美操作,尝试在ailoop3查找。
itemPlayfield1 chuck deep2==3 boardvalue==15
action1
play id 63 pos 2 肯瑞托法师
action2
attacker: 35 enemy: 64 科学家 攻击 术士
action3
play id 60 pos 1 寒冰屏障
+++++++ printBoard start +++++++++
board/hash/turn: 15 / 2251115620103 / 0 ++++++++++++++++++++++
pen 0
mana 0/3
cardsplayed: 2 handsize: 0 enemyhand: 5
ownhero:
ownherohp: 30 + 0
ownheroattac: 0
ownheroweapon: 0 0 unknown None 0 0
ownherostatus: frozenFalse
enemyherohp: 26 + 0
play id 63 pos 2
attacker: 35 enemy: 64
play id 60 pos 1
OWN MINIONS################ 2
deckpos, name,ang, hp: 1, madscientist, 2, 2 35
deckpos, name,ang, hp: 2, kirintormage, 4, 3 63
ENEMY MINIONS############ 1
deckpos, name,ang, hp: 1, expiredmerchant, 2, 1 13
Own Handcards:
+++++++ printBoard end +++++++++
itemPlayfield2 chuck deep2==3 boardvalue==5
action1
play id 63 pos 2 肯瑞托法师
action2
play id 60 pos 1 寒冰屏障
action3
attacker: 35 enemy: 13 科学家 攻击 专卖商
+++++++ printBoard start +++++++++
board/hash/turn: 5 / 1740715810003 / 0 ++++++++++++++++++++++
pen 0
mana 0/3
cardsplayed: 2 handsize: 0 enemyhand: 5
ownhero:
ownherohp: 30 + 0
ownheroattac: 0
ownheroweapon: 0 0 unknown None 0 0
ownherostatus: frozenFalse
enemyherohp: 28 + 0
play id 63 pos 2
play id 60 pos 1
attacker: 35 enemy: 13
OWN MINIONS################ 1
deckpos, name,ang, hp: 1, kirintormage, 4, 3 63
DIED MINIONS############
own, entity, cardid: False, 13, ULD_163
own, entity, cardid: True, 35, FP1_004
Own Handcards:
+++++++ printBoard end +++++++++
ailoop4
ailoop4
startEnemyTurnSimThread1
start print 0 actions startIndex = 0,endIndex = 2
end print 0 actions startIndex = 0,endIndex = 2,
startEnemyTurnSimThread2
start print 0 actions startIndex = 0,endIndex = 2
end print 0 actions startIndex = 0,endIndex = 2,
itemPlayfield1 chuck deep1==4 boardvalue==14
itemPlayfield2 chuck deep1==4 boardvalue==11
index = 1 pVal-bestoldval, pVal = 14, bestoldval = 17
index = 2 pVal-bestoldval, pVal = 11, bestoldval = 17
deep 4 len 0 dones 0
cut to len 0
但是ai经过计算,认为不上奥秘比较好?
value of best board 17
Best actions as following:
Action1:
play id 63 pos 2
Action2:
attacker: 35 enemy: 64
### do all moves in Ai end ###
calculated 0.6313037
+++++++ printBoard start +++++++++
board/hash/turn: 17 / 1651115620103 / 1 ++++++++++++++++++++++
pen 0
mana 0/3
cardsplayed: 1 handsize: 1 enemyhand: 5
ownhero:
ownherohp: 30 + 0
ownheroattac: 0
ownheroweapon: 0 0 unknown None 0 0
ownherostatus: frozenFalse
enemyherohp: 26 + 0
play id 63 pos 2
attacker: 35 enemy: 64
OWN MINIONS################ 2
deckpos, name,ang, hp: 1, madscientist, 2, 2 35
deckpos, name,ang, hp: 2, kirintormage, 4, 3 63
ENEMY MINIONS############ 1
deckpos, name,ang, hp: 1, expiredmerchant, 2, 1 13
Own Handcards:
pos 1 iceblock 3 entity 60 EX1_295 0 0 0
+++++++ printBoard end +++++++++
查看历史记录,发现ailoop3里面有以下记录。尝试打印deep1=3的时候,itemplayfield为1和3的记录的面板
itemPlayfield1 chuck deep1==3 boardvalue==17
itemPlayfield2 chuck deep1==3 boardvalue==-13
itemPlayfield3 chuck deep1==3 boardvalue==17
itemPlayfield1 chuck deep1==3 boardvalue==17
+++++++ printBoard start +++++++++
board/hash/turn: 17 / 1651115620103 / 1 ++++++++++++++++++++++
pen 0
mana 0/3
cardsplayed: 1 handsize: 1 enemyhand: 5
ownhero:
ownherohp: 30 + 0
ownheroattac: 0
ownheroweapon: 0 0 unknown None 0 0
ownherostatus: frozenFalse
enemyherohp: 26 + 0
play id 63 pos 2
attacker: 35 enemy: 64
OWN MINIONS################ 2
deckpos, name,ang, hp: 1, madscientist, 2, 2 35
deckpos, name,ang, hp: 2, kirintormage, 4, 3 63
ENEMY MINIONS############ 1
deckpos, name,ang, hp: 1, expiredmerchant, 2, 1 13
Own Handcards:
pos 1 iceblock 3 entity 60 EX1_295 0 0 0
+++++++ printBoard end +++++++++
itemPlayfield3 chuck deep1==3 boardvalue==17
+++++++ printBoard start +++++++++
board/hash/turn: 17 / 1661115620103 / 1 ++++++++++++++++++++++
pen 0
mana 0/3
cardsplayed: 1 handsize: 1 enemyhand: 5
ownhero:
ownherohp: 30 + 0
ownheroattac: 0
ownheroweapon: 0 0 unknown None 0 0
ownherostatus: frozenFalse
enemyherohp: 26 + 0
attacker: 35 enemy: 64
play id 63 pos 2
OWN MINIONS################ 2
deckpos, name,ang, hp: 1, madscientist, 2, 2 35
deckpos, name,ang, hp: 2, kirintormage, 4, 3 63
ENEMY MINIONS############ 1
deckpos, name,ang, hp: 1, expiredmerchant, 2, 1 13
Own Handcards:
pos 1 iceblock 3 entity 60 EX1_295 0 0 0
+++++++ printBoard end +++++++++
比较ai给出的结果,以及期待的结果,发现boardvalue相差2
这个差别是因为使用了寒冰屏障导致的。
左边是正确的结果,使用2张卡牌。 itemPlayfield1 chuck deep2==3 boardvalue==15
右边是ai计算的出结果,少用了一张牌,但是面板数值更高。 itemPlayfield1 chuck deep1==3 boardvalue==17
deep1是进入第i次循环,模拟了敌方操作。
deep2是进入第i次循环,模拟了敌方操作,再生成了一次action的数值。
所以上面左边比右边多了一次操作,因为这次操作导致了分值降低。
retval += p.owncards.Count * 5; 多一张手牌,+5的分值。
面板貌似没有计算,奥秘的分值。可以考虑计算的时候,让奥秘算5分?
发现在判断playfieldvalue的时候,if (p.value >= -2000000) return p.value;
找到3次最优解替换的地方。
deep3 = 1, index = 1, pVal vs bestoldval, pVal = -16, bestoldval = -2E+07
deep3 = 2, index = 1, pVal vs bestoldval, pVal = 15, bestoldval = -16
deep3 = 3, index = 1, pVal vs bestoldval, pVal = 17, bestoldval = 15
先查看deep3=2,index=1,设置断点
查看p.playactions,发现只有2个操作
数值是在private void startEnemyTurnSimThread(List<Playfield> source, int startIndex, int endIndex)中就设置了
调用了botBase.getPlayfieldValue(p);
p.value = retval;
return retval;
else if (!enoughCalculations)
{
var list = new List<int>() { 1 }; 对应的分值是18,13,8。这里的18,下一次操作后变成了15。
if (source.Count == 10 && list.Contains(i + 1))
{
Helpfunctions.Instance.logg("chuck20190906");
p.printBoard();
}
在10和1的时候设置断点,查看getmovelist的结果,然后看怎么计算的数值。
看一下pf.playactions,发现是3个action。
并且 p.nextPlayfields.Add(pf);
然后用botBase.getPlayfieldValue(pf),算一下,发现value降低到15了。
需要在这里看一下,为啥分值降低了
然后跳出模拟敌方操作的函数
if (print)
{
if (deep == 6)
{
Console.WriteLine();
}
startEnemyTurnSimThread(temp, 0, temp.Count);
然后在deep1计算
foreach (var itemPlayfield in temp)
{
chuck2++;
if (deep == 3 && chuck2 == 1)
{
Console.WriteLine();
}
var boardValue = botBase.getPlayfieldValue(itemPlayfield);
Helpfunctions.Instance.logg($"itemPlayfield{chuck2} chuck deep1=={deep} boardvalue=={boardValue}");
temp有10个元素,并且deep是3。
在下边计算,会把nextplayfields添加到posmoves
foreach (Playfield p in temp)
{
chuck3++;
if (this.totalboards > 0)
{
this.calculated += p.nextPlayfields.Count;
}
if (this.calculated <= this.totalboards)
{
this.posmoves.AddRange(p.nextPlayfields);
//p.nextPlayfields.Clear();
}
if (deep == 2 && chuck3 == 1)
{
Console.WriteLine();
}
//get the best Playfield
float pVal = botBase.getPlayfieldValue(p);
所以,有3个action的最终计算,还是落在了
foreach (var itemPlayfield in posmoves)
被自己的代码拦截,多处理了一次。
foreach (var itemPlayfield in temp)
{
chuck2++;
if (deep == 3 && chuck2 == 1)
{
Console.WriteLine();
}
var boardValue = botBase.getPlayfieldValue(itemPlayfield); 看这里为什么多了一个action,计算出15
Helpfunctions.Instance.logg($"itemPlayfield{chuck2} chuck deep1=={deep} boardvalue=={boardValue}");
if (deep == 2 && (chuck2 == 1))
{
itemPlayfield.printBoard();
}
}
最后发现数值是在cut的时候,计算出来的。
public void cuttingposibilities(bool isLethalCheck)
{
// take the x best values
List<Playfield> temp = new List<Playfield>();
Dictionary<Int64, Playfield> tempDict = new Dictionary<Int64, Playfield>();
posmoves.Sort((a, b) => botBase.getPlayfieldValue(b).CompareTo(botBase.getPlayfieldValue(a)));//want to keep the best
排序的时候计算了分值
测试3费有奥秘的时候,是不是会使用奥秘
转载于:https://www.cnblogs.com/chucklu/p/11468963.html
HearthBuddy 调试肯瑞托法师寒冰屏障的配合相关推荐
- 借WS2812 PWM DMA驱动调试浅谈STM32调试思路
借WS2812 PWM DMA驱动调试浅谈STM32调试思路 接触STM32差不多有4年了,在学校参加比赛时也需要进行各种调试工作,团队的配合也需要个人具有领域内快速定位与解决BUG的能力,前些日 ...
- gdb+openocd+stlink调试MCU
1.前言 当我们遇到问题的时候,可以加打印信息追踪流程,但更有效的方式是:调试.如果你使用的是keil,可以借助stlink或者jlink进行调试.如果你是使用的gnu工具链,硬件支持jlink,那么 ...
- 分享移动端真机调试几种方法(更新中)
最新更新请参考移动端真机调试 文章目录 安卓 浏览器场景 X5内核类 IOS windows调试ios MAC调试ios 跨平台通通用JS 注入类 Vconsole Eruda weinre 拓展 E ...
- 杰里之音质调试】【篇】
一般调试步骤 1.确认待调试的样机与对比样机的硬件电路是都完全相同.调音电路.功放电路参数等. (注意功放工作模式,是否有升压,防破音模式是否一样) 2.确认待调试样机的腔体跟喇叭是否完全一样,最好共 ...
- 罗宁服务器位置,罗宁(网络游戏《魔兽世界》中的角色)_百度百科
罗宁 (网络游戏<魔兽世界>中的角色) 语音 编辑 锁定 讨论 上传视频 上传视频 罗宁是暴雪娱乐开发的著名游戏<魔兽世界>及其衍生小说中的角色.罗宁是曾是达拉然首席大法师,肯 ...
- 程序编译生成的Hex、Bin、axf和elf格式
一.Bin Bin文件是最纯粹的二进制机器代码,按照程序执行顺序存放.编译器把高级语言翻译成汇编,再把汇编代码翻译成二进制机器代码保存成bin文件,因此Bin是没有经过处理或附加信息程序原本的大小.B ...
- windows nginx站点分割日志_Nginx 基础用途拾遗
本文使用「署名 4.0 国际 (CC BY 4.0)」许可协议,欢迎转载.或重新修改使用,但需要注明来源. 署名 4.0 国际 (CC BY 4.0) 本文作者: 苏洋 创建时间: 2020年05月2 ...
- 硬件工程师前途到底怎样?看看大佬怎么说,看完跪了
点击上方"大鱼机器人",选择"置顶/星标公众号" 福利干货,第一时间送达 一位项目经理带着一名硬件工程师和一名软件工程师一同坐车去参加研讨会,结果汽车在半路抛锚 ...
- 单片机搭建环境烧录方法_单片机仿真器的工作原理解析
仿真器出现的原因 1.早期的单片机内部没有ROM,比如8031.8032,这种单片机只能外部扩展紫外擦除的EPROM存储器,就是芯片上带窗口的ROM.紫外擦除的ROM需要用紫外灯照射较长时间(10分钟 ...
- vmci.sys版本不正确_王者荣耀:当前版本辅助的正确玩法思路,别再被骂,也别再梦游了...
辅助一直都是王者荣耀里一个很重要的位置,虽然低段位有些时候辅助不重要,但这只是在有大神的情况下,在大部分时候,其实还是很需要辅助的,但是我们都知道,辅助这个位置由于给人一种不重要的错觉,不仅队友会这么 ...
最新文章
- C语言实现修改文本文件中的特定行
- 基于visual Studio2013解决C语言竞赛题之1081shell排序
- java mail 设置参数
- 安卓应用安全指南 4.6.2 处理文件 规则书
- 微软架构师谈编程语言发展
- Adb connection Error: adb关闭,adb重启。BUG
- 有人还原出了历史上的皇帝,朱元璋居然还挺帅?
- poc, vul, exp都是什么意思呢?
- java数组写99乘法表,Java 实例九九乘法表
- [UIView numberofRowsInSection]unrecognized selector sent to instance 0x1808bef0 错误
- 这个男人用8幅画刻画“父爱”,被暖化了
- git cherry-pick 多分支的代码库,将代码从一个分支转移到另一个分支
- windows查看自己的网卡名称
- 大数运算(高精度运算)
- 【Pandas】- pandas入门
- Python包下载网址
- 论文阅读:Hierarchical Attention Transfer Network for Cross-Domain Sentiment Classification
- 【SVN】Switch分支提示“没有共同祖先”
- js汉字转拼音加排序
- 火狐浏览器模拟微信浏览器教程