https://github.com/underyourspell/knapsackgo
Implementation of the Genetic Algorithm on the Knapsack Problem in Go
https://github.com/underyourspell/knapsackgo
genetic-algorithm go golang knapsack-problem np-complete
Last synced: 4 months ago
JSON representation
Implementation of the Genetic Algorithm on the Knapsack Problem in Go
- Host: GitHub
- URL: https://github.com/underyourspell/knapsackgo
- Owner: UnderYourSpell
- Created: 2024-12-17T20:32:35.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-17T20:36:47.000Z (about 1 year ago)
- Last Synced: 2025-05-22T08:24:59.811Z (8 months ago)
- Topics: genetic-algorithm, go, golang, knapsack-problem, np-complete
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## The Knapsack NP-Complete Problem in Go
In other work studying the Traveling Salesman Problem as well as the Knapsack Problem, my implementations have been in C++.
I wanted to see how feasible I can implement these problems in Go, which is a language I have 0 experience in.
It seemed like an interesting language; so I thought it would be cool to write the Geneteic Algorithm (GA) with it.
This code attempts to replicate my code in C++ for the Knapsack NP-Complete problem with the GA.
My results were not great, but I spent much less time with this problem than the TSP. But I had fun writing it!