Skip to content

An easy implementation of the Genetic Algorithm for the Eight Queens Problem and some improvements to the basic design for faster convergence to a possible solution. The project also offers a short comparative study on the performance of the two versions of algorithms and possible reasons for the same.

Notifications You must be signed in to change notification settings

agarwalrohan189/Improved-Genetic-Algorithm-for-Eight-Queens-Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Improved-Genetic-Algorithm-for-Eight-Queens-Problem

Content Details:-

The repository contains two files:-

1. Genetic_Algo.py: This file contains the complete python code which can we used to run both 
   the naive and the improved version of the Genetic Algorithm for the Eight Queens Problem.


2. Report.pdf: This file contains a brief introduction about the problem, implemenataion details
   and the improvements along with the possible reasons. It also contains a short ananlysis 
   of the results obtained.

Execution Details:-

The code requires the following libraries to be installed. Please run the following snippet in the terminal if not already installed.

>>> pip3 install numpy

>>> pip3 install matplotlib

Run the code by simply navigating to the folder and running the following command:-

>>> python3 Genetic_Algo.py

The code will output the best fitness value for all generations for the given problem. In the end, the graph is plotted for comparison of the textbook version and the improved version. The part for the average performance for multiple runs of the algorithms is commented part in both the functions. The part could be uncommented to analyse the average performance of the algorithms.

Note:- The Textbook version of the algorithm being talked about in the report comes from the book titled 'Artificial Intelligence A Modern Approach, Third Edition' by 'Stuart J. Russell' and 'Peter Norvig'. The pdf can be found easily on the internet.

Contact at [email protected] for any clarifications or discussion on some more improvement ideas.

About

An easy implementation of the Genetic Algorithm for the Eight Queens Problem and some improvements to the basic design for faster convergence to a possible solution. The project also offers a short comparative study on the performance of the two versions of algorithms and possible reasons for the same.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages