private static List <Balance> ComputeWeighPoints(Knowledge knowledge) { //throw new NotImplementedException(); return(new List <Balance> { new Balance(new CoinCounts(unknownCoins: 1), new CoinCounts(unknownCoins: 1)) }); }
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); }
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)); }
internal WeighPoint(Knowledge startingKnowledge, Balance balance) { Knowledge = startingKnowledge; Balance = balance; }
internal KnowledgeNode(Knowledge knowledge, WeighNode parent = null) { Knowledge = knowledge; Parent = parent; }