{"id":26555475,"url":"https://github.com/vyjayanthipolapragada/genetic_algorithms_knapsack_problem","last_synced_at":"2026-04-28T01:31:17.154Z","repository":{"id":208292621,"uuid":"721276331","full_name":"VyjayanthiPolapragada/Genetic_Algorithms_Knapsack_Problem","owner":"VyjayanthiPolapragada","description":"Solving a single constraint binary (0-1) Knapsack problem using the concept of Genetic Algorithms","archived":false,"fork":false,"pushed_at":"2023-11-20T18:22:38.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-28T02:02:49.503Z","etag":null,"topics":["crossover","fitness","genetic-algorithms","knapsack-problem","mutation","population","python","selection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VyjayanthiPolapragada.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-20T18:09:11.000Z","updated_at":"2024-09-14T07:32:10.000Z","dependencies_parsed_at":"2023-11-20T19:44:58.968Z","dependency_job_id":"13047984-d598-443e-836f-a5f4e4988336","html_url":"https://github.com/VyjayanthiPolapragada/Genetic_Algorithms_Knapsack_Problem","commit_stats":null,"previous_names":["vyjayanthipolapragada/genetic_algorithms_knapsack_problem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VyjayanthiPolapragada/Genetic_Algorithms_Knapsack_Problem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VyjayanthiPolapragada%2FGenetic_Algorithms_Knapsack_Problem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VyjayanthiPolapragada%2FGenetic_Algorithms_Knapsack_Problem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VyjayanthiPolapragada%2FGenetic_Algorithms_Knapsack_Problem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VyjayanthiPolapragada%2FGenetic_Algorithms_Knapsack_Problem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VyjayanthiPolapragada","download_url":"https://codeload.github.com/VyjayanthiPolapragada/Genetic_Algorithms_Knapsack_Problem/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VyjayanthiPolapragada%2FGenetic_Algorithms_Knapsack_Problem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32362780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crossover","fitness","genetic-algorithms","knapsack-problem","mutation","population","python","selection"],"created_at":"2025-03-22T10:52:40.635Z","updated_at":"2026-04-28T01:31:17.113Z","avatar_url":"https://github.com/VyjayanthiPolapragada.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Genetic_Algorithms_Knapsack_Problem\nSolving a single constraint binary (0-1) Knapsack problem using the concept of Genetic Algorithms\n\nSingle constraint: This type of problem is the standard knapsack problem where the limitation is only for one variable of the given items.\n\nBinary (0-1): In this type of knapsack problem, there is only one item of each kind (or we can pick only one). \nSo, we are available with only two options for each item, either pick it (1) or leave it (0)\n\nGenetic Algorithms are computer algorithms that search for good solutions to a problem from among a large number of possible solutions.\n\nUploaded python files consists of different functions for different stages of Genetic Algorithm as stated below\n\n1. Fitness_Selection.py : Used for defining functions which compute the fitness of population and select the fittest individuals to undergo crossover\n2. Crossover_Mutation.py : Used for defining functions which implement single point corssover for the fittest individuals and mutate using bit-flip technique\n3. Evaluate_Knapsack.py: Calculates the fitness of last generation and returns its parameters\n\nCheck main.py for main python script \n\nLibraries used: numpy, random (comes buit-in for jupyter notebook)\n\nOptimum solution can be obtained for custom data set and randomly generated dataset as well. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyjayanthipolapragada%2Fgenetic_algorithms_knapsack_problem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvyjayanthipolapragada%2Fgenetic_algorithms_knapsack_problem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyjayanthipolapragada%2Fgenetic_algorithms_knapsack_problem/lists"}