Skip to content

Commit 6ffbac9

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0ed5a04 commit 6ffbac9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

genetic_algorithm/knapsack.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def generate_knapsack_instance(
8989

9090
genome_t = list[int] # An index list where 1 means item is included, 0 means excluded
9191

92+
9293
def evaluate(genome: genome_t, items: list[Item], capacity: int) -> tuple[int, int]:
9394
"""
9495
Calculates fitness (value) and weight of a candidate solution. If overweight,

0 commit comments

Comments
 (0)