示例#1
0
 private static List <Balance> ComputeWeighPoints(Knowledge knowledge)
 {
     //throw new NotImplementedException();
     return(new List <Balance> {
         new Balance(new CoinCounts(unknownCoins: 1), new CoinCounts(unknownCoins: 1))
     });
 }
示例#2
0
        internal List <StrategyNode> GetAllStrategies(Knowledge knowledge, StrategyNode parentNode = null)
        {
            List <StrategyNode> roots = ComputeWeighPoints(knowledge).Select(
                balance => new StrategyNode(new WeighPoint(knowledge, balance), parentNode)
                ).ToList();

            foreach (var node in roots)
            {
                Console.WriteLine($"Execute | {node.Level}");
                ExecuteWeighPointOnNode(node);
            }

            return(roots);
        }
示例#3
0
        static void Main(string[] args)
        {
            var startingKnowledge = new Knowledge(new CoinCounts(unknownCoins: 12, lightishCoins: 0, heavyishCoins: 0, referenceCoins: 0));

            var strategyTree = new StrategyTree(new KnowledgeNode(startingKnowledge));

            strategyTree.Go();



            var strategyManager = new StrategyManager();

            var strategyRoots = strategyManager.GetAllStrategies(startingKnowledge);

            Console.WriteLine(strategyRoots.Any(strategyManager.AnyWinningStrategiesUnderNode));
        }
示例#4
0
 internal WeighPoint(Knowledge startingKnowledge, Balance balance)
 {
     Knowledge = startingKnowledge;
     Balance   = balance;
 }
示例#5
0
 internal KnowledgeNode(Knowledge knowledge, WeighNode parent = null)
 {
     Knowledge = knowledge;
     Parent    = parent;
 }