Evolutionary Optimization of Problems with NP-hardness
Location
Ada, Ohio
Start Date
3-12-2024 12:00 AM
End Date
3-12-2024 12:00 AM
Description
My research was to pick out a computational problem with NP-hardness that had a single objective and then optimize it using evolutionary optimization. The problem that I chose was the longest path problem, which means, given an undirected acyclic graph, find the longest possible path to reach all nodes. This problem is important as it represents taking the longest path for situations that someone would want to cover the most amount of ground while visiting three areas, such as touring an area on a vacation. Pymoo was used to define my problem statement, create an objective function, and solve the optimization. For the longest path problem, I started out by designing a graph class that generates graphs from random values. The class was very flexible as it allowed a multitude of customization just from the line that you called it, as it had different inputs for things such as the random seed number or the number of nodes. After creating my graph class, I took a set of random points that would be based on a single objective, to make the cost as large as possible. The problem would define this cost in minimizing problem, with the Euclidean distance of the path taken plus a massive penalty for any nodes that are revisited. As such, the score would take all these values and define the lower of a score as better. After this I would generate a number of generations with a size of the population of my choosing. For each population, the best half were taken to the next run. This would continue until the number of generations had taken place in which the longest path should’ve been found. In the end, I found that my algorithm generated better results the larger the populations were and the greater number of times it ran, which proves that my algorithm works successfully.
Recommended Citation
Beresford, Ashton, "Evolutionary Optimization of Problems with NP-hardness" (2024). College of Engineering Student Research Colloquium. 18.
https://digitalcommons.onu.edu/eng_student_research_colloquium/2024/Presentations/18
Evolutionary Optimization of Problems with NP-hardness
Ada, Ohio
My research was to pick out a computational problem with NP-hardness that had a single objective and then optimize it using evolutionary optimization. The problem that I chose was the longest path problem, which means, given an undirected acyclic graph, find the longest possible path to reach all nodes. This problem is important as it represents taking the longest path for situations that someone would want to cover the most amount of ground while visiting three areas, such as touring an area on a vacation. Pymoo was used to define my problem statement, create an objective function, and solve the optimization. For the longest path problem, I started out by designing a graph class that generates graphs from random values. The class was very flexible as it allowed a multitude of customization just from the line that you called it, as it had different inputs for things such as the random seed number or the number of nodes. After creating my graph class, I took a set of random points that would be based on a single objective, to make the cost as large as possible. The problem would define this cost in minimizing problem, with the Euclidean distance of the path taken plus a massive penalty for any nodes that are revisited. As such, the score would take all these values and define the lower of a score as better. After this I would generate a number of generations with a size of the population of my choosing. For each population, the best half were taken to the next run. This would continue until the number of generations had taken place in which the longest path should’ve been found. In the end, I found that my algorithm generated better results the larger the populations were and the greater number of times it ran, which proves that my algorithm works successfully.