{"id":18309582,"url":"https://github.com/sfuhrm/geneticalgorithm","last_synced_at":"2025-08-08T18:42:58.525Z","repository":{"id":57730922,"uuid":"76110252","full_name":"sfuhrm/geneticalgorithm","owner":"sfuhrm","description":"Genetic algorithm Java library for explorers","archived":false,"fork":false,"pushed_at":"2025-03-29T19:30:42.000Z","size":3000,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T19:30:57.308Z","etag":null,"topics":["fast","genetic-algorithm","genetic-algorithm-framework","genetic-algorithms","genetic-optimization-algorithm","geneticalgorithm","genetics","heuristics","hypothesis","java","library","machine-learning","machine-learning-algorithms","machine-learning-library","machinelearning","multithreading","optimization-algorithms","problem-solving"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/sfuhrm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-10T12:08:10.000Z","updated_at":"2025-03-29T19:30:46.000Z","dependencies_parsed_at":"2022-09-26T22:01:40.719Z","dependency_job_id":null,"html_url":"https://github.com/sfuhrm/geneticalgorithm","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfuhrm%2Fgeneticalgorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfuhrm%2Fgeneticalgorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfuhrm%2Fgeneticalgorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfuhrm%2Fgeneticalgorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sfuhrm","download_url":"https://codeload.github.com/sfuhrm/geneticalgorithm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248033222,"owners_count":21036756,"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":["fast","genetic-algorithm","genetic-algorithm-framework","genetic-algorithms","genetic-optimization-algorithm","geneticalgorithm","genetics","heuristics","hypothesis","java","library","machine-learning","machine-learning-algorithms","machine-learning-library","machinelearning","multithreading","optimization-algorithms","problem-solving"],"created_at":"2024-11-05T16:11:53.049Z","updated_at":"2025-04-09T11:42:47.031Z","avatar_url":"https://github.com/sfuhrm.png","language":"HTML","readme":"Genetic Algorithm in Java\n===================\n[![Java CI with Maven](https://github.com/sfuhrm/geneticalgorithm/actions/workflows/maven-ref.yml/badge.svg)](https://github.com/sfuhrm/geneticalgorithm/actions/workflows/maven.yml)\n[![Coverage](https://raw.githubusercontent.com/sfuhrm/geneticalgorithm/refs/heads/gh-pages/jacoco.svg)]() \n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.sfuhrm/geneticalgorithm/badge.svg)](https://maven-badges.herokuapp.com/maven-central/de.sfuhrm/geneticalgorithm)\n[![javadoc](https://javadoc.io/badge2/de.sfuhrm/geneticalgorithm/javadoc.svg)](https://javadoc.io/doc/de.sfuhrm/geneticalgorithm)\n[![ReleaseDate](https://img.shields.io/github/release-date/sfuhrm/geneticalgorithm)](https://github.com/sfuhrm/geneticalgorithm/releases)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n## Purpose\n\nA genetic algorithm library in Java with focus on easy usage and high performance.\nGenetic algorithms are\nmeta heuristics inspired by the process of natural selection\nthat belongs to the larger class of evolutionary algorithms.\nGenetic algorithms can solve optimization problems when there's only\nan evaluation function available (also known as fitness function).\n\n## Illustration: Integer guessing\n\nThe following illustration shows the library [guessing a sequence of\n30 int values](https://github.com/sfuhrm/geneticalgorithm/blob/master/geneticalgorithm-example-int-guessing/src/main/java/de/sfuhrm/genetic/intarrayguessing/GuessingExample.java) with a genetic population size of 3000 hypothesis.\nAt the beginning many components of the population are wrong (=red).\nWith almost every generation (=line) the population improves\nin fitness and more and more components turn from wrong (=red)\nto correct (=green).\n\n![Guessing an int sequence](https://raw.githubusercontent.com/sfuhrm/geneticalgorithm/master/.github/IntGuessingExample.gif\n\"Guessing an int sequence\")\n\nSee [sample code](https://github.com/sfuhrm/geneticalgorithm/blob/master/geneticalgorithm-example-int-guessing/src/main/java/de/sfuhrm/genetic/intarrayguessing/GuessingExample.java).\n\n## Using the library\n\nThe process of using the library is summarized in the following picture:\n![Steps for using GeneticAlgorithm](https://raw.githubusercontent.com/sfuhrm/geneticalgorithm/master/doc/uml/activity-process-steps-for-geneticalgorithm/activity_process_steps_for_geneticalgorithm.png\n\"Steps for using GeneticAlgorithm\")\n\nAn overview of the classes is given in the following class diagram:\n![Class diagram of GeneticAlgorithm](https://raw.githubusercontent.com/sfuhrm/geneticalgorithm/master/doc/uml/class-geneticalgorithm/class_geneticalgorithm.png\n\"Class diagram of GeneticAlgorithm\")\n\nThere is a [![javadoc](https://javadoc.io/badge2/de.sfuhrm/geneticalgorithm/javadoc.svg)](https://javadoc.io/doc/de.sfuhrm/geneticalgorithm)\ndocumentation online for a more detailed discussion on the classes.\n\n## Example\n\nThere is a stand-alone Java application in the Maven subproject\ngeneticalgorithm-example-int-guessing. This example tries to\nguess one sequence of integer numbers. One example is to\nguess the sequence [0, 1, 2, 3, 4].\n\nPlease see the example code in\n[GuessingExample.java](https://github.com/sfuhrm/geneticalgorithm/blob/master/geneticalgorithm-example-int-guessing/src/main/java/de/sfuhrm/genetic/intarrayguessing/GuessingExample.java).\n\n## Including genetic algorithm in your projects\n\nThe recommended way of including the library into your project is using \nApache Maven:\n\n---------------------------------------\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.sfuhrm\u003c/groupId\u003e\n    \u003cartifactId\u003egeneticalgorithm\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n---------------------------------------\n\n## Requirements\n\nThe library uses Java 8 functions and will only work with Java 8 and above.\nThere are no libraries needed besides those build-in the JDK.\n\n## Algorithm reference\nThe algorithm is based on the book\n_Machine learning. Tom M. Mitchell. Published by McGraw-Hill_\n(ISBN 0-07-115467-1).\n\n## License\n\n  Copyright 2016-2025 Stephan Fuhrmann\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfuhrm%2Fgeneticalgorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsfuhrm%2Fgeneticalgorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfuhrm%2Fgeneticalgorithm/lists"}