yangyuan / hearthrock

Hearthstone® Bot Engine
https://yangyuan.github.io/hearthrock/
MIT License
258 stars 68 forks source link

How to collect data? #77

Closed zzk0 closed 5 years ago

zzk0 commented 5 years ago

I have a friend who plays hearthstone very well, he has reached to the top eight. So I want to collect his data, The scene passed to Python Bot has enough information to develop a bot. The main problem is how to collect data in such a form.

After some intern job in a small company, I realized that data is power. I have tried Finite Machine , but failed. Now I want to try machine learning method, but It needs data.

Sorry for my poor English, if my confused you, just tell me.

The scene passed to Python Bot:

{'Self': {'Resources': 3, 'PermanentResources': 2, 'TemporaryResources': 1, 'PowerAvailable': True, 'HasWeapon': False, 'Hero': {'RockId': 66, 'Name': '玛法里奥·怒风', 'CardId': 'HERO_06', 'Class': 5, 'Damage': 0, 'Health': 30, 'CanAttack': True, 'IsExhausted': False, 'IsQuest': False, 'IsSecret': False}, 'Power': {'RockId': 71, 'Name': '恐怖变形', 'CardId': 'AT_132_DRUID', 'Damage': 0, 'Health': 0, 'CardType': 0, 'Cost': 2, 'HasTaunt': False, 'HasCharge': False, 'Options': []}, 'Weapon': None, 'Minions': [], 'Cards': [{'RockId': 23, 'Name': '厄运鼹鼠', 'CardId': 'LOOT_258', 'Damage': 1, 'Health': 3, 'CardType': 4, 'Cost': 1, 'HasTaunt': False, 'HasCharge': False, 'Options': []}, {'RockId': 22, 'Name': '团队领袖', 'CardId': 'CS2_122', 'Damage': 2, 'Health': 2, 'CardType': 4, 'Cost': 3, 'HasTaunt': False, 'HasCharge': False, 'Options': []}, {'RockId': 9, 'Name': '火羽精灵', 'CardId': 'UNG_809', 'Damage': 1, 'Health': 2, 'CardType': 4, 'Cost': 1, 'HasTaunt': False, 'HasCharge': False, 'Options': []}, {'RockId': 17, 'Name': '深蓝刃鳞龙人', 'CardId': 'ICC_029', 'Damage': 5, 'Health': 5, 'CardType': 4, 'Cost': 5, 'HasTaunt': False, 'HasCharge': False, 'Options': []}, {'RockId': 27, 'Name': '机械袋鼠', 'CardId': 'BOT_445', 'Damage': 1, 'Health': 1, 'CardType': 4, 'Cost': 1, 'HasTaunt': False, 'HasCharge': False, 'Options': []}, {'RockId': 16, 'Name': '凶恶的雏龙', 'CardId': 'UNG_075', 'Damage': 3, 'Health': 3, 'CardType': 4, 'Cost': 3, 'HasTaunt': False, 'HasCharge': False, 'Options': []}], 'Choices': []}, 'Opponent': {'Resources': 0, 'PermanentResources': 2, 'TemporaryResources': 0, 'PowerAvailable': True, 'HasWeapon': False, 'Hero': {'RockId': 68, 'Name': '雷克萨', 'CardId': 'HERO_05', 'Class': 2, 'Damage': 0, 'Health': 30, 'CanAttack': True, 'IsExhausted': False, 'IsQuest': False, 'IsSecret': False}, 'Power': {'RockId': 69, 'Name': '稳固射击', 'CardId': 'DS1h_292', 'Damage': 0, 'Health': 0, 'CardType': 0, 'Cost': 2, 'HasTaunt': False, 'HasCharge': False, 'Options': []}, 'Weapon': None, 'Minions': [{'RockId': 57, 'Name': '血沼迅猛龙', 'CardId': 'CS2_172', 'Damage': 3, 'Health': 2, 'BaseHealth': 2, 'Race': 20, 'IsFrozen': False, 'IsExhausted': True, 'IsAsleep': False, 'IsStealthed': False, 'CanAttack': True, 'CanBeAttacked': True, 'HasTaunt': False, 'HasWindfury': False, 'HasDivineShield': False, 'HasAura': False, 'IsEnraged': False, 'HasTriggerVisual': False, 'HasInspire': False, 'HasDeathrattle': False, 'HasBattlecry': False, 'HasLifesteal': False, 'IsPoisonous': False}], 'Cards': [{'RockId': 52, 'Name': 'UNKNOWN ENTITY [cardType=INVALID]', 'CardId': '', 'Damage': 0, 'Health': 0, 'CardType': 0, 'Cost': 0, 'HasTaunt': False, 'HasCharge': False, 'Options': []}, {'RockId': 49, 'Name': 'UNKNOWN ENTITY [cardType=INVALID]', 'CardId': '', 'Damage': 0, 'Health': 0, 'CardType': 0, 'Cost': 0, 'HasTaunt': False, 'HasCharge': False, 'Options': []}, {'RockId': 54, 'Name': 'UNKNOWN ENTITY [cardType=INVALID]', 'CardId': '', 'Damage': 0, 'Health': 0, 'CardType': 0, 'Cost': 0, 'HasTaunt': False, 'HasCharge': False, 'Options': []}, {'RockId': 65, 'Name': 'UNKNOWN ENTITY [cardType=INVALID]', 'CardId': '', 'Damage': 0, 'Health': 0, 'CardType': 0, 'Cost': 0, 'HasTaunt': False, 'HasCharge': False, 'Options': []}], 'Choices': []}, 'Turn': 4, 'PlayOptions': [[23], [22], [9], [27], [16], [71]], 'ActionId': 2, 'SessionId': '916e4067-25e6-4cef-815b-890dfc4703a1'}
yangyuan commented 5 years ago

Data is, for sure, hard to get. Depends on the method you choose, there are multiple options (and none of them is easy).

I'll close this as this is beyond the scope of the project.