An open API service indexing awesome lists of open source software.

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

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!