This is an experimental AI project of Reinforcement Learning applied to a platformer styled game.

In Frog Jump play either as a human or let a bot learn how to win a level.

You can customize the settings of the simulation and neural network to guide your bot learning process. (RL w NN + GA)


How it works?

In AI mode, a simulation with N bots will start each one with an internal neural network.

Each network can have up to 5 sensors, 4 hidden layers and 1 output neuron.

Each iteration of the simulation will run a reinforcement learning process optimized by genetic algorithms. At the end of each iteration the best bot will be mutated several times to build a new population for the next iteration. This process keeps going until the level is finished.

Adjustable params

  • Number of sensors.
  • Number of hidden layers.
  • Size of hidden layers.
  • Probability of mutation.
  • Number of bots per iteration.
  • Bot's horizontal detection range.
  • Bot's vertical detection range.

Fixed params

  • Hidden layers use RELU activation function.
  • Output layer uses Sigmoid function.
  • Decision threshold is 0.5 for output neuron.
  • Mutation is element-wise with a normal range of (-2, 2).
  • Initial population is randomized.

Controls

  • Click/Space to jump.
  • Escape to exit.

References

You can see the source code publicly and freely available on Github. https://github.com/Carlitos5336/ai-tutorials

NOTE: Recommended to play desktop version for better experience.

Download

Download
Frog Jump Desktop.zip 46 MB
Download
Frog Jump.exe 59 MB

Comments

Log in with itch.io to leave a comment.

This is fun, what game engine do you use?

Hi, thanks. I use GameMaker.