{"id":17290473,"url":"https://github.com/seanmor5/genex","last_synced_at":"2025-08-21T11:33:48.804Z","repository":{"id":40910237,"uuid":"200430025","full_name":"seanmor5/genex","owner":"seanmor5","description":"Genetic Algorithms in Elixir!","archived":false,"fork":false,"pushed_at":"2024-02-24T14:11:25.000Z","size":7165,"stargazers_count":147,"open_issues_count":3,"forks_count":14,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-12-10T08:51:22.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seanmor5.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-03T23:30:33.000Z","updated_at":"2024-11-05T13:00:54.000Z","dependencies_parsed_at":"2022-07-12T18:10:34.018Z","dependency_job_id":null,"html_url":"https://github.com/seanmor5/genex","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmor5%2Fgenex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmor5%2Fgenex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmor5%2Fgenex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmor5%2Fgenex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanmor5","download_url":"https://codeload.github.com/seanmor5/genex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230511479,"owners_count":18237657,"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","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":[],"created_at":"2024-10-15T10:38:15.356Z","updated_at":"2024-12-19T23:14:27.751Z","avatar_url":"https://github.com/seanmor5.png","language":"Elixir","funding_links":[],"categories":["Evolutionary \u0026 Genetic Algorithms"],"sub_categories":["How to Join"],"readme":"# Genex\n\n\u003e Genex makes it easy to write Genetic Algorithms with Elixir.\n\n[![Build Status](https://travis-ci.org/seanmor5/genex.svg?branch=master)](https://travis-ci.org/seanmor5/genex)\n[![Coverage Status](https://coveralls.io/repos/github/seanmor5/genex/badge.svg?branch=master)](https://coveralls.io/github/seanmor5/genex?branch=master)\n[![Hex Version](https://img.shields.io/hexpm/v/genex)](https://hex.pm/packages/genex/1.0.0-beta)\n\nThis library is inspired by Python's [DEAP](https://github.com/deap/deap).\n\n## Documentation\n\nDocumentation is available at [here](https://hexdocs.pm/genex/1.0.1-beta/api-reference.html).\n\n## Installation\n\nThe package can be installed by adding `genex` to your list of dependencies in `mix.exs`.\n\n```elixir\ndef deps do\n  [\n    {:genex, \"~\u003e 1.0.0-beta\"}\n  ]\nend\n```\n\n## Usage\n\nGenex requires an implementation module with 3 functions: `genotype/0`, `fitness_function/1`, and `terminate?/1`.\n\n```elixir\ndefmodule OneMax do\n  use Genex\n\n  def genotype, do: Genotype.binary(10)\n\n  def fitness_function(chromosome), do: Enum.sum(chromosome.genes)\n\n  def terminate?(population), do: population.max_fitness == 10\nend\n```\n\nNow, run `iex -S mix`.\n\nThen:\n```\n  iex\u003e OneMax.run()\n```\n\n## Features\n\nGenex strives to be as simple and customizable as possible. Along with the ability to customize EVERY step of your Genetic algorithm, Genex comes with the following features:\n\n- 6 Selection Operators (14 anticipated)\n- 12 Crossover Operators (17 anticipated)\n- 4 Mutation Operators (9 anticipated)\n- Fully Customizable Evolutions\n- Multi-Objective Optimization\n- Penalty Functions\n- Genotype Generation Helpers\n- Benchmarking of Common Problems\n- Exportable Genealogy Tree\n- Exportable Hall of Fame\n- Flexible Encoding of Chromosomes (any `Enum`)\n- Extendable Visualizations\n\nTo request a feature, please open an issue.\n\n## Examples\n\nThere are currently 5 basic examples available in the `examples` directory. To run them, clone the repo and run:\n\n```\nmix run examples/[example].exs\n```\n\nThe current examples are:\n\n- `one_max.exs`\n- `knapsack.exs`\n- `speller.exs`\n- `tsp.exs`\n- `n_queens.exs`\n- `knapsack.exs`\n\n## Genex in Practice\n\nThese projects use Genex in practice:\n\n- [seanmor5/covid](http://github.com/seanmor5/covid)\n\nTo feature yours, please submit a pull request.\n\n## Contributing\n\nIf you have any problems with Genex, please open an issue! If you have a fix for an issue, submit a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanmor5%2Fgenex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanmor5%2Fgenex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanmor5%2Fgenex/lists"}