alarmclockcrusher / hearthstonesim_abandoned Goto Github PK
View Code? Open in Web Editor NEWSimulation of Hearthstone game using python (Up to date Apr 1st 2020)
Simulation of Hearthstone game using python (Up to date Apr 1st 2020)
我是从营地来的老哥,今天刚看到大佬的项目,感觉非常厉害!
不过在测试的过程中遇到了一些问题:
疑似bug:
Traceback (most recent call last):
File "GUI.py", line 698, in <module>
GameGUI.run()
File "GUI.py", line 641, in run
self.Game.playSpell(subject, target, choice)
File "F:\Desktop\hearthstone\HearthstoneSimulator\Game.py", line 933, in playSpell
spell.played(target, choice, mana, positioninHand, comment) #choice用于抉择选项,comment 用于区分是GUI环境下使用还是AI分叉
File "F:\Desktop\hearthstone\HearthstoneSimulator\CardTypes.py", line 1425, in played
target = self.whenEffective(target, comment, choice, posinHand)
File "F:\Desktop\hearthstone\HearthstoneSimulator\Classic.py", line 3960, in whenEffective
copiedMinion = np.random.choice(minions).selfCopy(self.ID)
File "F:\Desktop\hearthstone\HearthstoneSimulator\CardTypes.py", line 1146, in selfCopy
Copy.__dict__[key] = copyListDict(value, Copy)
File "F:\Desktop\hearthstone\HearthstoneSimulator\CardTypes.py", line 26, in copyListDict
objCopy.append(copy.deepcopy(element))
File "D:\Anaconda3\lib\copy.py", line 150, in deepcopy
y = copier(x, memo)
File "D:\Anaconda3\lib\copy.py", line 247, in _deepcopy_method
return type(x)(x.__func__, deepcopy(x.__self__, memo))
File "D:\Anaconda3\lib\copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "D:\Anaconda3\lib\copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "D:\Anaconda3\lib\copy.py", line 150, in deepcopy
y = copier(x, memo)
File "D:\Anaconda3\lib\copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "D:\Anaconda3\lib\copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "D:\Anaconda3\lib\copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "D:\Anaconda3\lib\copy.py", line 150, in deepcopy
y = copier(x, memo)
File "D:\Anaconda3\lib\copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "D:\Anaconda3\lib\copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "D:\Anaconda3\lib\copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "D:\Anaconda3\lib\copy.py", line 150, in deepcopy
y = copier(x, memo)
File "D:\Anaconda3\lib\copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "D:\Anaconda3\lib\copy.py", line 169, in deepcopy
rv = reductor(4)
TypeError: can't pickle pygame.Surface objects
Traceback (most recent call last):
File "GUI.py", line 698, in <module>
GameGUI.run()
File "GUI.py", line 683, in run
subject.use(item[1]) #Request to use the Hero Power, and its validity is decided later.
File "F:\Desktop\hearthstone\HearthstoneSimulator\CardTypes.py", line 1729, in use
self.Game.sendSignal("HeroUsedAbility", self.ID, self, self.Game.target, self.mana, "", choice)
File "F:\Desktop\hearthstone\HearthstoneSimulator\Game.py", line 606, in sendSignal
trigger.trigger(signal, ID, subject, target, number, comment, choice)
File "F:\Desktop\hearthstone\HearthstoneSimulator\Triggers_Auras.py", line 34, in trigger
self.effect(signal, ID, subject, target, number, comment)
File "F:\Desktop\hearthstone\HearthstoneSimulator\Outlands.py", line 563, in effect
if heroPowerReplaced != None:
NameError: name 'heroPowerReplaced' is not defined
然后就是卡牌名全部英文的话不太方便[捂脸] 大部分的卡都不认识,有几个怪我是拍下去之后才知道是什么的……
另外,大佬有考虑过创一个qq群吗,可以让帮助测试的老哥们方便交流。
再次对大佬表示感谢及赞叹!
不好意思就草草看了一下,好像没看到含有main之类的py文件,请问要运行哪个文件……然后怎么自定义场面这种呀
一直想研究一下用ml开发炉石AI,但是苦于一直没有合适的模拟器,自己写工程量太大。如果有一个群讨论,一起开发研究会方便不少。
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.