Genetic optimisation population and fitness routines
Genetic optimisation population and fitness routines.
A C++ optimisation exercise with genetic algorithms, ant-colony optimisation and particle-swarm approaches built around graphs, nodes and weighted relationships.
*File metrics count tracked files after excluding common generated build folders. The project status is an editable draft classification.
Capabilities evidenced by project documentation and source structure; some behaviours require platform configuration.
Genetic optimisation population and fitness routines.
Ant-colony and particle-swarm strategies.
Graph and route data structures.
Technical architecture drawn from the repository and supplied documentation.
The project uses C++, Qt 6, Algorithms as its documented technical foundation.
The source tree and supplied README describe the primary modules; individual files and runtime behaviour may vary by platform.
Genetic algorithm creates and evaluates generations
std::vector<int> GeneticSolver::run() {
auto t0 = Clock::now();
initialize();
evaluate();
std::vector<int> bestInd = population[0];
double bestFit = fitness[0];
for (int gen = 1; gen < maxGen; ++gen) {
const std::vector<int> elite = bestInd;
std::vector<std::vector<int>> newPop;
newPop.reserve(popSize);
// Selection, crossover, mutation and repair follow.
}
// Remaining source updates and returns the best candidate.
}
The solver couples tournament-style parent selection with crossover, mutation, repair and an elite individual. The displayed fragment is abridged from the source to focus on the generational flow.
std::vector<int> GeneticSolver::run() {
initialize();
evaluate();
std::vector<int> bestInd = population[0];
for (int gen = 1; gen < maxGen; ++gen) {
const auto elite = bestInd;
auto p1 = selectParent();
auto child = crossover(p1, selectParent());
mutate(child);
repair(child);
// Elite is retained while the population evolves.
}
return bestInd;
}
Screenshots from supplied documentation and repository media. Missing visuals remain placeholders rather than invented screens.
To fill this space, add an approved screenshot with the exact filename shown below. The site currently displays a neutral placeholder.
assets/img/projects/ordering-problem/screenshot-01.webp
Technology overview: C++, Qt 6, Algorithms. The list reflects documented tools, dependencies and proposed components; for planned projects it does not prove implementation.
File types identified: 9 .cpp, 8 .h, 1 .ui
Explore the public repository, source code and project documentation on GitHub.