Пример #1
0
        public static Node FindBestNodeUCT(Node node)
        {
            Node result      = null;
            int  parentVisit = node.State.VisitCount;
            var  test2       = new List <double>();

            foreach (var item in node.Children)
            {
                test2.Add(UCT.UctValue(parentVisit, item.State.WinScore, item.State.VisitCount));
            }
            var test = node.Children.OrderByDescending(n => UctValue(parentVisit, n.State.WinScore, n.State.VisitCount));

            result = node.Children.OrderByDescending(n => UctValue(parentVisit, n.State.WinScore, n.State.VisitCount)).FirstOrDefault();

            return(result);
        }
Пример #2
0
        private Node SelectNextPromisingNode(Node rootNode)
        {
            Node node = UCT.FindBestNodeUCT(rootNode);

            return(node);
        }