Implementation 3: uses repellers and attractors to try to find the goal.