A python implementation of a simple Genetic Algorithm that attempts to find solutions to the travelling salesman problem.
Read the Full Paper - in Results/writeup.pdf
To run:
-
Navigate to the "Code" directory in the assignment folder
-
Type the command "python3 main.py"
NOTE:
I left in a simple tool I made to display a path. The function is called show_path()
Screenshots of the output of this tool are at the bottom of my paper.
I commented it out because it caused some issues when running from the command line.
If you're interested in getting the GUI thing to run on your machine, feel free to try. It should be pretty simple.
-
move graphics.py (in the "ignore" folder) into the code folder
-
uncomment the show_path() function, the graphics import, and the function call in the main method (all in main.py)
-
If you are on linux instead of running "python3 main.py" to execute the program, try running "/bin/python3 main.py" (this worked for me)
On Windows, i think the normal command, "python3 main.py" should work.
Alternatively, try opening the Code folder in VScode and running in the integrated terminal.