This game is played by a neural network that decides when to jump based on the closest obstacle.
Starting with no skill, the neural net gets better by applying a "Survival of the fittest" strategy, losely modeled on the process of biological evolution. Only the fittest (highest scoring) agents from each generation (game session) will produce the next generation, with a chance of random mutations that impact their one and only decision; to jump or not to jump.
This method can be used to train a machine to perform tasks without explicit instructions. Just provide the agent with options, a way to perceive the enviroment, and a way to measure performance, and it will eventually get better at most tasks.