Genetic Algorithms

Previous: Algorithm

What to do next

Know that you have basic knowledge of Genetic Algorithms, the next step is to read more about GAs and try them out for yourself. Here are a few resources on GAs you might find useful:

And once you're done, take a look at (Mars Lander):

A CodinGame puzzle where you have to land a mars rover and a flat surface. You don't have to use GAs to solve it but you can

Mars Lander : simulation Mars Lander : console The goal is to land, without crashing it, the capsule "Mars Lander" which holds the rover Opportunity.

[float, int, float, int, float, int...] the angle (-90° to 90°) and the rocket thrust (0 to 4) on each turn.

Here is an example of solution for solving this puzzle using a genetic algorithm. Its fitting score is calculated with the final distance to the landing platform.

Mars Lander

You can also take a look at these problems:

Create your playground on
This playground was created on, our hands-on, knowledge-sharing platform for developers.
Go to
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
Online Participants