{"id":17334340,"url":"https://github.com/alpsayin/genetic-algorithm-matlab","last_synced_at":"2025-07-22T01:05:08.865Z","repository":{"id":28801589,"uuid":"32324617","full_name":"alpsayin/genetic-algorithm-matlab","owner":"alpsayin","description":"A very simple Genetic Algorithm implementation for matlab, easy to use, easy to modify runs fast.","archived":false,"fork":false,"pushed_at":"2022-01-11T15:39:04.000Z","size":44,"stargazers_count":38,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T02:04:56.440Z","etag":null,"topics":["cost-function","cost-optimization","genetic-algorithm","heuristic-search-algorithms","heuristics","matlab","optimisation","optimisation-algorithms"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alpsayin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.buymeacoffee.com/alpsayin"]}},"created_at":"2015-03-16T12:53:22.000Z","updated_at":"2025-05-29T11:29:04.000Z","dependencies_parsed_at":"2022-08-02T12:19:36.345Z","dependency_job_id":null,"html_url":"https://github.com/alpsayin/genetic-algorithm-matlab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alpsayin/genetic-algorithm-matlab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpsayin%2Fgenetic-algorithm-matlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpsayin%2Fgenetic-algorithm-matlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpsayin%2Fgenetic-algorithm-matlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpsayin%2Fgenetic-algorithm-matlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpsayin","download_url":"https://codeload.github.com/alpsayin/genetic-algorithm-matlab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpsayin%2Fgenetic-algorithm-matlab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266405405,"owners_count":23923536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cost-function","cost-optimization","genetic-algorithm","heuristic-search-algorithms","heuristics","matlab","optimisation","optimisation-algorithms"],"created_at":"2024-10-15T15:05:47.198Z","updated_at":"2025-07-22T01:05:08.842Z","avatar_url":"https://github.com/alpsayin.png","language":"MATLAB","funding_links":["https://www.buymeacoffee.com/alpsayin"],"categories":[],"sub_categories":[],"readme":"# genetic-algorithm-matlab\nA very simple Genetic Algorithm implementation for matlab, easy to use, easy to modify and runs fast. Even has some visualization too.\n\nTo Run\n------\nRun the FunctionOptimization script.\n\nTo Modify Optimization Function\n---------------------------------\nReplace your own function into EvaluateIndividual.m script. Note that this genetic algorithm tries to maximise the output so invert your function according to your needs. Right now it tries to locate the peak of a double variable function. It can be adjusted to optimize for more than two variable functions.\n\nTo Modify Genetic Algorithm Parameters\n--------------------------------------\n+ All the parameters are located in the FunctionOptimization.m script.\n+ populationSize -\u003e number of individuals in a population\n+ numberOfGenes -\u003e number of bits per chromosome\n+ crossoverProbability -\u003e probability that a crossover will happen between two individuals\n+ mutationProbability -\u003e probability that a mutation will occur in an individual\n+ tournamentSelectionParameter -\u003e parameter that's used to calculate the probabilities for individuals to be chosen in a tournament -\u003e 'p*(1-p)^k' where k denotes the k'th worst individual in the tournament pool\n+ variableRange -\u003e the range in which the genes will be decoded into. basically minimum and maximum values of the parameters\n+ numberOfGenerations -\u003e number of iterations to run genetic algorithm\n+ numberOfVariables -\u003e number of variables stored in one chromosome\n+ tournamentSize -\u003e this value determines the number of individuals to be taken into a tournament. an individual of this pool is then chosen for mating with a probability calculated from tournamentSelectionParameter\n+ numberOfReplications -\u003e after a generation is run, this number of best individuals are copied back into the population to ensure the solution quality does not degrade\n+ verbose -\u003e if true; progress is printed\n+ draw_plots -\u003e if true; progress is plotted\n\nUnit Tests\n----------\nThey are simply there to test the individual methods/steps of the genetic algorithm. Can be used for debugging.\n\nLicensing Stuff\n---------------\nPlease dont remove my name from the codes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpsayin%2Fgenetic-algorithm-matlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpsayin%2Fgenetic-algorithm-matlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpsayin%2Fgenetic-algorithm-matlab/lists"}