Skip to content

Solving Salesman Problem with Genetic algorithm - applying functional programming and parallel programming principles.

Notifications You must be signed in to change notification settings

MoamenSoroor/genetic-algorithms

Repository files navigation

genetic-algorithm

Genetic algorithms exploration.

Applying Functional Progamming Prinicples, Parallel Progamming on Genetic Algorithm

Declartive Code call Starts at GNAlgorithm class at GNAlgorithm.cs file

  • Configure the algorithm with the user choices: inside the Configure Method, I build the different algorithm parts via composition
public class GNAlgorithm
{

    private readonly Func<Map,GNAResult> execute;

    public GNAlgorithm(GNAChoices choices,GNAOptions options)
    {
        execute = GNAConfigurations.Configure(choices, options);
    }
}
  • Execute the algorithm with: Execute() method
public GNAResult Execute(Map map)
{
    return execute(map);

}
  • You can find the declarive configuration code at GNAConfigurations.cs file

  • user can configure the algorithm from the choices at the advanced panel at the right of the UI (crossover, fitness calculation, selection, ... etc). user selection will reflect in the configure function by composing different pure function based on ui selection: alt text

  • Screenshots of solving salesman problem with Genetic algorithm:

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

About

Solving Salesman Problem with Genetic algorithm - applying functional programming and parallel programming principles.

Topics

Resources

Stars

Watchers

Forks

Languages