Numerical solutions of the Schrödinger equation directly or perturbatively by a genetic algorithm: test cases