public candidate ChooseAndApplyCarboxOptionUsingEstimator(candidate cand, Computation cpt, MessageClient clt, string runDir, int epoch)
        {
            option bestOpt      = null;
            var    bestProperty = Double.NegativeInfinity;
            var    options      = GetCarboxylOptions(cand);

            foreach (var opt in options)
            {
                var evalcand   = CopyAndApplyOption(opt, cand, true);
                var mol        = OBFunctions.designgraphtomol(evalcand.graph);
                var linkerName = AbstractAlgorithm.GetLinkerName(evalcand) + "-E" + epoch.ToString();
                var coeff      = Path.Combine(runDir, "data", "linker" + linkerName + ".coeff");
                var lmpdat     = Path.Combine(runDir, "data", "linker" + linkerName + ".lmpdat");
                Converter.moltoUFF(OBFunctions.designgraphtomol(evalcand.graph), coeff, lmpdat, false, 100);
                cpt.CalculateFeature(linkerName);
                var properpty = Convert.ToDouble(clt.SendMessage("[Predict]" + " " + linkerName));

                if (properpty > bestProperty)
                {
                    bestProperty = properpty;
                    bestOpt      = opt;
                }
            }
            Console.WriteLine("Best {0}", bestProperty);
            return(bestOpt == null ? null : CopyAndApplyOption(bestOpt, cand, true));
        }
        public BanditNode(Mcts parent, candidate cand, double transitionReward)
        {
            _parent          = parent; // TODO transfer old tree
            Cand             = cand;
            TransitionReward = transitionReward;
//            AbsoluteReward = _parent.Evaluate(cand);
            AbsoluteReward = 0;
            Options        = AbstractAlgorithm.GetAvailableOptions(cand);
            Children       = new Dictionary <candidate, NodeCountTuple> [Options.Count];
            for (var i = 0; i < Children.Length; i++)
            {
                Children[i] = new Dictionary <candidate, NodeCountTuple>();
            }
//            Bandit = new EGreedyBandit(Options.Count, .5);  // TODO only track best and how to get there? credit
            Bandit = new UCTBandit(Options.Count);
        }