Back to Projects

EvoMan Neuroevolution

Comparing Island Model evolutionary strategies with fitness-sharing for evolving neural network controllers in the EvoMan game framework.

March 1, 2024
Evolutionary ComputingNeural NetworksPythonOptimization

Overview

Course project for Evolutionary Computing at Vrije Universiteit Amsterdam (M.Sc. AI). Playing a 2D platformer game while beating multiple enemies can be framed as a Constrained Multi-Objective Optimization Problem (CMOOP). This study compares two fitness evaluation strategies within the Island Model for neuroevolution of game-playing controllers in the EvoMan framework.

The Problem

The EvoMan framework uses 20 sensors as input to a neural network with a single hidden layer (10 neurons) and 5 action outputs (jump, shoot, move left/right, release) — resulting in 265 weighted connections that form the genotype of each evolutionary agent. The goal: optimize these weights to defeat as many enemies as possible.

Two Approaches

Traditional Island Model: Multiple islands evolve populations independently with periodic circular migration. Fitness is calculated per game using a weighted combination of enemy damage dealt, player health remaining, and time taken. Tournament selection and line recombination crossover produce offspring.

Fitness-Sharing CMOOP: A novel approach where each solution is assigned a "beaten vector" — a binary vector indicating which enemies it defeated. Solutions with similar beaten vectors (beating the same enemies) get their fitness adjusted via a sharing function, increasing the chance that similar-performing solutions reproduce. The hypothesis: this leads to offspring that beat the same enemies more efficiently.

Key Technical Details

  • Selection: Tournament selection (configurable pressure via group size k) and roulette wheel selection
  • Crossover: Line recombination with alpha in [-0.25, 1.25] to prevent weight collapse toward zero
  • Mutation: Per-weight mutation probability with values sampled from N(0, sigma)
  • Island migration: Circular topology, periodic exchange after fixed generations

Findings

The fitness-sharing approach incorporating kill count was not significantly better than the baseline Island Model for generalization performance across all enemies. However, preliminary experiments suggested a candidate fitness function that could be effective for future research. The Island Model's strength lies in its diversity maintenance through isolated parallel evolution.

Technologies

Python, NumPy, EvoMan Framework, CMA-ES, Evolutionary Algorithms