Closed vincentvason closed 1 year ago
This is a good question! The line assert len(path[-1].children) > 0
, or any assertion line for that matter in _mctssimple, is a guide that tells you that this criteria has to be met in order for the module to run as intended. The AssertionError
in this case tells you that both the selection and expansion phases were unable to find an action to take in the particular state you are currently in (i.e. game.possible_actions() = []
).
I will need more information regarding your code, which might be the most likely reason why this problem has surfaced. Just note that the development and testing of this module was mainly done on Python 3.7. 🗡️
Thank you. I understand now and it solved. I integrated your library to a Trading Card Games (e.g. Hearthstone) which player has option to skip their turns when their resource is ran out. It seems that I need to included do nothing to possible action.
Yep that's right, doing nothing is also considered an action in the case of Monte Carlo simulations.
Hello, Thank you for your library which I used as a part of my project now. However, I encounter an error after run and it is
AssertionError
in a library. Did you know what is kind of issue? and what is a solution to solve this issue? Thank you.