A Comparison of Energy Consumption and Quality of Solutions in Evolutionary Algorithms

Journal: Algorithms • • MDPI AG • ISSN: 1999-4893

Abstract

Evolutionary algorithms are extensively used to solve optimisation problems. However, it is important to consider and reduce their energy consumption, bearing in mind that programming languages also significantly affect energy efficiency. This research work compares the execution of four frameworks—ParadisEO (C++), ECJ (Java), DEAPand Inspyred (Python)—running on two different architectures: a laptop and a server. The study follows a design that combines three population sizes (<inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><msup><mn>2</mn><mn>6</mn></msup></semantics></math></inline-formula>, <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><msup><mn>2</mn><mn>10</mn></msup></semantics></math></inline-formula>, <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><msup><mn>2</mn><mn>14</mn></msup></semantics></math></inline-formula> individuals) and three crossover probabilities (<inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mn>0.01</mn></mrow></semantics></math></inline-formula>; <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mn>0.2</mn></mrow></semantics></math></inline-formula>; <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mn>0.8</mn></mrow></semantics></math></inline-formula>) applied to four benchmarks (OneMax, Sphere, Rosenbrock and Schwefel). This work makes a relevant methodological contribution by providing a consistent implementation of the metric <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mi>η</mi><mo>=</mo><mi>f</mi><mi>i</mi><mi>t</mi><mi>n</mi><mi>e</mi><mi>s</mi><mi>s</mi><mo>/</mo><mi>k</mi><mi>W</mi><mi>h</mi></mrow></semantics></math></inline-formula>. This metric has been systematically applied in four different frameworks, thereby setting up a standardized and replicable protocol for the evaluation of the energy efficiency of evolutionary algorithms. The CodeCarbon software was used to estimate energy consumption, which was measured using RAPL counters. This unified metric also indicates the algorithmic productivity. The experimental results show that the server speeds up the number of generations by a factor of approximately <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mn>2.5</mn></mrow></semantics></math></inline-formula>, but the energy consumption increases four- to sevenfold. Therefore, on average, the energy efficiency of the laptop is five times higher. The results confirm the following conclusions: the computer power does not guarantee sustainability, and population size is a key factor in balancing quality and energy.

Subjects & Keywords

How to Cite this Article

Francisco Javier Luque-Hernández, Sergio Aquino-Britez, Josefa Díaz-Álvarez, et al. (2025). "A Comparison of Energy Consumption and Quality of Solutions in Evolutionary Algorithms". Algorithms. https://doi.org/10.3390/a18090593