Landing a moonlander by Genetic Programming
Genetic programming can be used to find computer programs in a way that that is inspired by biological evolution. It is a machine learning technique that uses an evolutionary algorithm to optimize a population of computer programs according to a fitness functions. In the search process crossover and mutation are used to generate new programs.
In short, the process starts with a random population of programs. Each program is evaluated and becomes a score. From this population new programs are generated using crossover and mutation. The new programs are evaluated and replace existing programs if the new program better solves the problem.
The demo below finds solutions for landing a moonlander. Initially the moonlander is hovering at 100 meter above the surface. The gravity of the moon pulls the lander down, and by giving thrust the lander can land in a controlled way. Note that only a limited amount of fuel is available.
To see it in action, first select the parameters for the run. By clicking "new" , a random population will be generated. You can watch the performance of each program by clicking "show". The actual search is started by clicking "Go". The search will continue until you press "pause".
Minimize landing speed
Minimize landing speed (if v>5) and save fuel
Minimize landing speed (if v>5) and burn as much fuel as possible
Minimize landing speed (if v>5), yet land quickly
Maximize landing speed