/// <summary> /// Should print the individual in a way that can be read by computer, /// including its fitness. You can get fitness to print itself at the /// appropriate time by calling fitness.PrintFitness(state,log,writer); /// Usually you should try to use PrintIndividual(state,log) /// instead -- use this method only if you can't print through the /// Output facility for some reason. /// <p/>The default form of this method simply prints out whether or not the /// individual has been evaluated, its fitness, and then calls Individual.GenotypeToString(). /// Feel free to override this to produce more sophisticated behavior, /// though it is rare to need to -- instead you could just override GenotypeToString(). /// </summary> public virtual void PrintIndividual(IEvolutionState state, StreamWriter writer) { writer.WriteLine(EVALUATED_PREAMBLE + Code.Encode(Evaluated)); Fitness.PrintFitness(state, writer); writer.WriteLine(GenotypeToString()); }
/// <summary> /// Should print the individual in a way that can be read by computer. /// </summary> public virtual void PrintIndividual(IEvolutionState state, int log) { state.Output.PrintLn(EVALUATED_PREAMBLE + Code.Encode(Evaluated), log); Fitness.PrintFitness(state, log); state.Output.PrintLn(GenotypeToString(), log); }