peter1591 / hearthstone-ai

A Hearthstone AI based on Monte Carlo tree search and neural nets written in modern C++.
302 stars 49 forks source link

Use event trigger list instead of play order #15

Closed peter1591 closed 7 years ago

peter1591 commented 7 years ago

Death rattle is triggered by play order Maybe we can use event trigger to check death Then no need for play order anymore

peter1591 commented 7 years ago

If we want to maintain a list for deathrattle trigger, then all card refs should be added to the list, and the list should be scanned sequentially to check death or not.

However, in usual case, there's only a few card refs are dead, so we maintain a dead-hint list for that the downside of this approach is that we need to sort the play order manually but the bright side is that: there's no need to scan the whole list again and again

Conclusion: use dead-hint list, and sort using play order manually