Open JDBumgardner opened 4 years ago
Sort of related to #9. I think that on the basis of these bugs, those two cards probably don't actually remove anything from the deck.
That's an easy fix and makes the most sense I think
Ok, Jeremy made it so these functions just don't remove cards from the deck. It seems like they probably wouldn't, based on this error. I'm gonna call this closed.
Just got this after 1800 steps of 8v8 training. Looks like this is from the Primalfin Lookout discover.
Traceback (most recent call last):
File "/Users/ethansaxenian/Documents/GitHub/stone_ground_hearth_battles/hearthstone/training/pytorch/ppo.py", line 422, in
Process finished with exit code 1
We should really run an experiment for this, but for now so that training completes you can hardcode it to not crash.
TessGreymane and StasisElemental seem to be throwing exceptions when the the deck has no appropriate cards. Do we know what it's supposed to do in this situation?
Traceback (most recent call last): File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/training/pytorch/ppo.py", line 403, in
main()
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/training/pytorch/ppo.py", line 399, in main
ppo_learner.run()
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/training/pytorch/ppo.py", line 334, in run
worker.play_game()
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/training/pytorch/worker.py", line 44, in play_game
host.play_game()
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/simulator/host/round_robin_host.py", line 61, in play_game
self.play_round()
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/simulator/host/round_robin_host.py", line 52, in playround
for in self.play_round_generator():
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/simulator/host/round_robin_host.py", line 35, in play_round_generator
self._apply_and_record(player_name, action, agent_annotation)
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/simulator/host/host.py", line 41, in _apply_and_record
action.apply(self.tavern.players[player_name])
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/simulator/agent.py", line 105, in apply
player.summon_from_hand(self.index, self.targets)
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/simulator/core/player.py", line 143, in summon_from_hand
self.broadcast_buy_phase_event(events.SummonBuyEvent(card, target_cards))
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/simulator/core/player.py", line 304, in broadcast_buy_phase_event
card.handle_event(event, BuyPhaseContext(self, randomizer or self.tavern.randomizer))
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/simulator/core/cards.py", line 168, in handle_event
self.battlecry(event.targets, context)
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/simulator/core/card_pool.py", line 2127, in base_battlecry
random_elemental = context.randomizer.select_add_to_store(available_elementals)
File "/home/jacob/PycharmProjects/hearthstone_battlegrounds/hearthstone/simulator/core/randomizer.py", line 97, in select_add_to_store
return self.rand.choice(cards)
File "/usr/lib/python3.7/random.py", line 261, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
Process finished with exit code 1