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

Switch to simulation within a main action #50

Open peter1591 opened 7 years ago

peter1591 commented 7 years ago

Do we need to switch to simulation mode within a main action?

For example, A main action is to decide from (PLAY-CARD, HERO-POWER, END-TURN)

Assume we were in selection mode at this main action node, the UCB policy is used to determined from these choices. Assume we choose the PLAY-CARD action Assume this is the FIRST TIME we make this choice, so a new node is added to the game tree.

Now, do we want to switch to simulation mode?

In current design, we only switch to simulation mode after this MAIN ACTION + SUB ACTIONS are done. That is, we switch to simulation after

  1. added a node for PLAY-CARD
  2. added a node for CHOOSE-HAND-CARD
  3. added a node for CHOOSE-TARGET (if any)
  4. more nodes for callback (if any) Now, after this main action is done, we switched to simulation mode.