This project implements a Genetic Algorithm (GA) to solve the Quadratic Assignment Problem (QAP).
It includes both a matplotlib convergence plot and a turtle-based visualizer for the best solution.
- Clone this repository:
git clone https://github.com/plainsight16/GA-QAP.git cd GA-QAP - Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
- Install dependencies:
pip install -r requirements.txt
- Run main.py
python Main.py
This plot shows how the best and average fitness scores evolve across generations.
The turtle visualizer simulates the best assignment solution by drawing facilities and connections.
Red color of line means long distance, green one - short Thick line means big value of flow (aka cost), thin one - small Both values are in context of particular distance and flow matrices
In short: thin green is better than thick red


