Skip to content

Genetic Algorithms techniques in solving a searching problem for optimization.

Notifications You must be signed in to change notification settings

Sarah-Hesham-2022/Optimizing-KnapSack-Using-Genetic-Algorithms

Repository files navigation

Optimizing-KnapSack-Using-Genetic-Algorithms

Genetic Algorithms techniques in solving a searching problem for optimization.

-Before we jump into explaining the details, we need to understand that such a problem could be solved using dynamic programming or any other common algorithm, this is just a simple example of applying genetic algorithms ,the point is, it is useful when the search space becomes explosive as complexity of dynamic programming is O(n^2) .

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

-Sample of the output, to compare my results that are supposed to be trying to reach the best solution (Optimization) and the usage of an online tool that actually gets the best solution:

Testindex 8

Testindex 8_ Continue 1

Testindex 8_ Continue 2

Testindex 8_ Continue 3_MyOutputBestSolution

-So, as seen above genetic algorithms that is based on GUIDED Randomness and Probability could reach a profit of 3794 ,where the profit reached optimally by dynamic programming is 3899 .