/// <summary> /// Initializes a new instance of the <see cref="UnityTools.AITreesBase.MCTS.MCTSNode"/> class. /// </summary> /// <param name="depth">Depth.</param> /// <param name="parent">Parent.</param> /// <param name="lastAction">Last action.</param> /// <param name="actorJustActed">Actor just acted.</param> /// <param name="gameState">Game state.</param> public MCTSNode(uint depth, MCTSNode parent, IAction lastAction, IActor actorJustActed, IGameState gameState) : base(depth, parent, lastAction, actorJustActed, gameState) { _wins = 0; _visits = 0; _children = new List<MCTSNode>(); IEnumerable<IAction> actions = NodeState.GetAllMoves(); _untriedActions = new Stack<IAction>(actions.Shuffle()); }