★ wanayoo — archive 1999 https://github.com/Hellisotherpeople/Genetic-Algorithims-PythonNouvelle recherche | Portail wanayoo
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

Genetic-Algorithims-Python

Some fun code I wrote. One file does string matching and another one solves the Knapsack problem.

The Knapsack problem is solved using a python implementation of bitarrays. Each gene is repersented with as an array of actual bits, not bloated bools or worse yet, ints. Such a design decision was made because I am solving the 0-1 knapsack problem. It's trivial to replace these bitarrays with normal lists and convert this GA To one that can solve the more general knapsack problem.

I also used techniques like pre-allocating memory in my lists of bitarrays (I know the size ahead of time and want to avoid repeated appends).

I'm impressed by the results I can achieve and may use this to make my Skyrim runs more fun :)

About

Some fun code I wrote. One file does string matching and another one solves the Knapsack problem.

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.