Table of Contents
Fetching ...

Fitness Approximation through Machine Learning

Itai Tzruia, Tomer Halperin, Moshe Sipper, Achiya Elyasaf

TL;DR

This work tackles the high cost of fitness evaluations in genetic algorithms by introducing a surrogate-based fitness approximation that is updated online and governed by dynamic evolution-control switches. By using fast linear models (Ridge and Lasso) trained on a population-derived dataset, the framework alternates between evaluates-once and approximate-evaluation modes to balance solution quality with computational efficiency. Across three Gymnasium environments (Blackjack, Frozen Lake, Monster Cliff Walking), the approach achieves significant runtime reductions while maintaining identical or near-identical fitness to a full GA at higher approximate-to-actual ratios, validated via permutation tests. The method is general, extendable to other domains and surrogate models, and supports enhancements such as novelty-based initialization and parallelized training, offering a practical blueprint for surrogate-assisted optimization in expensive-evaluation settings.

Abstract

We present a novel approach to performing fitness approximation in genetic algorithms (GAs) using machine-learning (ML) models, through dynamic adaptation to the evolutionary state. Maintaining a dataset of sampled individuals along with their actual fitness scores, we continually update a fitness-approximation ML model throughout an evolutionary run. We compare different methods for: 1) switching between actual and approximate fitness, 2) sampling the population, and 3) weighting the samples. Experimental findings demonstrate significant improvement in evolutionary runtimes, with fitness scores that are either identical or slightly lower than that of the fully run GA -- depending on the ratio of approximate-to-actual-fitness computation. Although we focus on evolutionary agents in Gymnasium (game) simulators -- where fitness computation is costly -- our approach is generic and can be easily applied to many different domains.

Fitness Approximation through Machine Learning

TL;DR

This work tackles the high cost of fitness evaluations in genetic algorithms by introducing a surrogate-based fitness approximation that is updated online and governed by dynamic evolution-control switches. By using fast linear models (Ridge and Lasso) trained on a population-derived dataset, the framework alternates between evaluates-once and approximate-evaluation modes to balance solution quality with computational efficiency. Across three Gymnasium environments (Blackjack, Frozen Lake, Monster Cliff Walking), the approach achieves significant runtime reductions while maintaining identical or near-identical fitness to a full GA at higher approximate-to-actual ratios, validated via permutation tests. The method is general, extendable to other domains and surrogate models, and supports enhancements such as novelty-based initialization and parallelized training, offering a practical blueprint for surrogate-assisted optimization in expensive-evaluation settings.

Abstract

We present a novel approach to performing fitness approximation in genetic algorithms (GAs) using machine-learning (ML) models, through dynamic adaptation to the evolutionary state. Maintaining a dataset of sampled individuals along with their actual fitness scores, we continually update a fitness-approximation ML model throughout an evolutionary run. We compare different methods for: 1) switching between actual and approximate fitness, 2) sampling the population, and 3) weighting the samples. Experimental findings demonstrate significant improvement in evolutionary runtimes, with fitness scores that are either identical or slightly lower than that of the fully run GA -- depending on the ratio of approximate-to-actual-fitness computation. Although we focus on evolutionary agents in Gymnasium (game) simulators -- where fitness computation is costly -- our approach is generic and can be easily applied to many different domains.
Paper Structure (22 sections, 4 equations, 2 figures, 5 tables)

This paper contains 22 sections, 4 equations, 2 figures, 5 tables.

Figures (2)

  • Figure 1: Gymnasium environments (or custom modifications of them) we use for actual fitness-score evaluation.
  • Figure 2: Flowchart of proposed method. In evolution mode the algorithm functions as a regular GA. When the switch condition is met the algorithm shifts to prediction mode: actual (in-simulator) fitness values are calculated only for a sampled subset of the population, while the rest are assigned approximate fitnesses from the ML model. This latter is retrained before moving to the next generation.