Skip to content

solve the Knapsack Problem, a combinatorial optimization problem, using a Genetic Algorithm (GA) approach.

Notifications You must be signed in to change notification settings

saraelshaer/Knapsack_Problem_Genetic_Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Knapsack_Problem_Genetic_Algorithm

Overview

This project aims to solve the Knapsack Problem, a combinatorial optimization problem, using a Genetic Algorithm (GA) approach. The Knapsack Problem involves maximizing the total value of items that can be included in a knapsack, given a limited weight capacity. The Genetic Algorithm is a heuristic search technique inspired by the process of natural selection and evolution. Additionally, this project utilizes the Turtle graphics library for visualization.

Features:

  • Genetic Algorithm Implementation: The project implements a Genetic Algorithm to solve the Knapsack Problem, evolving a population of candidate solutions over multiple generations.
  • Knapsack Representation: Items and their properties (value, weight) are represented as genes, and individuals in the population represent potential solutions (sets of items).
  • Crossover and Mutation: Genetic operators such as crossover and mutation are applied to create new offspring individuals with variations from parent individuals.
  • Fitness Evaluation: The fitness of individuals is evaluated based on their ability to maximize the total value of items within the knapsack while not exceeding the weight capacity.

knapsack image

About

solve the Knapsack Problem, a combinatorial optimization problem, using a Genetic Algorithm (GA) approach.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages