Skip to content

st1lson/GeneticAlgorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeneticAlgorithm

Algorithm information

An algorithm based on biologically inspired operators such as mutation, crossover and selection.
Wikipedia article about Genetic algorithm.

config.json example

Here we can easily and quickly configure algorithm limitations.

{
  "Path": "default.txt",
  "IterationsCount": 1000,
  "Separators": [
    "with weight",
    "and cost"
  ],
  "PossibleItems": [
    "Item names..."
  ],
  "MaxWeight": 500,
  "ItemsCount": 100,
  "MinItemCost": 2,
  "MaxItemCost": 30,
  "MinItemWeight": 1,
  "MaxItemWeight": 20,
  "PopulationCount": 100,
  "EvolutionChance": 0.05,
  "CrossingoverChance": 0.5
}

Source file example

The first line stands for items count. For example use 100.
Then follows enumeration of the items in the following format Item with weight x and cost y where x and y integers.

100
Item with weight x and cost y
Laptop with weight 5 and cost 25
...

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages