You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solving Binary Knapsack Problem using Genetic Algorithm
Problem Statement
Given a set of $n$ items with weights $\{ w_1, w_2, ..., w_n \}$ and values $\{ v_1, v_2, ..., v_n \}$ with maximum capacity $W$,
maximize $$\sum_{i=1}^n v_ix_i$$
subject to, $$\sum_{i=1}^n w_ix_i \le W,$$
where $x_i \in \{ 0, 1 \} \forall i$ and $x_i$ represents the number of instances of item $i$ to include in the knapsack.
Usage
$ git clone https://github.com/souvikshanku/bkga.git
$ cd bkga
$ python population.py
About
Solving binary knapsack problem using genetic algorithm