Logo

Survive Line

A ball tries to survive two waves using its pre-trained neural network.

Python
Survive Line

#What are the rules?📑

Simple rules to survive, use simple controls to avoid the wave and not to hit it.

  • The space between waves decreases.
  • The amplitude of the wave is always changing, so there is no way to cheat.
  • The game goes faster until double the initial speed.

Human playing the game

#Code Feature

Code Snippet

The game is written in Python due to its flexibility, scalability, and extensibility.

Encapsulation allowed me to create modular, reusable pieces of code that were easy to debug and maintain.

#Not enough?

Neural network of the ball is trying to survive

I used the N.E.A.T algorithm to train AI that can beat the game.

  • The yellow lines are the vision for the ball.
  • A grey box shows the collision area.
  • Particles behind the ball are removed to save CPU resources.
  • The highest score reached over 30 minutes of gameplay.

View the full training session on YouTube.

#Curious for more

Markdown Diary

I documented the project progress in a diary while developing the game, which helped in writing my thesis later.

You can view the diary I wrote during the development here.

#Want to try it yourself?🕹

You can download "Survive Line" from the GitHub repository.

Check out the LaTeX thesis version here.

You can download the game from this zip file.