I’m trying to understand how the MCTS algorithm works and how I will implement it in a card game to improve the AI engine.
I read mcts.ai/ and many articles about this, including one that shows some results about the success of using Monte Carlo search with UCB in AI for playing with magic cards, which is more or less what I need to do however, I have some problems trying to understand some points and how to apply them to solve what I need. I also don’t know much about mathematics, so I’m lost when the articles explain all this with complex formulas.
This is what I came up with:
Given the state of the game (the user's hand in the game), determine which of the possible possible legal games can be made, then I would create a list of nodes (one of which represented each game) as a property in MCTSTree root node with each result (evaluation value?)
Simulate the complete (to the end) gameplay for each of these legal games with a random player and record the result in each node, the player won or lost to get the full picture.
This is where the “I think” Monte Carlo + UCB should be applied:
Select a more promising game (node) using UCB recursively, and in the case of its sheet, expand node with all possible games from your game.
Simulate n plays from the selected node until a certain amount of time is reached.
?
, , , ... , node?
gamestate, , , , ?
.
!