// move/class predictors are already global instances, so no need to make them members public GamePredictor(List <scorer> scorers, int numDrawPredictors) { DrawSequences = new ClassSequence[numDrawPredictors]; DrawPredictors = new TranscendentDrawPredictor[numDrawPredictors]; for (int i = 0; i < numDrawPredictors; i++) { DrawSequences[i] = new ClassSequence(); DrawPredictors[i] = new TranscendentDrawPredictor(scorers, AllDrawPredictors); } ClassPredictor = new TranscendentClassPredictor(scorers, AllClassPredictors); MovePredictor = new TranscendentMovePredictor(scorers, AllMovePredictors); // underlying predictions SimpleMovePredictors.ForEach(p => p.MakeNextPrediction(MoveSequence)); SimpleDrawPredictors.ForEach(p => p.MakeNextPrediction(DrawSequences[0])); // sequence 0/1 identical initially AllClassPredictors.ForEach(p => p.MakeNextPrediction(ClassSequence)); // metapredictions MovePredictor.MakePredictions(); ClassPredictor.MakePredictions(); foreach (TranscendentDrawPredictor p in DrawPredictors) { p.MakePredictions(); } }
/********************************** Predicting Draws ***********************************************/ public static Prediction PredictDrawFromIndex(int index, ClassSequence sequence) { if (index > -1) { return(new Prediction(sequence.MyClass(index), sequence.YourClass(index))); } else { return(new Prediction(D, NORMAL)); } }