Change to use genetic algorithm for a generic value function.