Skip to content

chunhong1/genetic-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genetic-Algorithm

Universiti Tunku Abdul Rahman (UTAR) - Bachelor of Computer Science (Honours) - UCCC2513 MINI PROJECT

Authors:
1. Brandon Ting En Junn (21ACB01751)
2. Ling Ji Xiang (21ACB04584)
3. Loh Chia Heung (23ACB01684)
4. Yeap Chun Hong (22ACB06352)

Project Title: Performance Comparison of Genetic Algorithm with Particle Swam Optimisation

This is a research-based mini project that compares and evaluates the performance between Evolutionary Computing techniques such as Genetic Algorithm (GA) and Particle Swam Optimisation (PSO) for optimisation problems. Additionally, different combinations of GA operation techniques are experimented to obtain various results.

The following is the 10 benchmark functions used to evaluate their performance:

  1. Sphere Function
  2. Ackley Function
  3. Rastrigin Function
  4. Zakharov Function
  5. Axis Parallel Hyper-Ellipsoid Function
  6. Griewank Function
  7. Sum of Different Powers Function
  8. Rotated Hyper-Ellipsoid Function
  9. Schwefel 2.22 Function
  10. Exponential Function

Note: Their referred mathematical implementation can be found here.

Setup

Source Code

The main source code for this project is structured into 2 directories which are:

  • /Assignment

    • Contains the prototype GA implementation only.
    • Contains the experiment results for GA only.
    • GA.cpp is the main source file.
    • TextToExcel.ipynb is used to convert the experiment results from text files (.txt) to Excel files (.xlsx).
  • /Project

    • Contains the full GA and PSO implementations.
    • Contains the experiment results for GA and PSO.
    • GA.cpp and PSO.cpp are the main source files.
    • TextToExcel.ipynb is used to convert the experiment results from text files (.txt) to Excel files (.xlsx).

Compilation

Initially, this project was compiled manually to conduct the experiments. However, you can use any other Integrated Development Environment (IDE) for C++ to compile this project.

To generate the .exe file with manual compilation:

g++ -o GA.exe GA.cpp
g++ -o PSO.exe PSO.cpp

Note: Make sure to install the C++ Compiler (GCC/C++).

Results

Note: Our experimental results of this project can be found here.

In conclusion, based on our findings:

  • Best GA Model is GA49

    • Dynamic Tournament Selection
    • Uniform Crossover
    • Hybrid Comparing Mutation
    • Combined Replacement
  • PSO offers better performance than GA

    • PSO is more suitable for continuous optimisation problems
    • GA is more suitable for discrete optimisation problems

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •