mlehotay

developer blog and assorted data science projects

#computational-complexity Articles


Solving the Knapsack Problem with a Genetic Algorithim

Here's the code. I'll write the description in a day or two. I still need to add weapons and armor to the treasure chest and update the fitness calculations to include the probability defeating the troll. Treasure import random import arena # https://github.com/mlehotay/arena.git NUM_ITEMS = 20 # number …