Skip to content

About

An implementation of Genetic Algorithm to solve the general Travelling Salesman problem.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genetic CPP

./compile.sh
./main
tail output.txt -n 8
Generation 9999 with 10000 individuals. Average fitness: 59.0082 -> Current best fitness:
[187, 135, 95, 61, 163, 153, 48, 8, 185, 38, 9, 111, 165, 83, 115, 178, 186, 167, 68, 189, 41, 150, 97, 47, 144, 128, 152, 29, 155, 122, 143, 55, 181, 53, 51, 142, 127, 21, 161, 39, 3, 126, 164, 190, 107, 108, 82, 74, 19, 69, 33, 162, 65, 94, 101, 112, 182, 86, 194, 42, 59, 5, 49, 156, 198, 26, 132, 72, 146, 0, 13, 104, 106, 71, 16, 157, 6, 105, 160, 24, 154, 32, 117, 183, 140, 172, 23, 96, 125, 130, 34, 179, 180, 50, 88, 120, 58, 15, 129, 4, 191, 44, 148, 75, 134, 138, 18, 92, 63, 139, 22, 109, 67, 70, 81, 133, 10, 193, 27, 188, 177, 31, 137, 90, 35, 89, 174, 80, 151, 60, 145, 12, 119, 56, 99, 102, 199, 54, 45, 166, 131, 85, 100, 116, 37, 62, 197, 78, 195, 28, 52, 159, 168, 124, 93, 110, 77, 192, 113, 169, 40, 114, 64, 30, 158, 57, 98, 184, 43, 149, 123, 73, 25, 36, 136, 173, 7, 11, 76, 118, 87, 79, 147, 66, 46, 170, 1, 141, 196, 84, 176, 2, 175, 20, 91, 103, 14, 171, 17, 121] -> 59.009108

Generation 10000 with 10000 individuals. Average fitness: 59.0082 -> Current best fitness:
[187, 135, 95, 61, 163, 153, 48, 8, 185, 38, 9, 111, 165, 83, 115, 178, 186, 167, 68, 189, 41, 150, 97, 47, 144, 128, 152, 29, 155, 122, 143, 55, 181, 53, 51, 142, 127, 21, 161, 39, 3, 126, 164, 190, 107, 108, 82, 74, 19, 69, 33, 162, 65, 94, 101, 112, 182, 86, 194, 42, 59, 5, 49, 156, 198, 26, 132, 72, 146, 0, 13, 104, 106, 71, 16, 157, 6, 105, 160, 24, 154, 32, 117, 183, 140, 172, 23, 96, 125, 130, 34, 179, 180, 50, 88, 120, 58, 15, 129, 4, 191, 44, 148, 75, 134, 138, 18, 92, 63, 139, 22, 109, 67, 70, 81, 133, 10, 193, 27, 188, 177, 31, 137, 90, 35, 89, 174, 80, 151, 60, 145, 12, 119, 56, 99, 102, 199, 54, 45, 166, 131, 85, 100, 116, 37, 62, 197, 78, 195, 28, 52, 159, 168, 124, 93, 110, 77, 192, 113, 169, 40, 114, 64, 30, 158, 57, 98, 184, 43, 149, 123, 73, 25, 36, 136, 173, 7, 11, 76, 118, 87, 79, 147, 66, 46, 170, 1, 141, 196, 84, 176, 2, 175, 20, 91, 103, 14, 171, 17, 121] -> 59.009108
Mutation occurs 8 times
Done!
Execution time: 172s
            .-/+oossssoo+/-.               lavantien@savaka
        `:+ssssssssssssssssss+:`           ----------------
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 23.04 x86_64
    .ossssssssssssssssssdMMMNysssso.       Host: MS-7D42 1.0
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 6.2.0-20-generic
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 8 hours, 4 mins
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2530 (dpkg), 162 (brew), 6 (flatpak), 26 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: zsh 5.9
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 3840x2160
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 44.0
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Yaru-dark [GTK2/3]
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Yaru [GTK2/3]
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: WezTerm
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: 12th Gen Intel i7-12700F (20) @ 4.800GHz
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA GeForce RTX 3080 Lite Hash Rate
      -+sssssssssssssssssyyyssss+-         Memory: 6507MiB / 31930MiB
        `:+ssssssssssssssssss+:`
            .-/+oossssoo+/-.

About

An implementation of Genetic Algorithm to solve the general Travelling Salesman problem.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages