Inspiration

The inspiration for building a genetic algorithm stemmed from the need for an efficient and effective technique in optimization and machine learning applications.

What it does

The program replicates the process of natural selection through evolution. The algorithm begins with a random population of solutions. Through successive generations, it aims to improve the solutions based on fitness evaluations and forms new populations until one of the stopping criteria is met. The current function we have the program solving is the Ackley function.

How we built it

Originally considering Python, the team shifted to C for its faster execution, which is crucial for optimization purposes.

Challenges we ran into

Memory allocation issues initially posed a challenge, requiring careful debugging to identify and rectify the source of the error. Another issue our group ran into was that one of the members was using Linux, while the other two were using Windows, which resulted in the code being incompatible. We had to add/remove the -lrt flag from the makefile.

Accomplishments that we're proud of

The algorithm demonstrated commendable performance with smaller populations and a limited number of generations. Observations of decreasing fitness values throughout the algorithm's progression indicated a successful approach to finding optimal solutions, albeit with increased CPU time for larger generation counts.

What we learned

The project enhanced the team's proficiency in the C language, providing valuable experience and insights into its application for optimization and evolutionary algorithms.

What's next for Genetic Algorithm in C

The first thing to do is address the issues with the stopping criteria for future development. The team can also consider the addition of a GUI to enhance user interaction and visualization. Continuous improvement in the algorithm's efficiency for optimization scenarios can also be worked on.

Built With

Share this project:

Updates