Skip to content

Instantly share code, notes, and snippets.

View dotacow's full-sized avatar

yousef kitaneh dotacow

View GitHub Profile
@dotacow
dotacow / ga_budget_optimization.py
Created April 23, 2026 17:14
an exercise in GA optimization in a binary knapsack-like problem.
PROJECTS = [
('A', 3, 5),
('B', 2, 4),
('C', 4, 3),
('D', 1, 2)]
BUDGET = 10
ITERATIONS = 1000
INITIAL_POPULATION = [0b1010, 0b0101, 0b1100, 0b0011]