code: public static Node evolveProgram(Map<double[], Double> data)
      {
          TreeFactory factory = new TreeFactory(2, // Number of parameters passed into each program.
                                                4, // Maximum depth of generated trees.
                                                Probability.EVENS, // Probability that a node is a function node.
                                                new Probability(0.6d)); // Probability that other nodes are params rather than constants.
          List<EvolutionaryOperator<Node>> operators = new ArrayList<EvolutionaryOperator<Node>>(3);
          operators.add(new TreeMutation(factory, new Probability(0.4d)));
          operators.add(new TreeCrossover());
          operators.add(new Simplification());
          TreeEvaluator evaluator = new TreeEvaluator(data);
          EvolutionEngine<Node> engine = new GenerationalEvolutionEngine<Node>(factory,
                                                                               new EvolutionPipeline<Node>(operators),
                                                                               evaluator,
                                                                               new RouletteWheelSelection(),
                                                                               new MersenneTwisterRNG());
          engine.addEvolutionObserver(new EvolutionLogger<Node>());
          return engine.evolve(1000, 5, new TargetFitness(0d, evaluator.isNatural()));
      }
docs: Evolve a function to fit the specified data.
  @param data A map from input values to expected output values.
  @return A program that generates the correct outputs for all specified
  sets of input.