Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/caiocarneloz/nature-inspired

Basic nature-inspired algorithms developed to a master's class lesson
https://github.com/caiocarneloz/nature-inspired

genetic-algorithm machine-learning nature-inspired-algorithms optimization-algorithms

Last synced: about 1 month ago
JSON representation

Basic nature-inspired algorithms developed to a master's class lesson

Awesome Lists containing this project

README

        

# nature-inspired
Basic nature-inspired algorithms developed to a master's class lesson

## Fitness Functions
Fitness functions used in the genetic algorithm are defined in **GeneticAlgorithm.cpp**. However the functions used in Hill Climbing and Simmulated Annealing are defined in **utilities.cpp** as "rate". Two of them are math functions to be minimized or maximized. The last one is a Hamming Distance to calculate the difference between pixels of a image.

## Hill Climbing
The Hill Climbing algorithms just get as parameter the number of iterations.
There are three different implementations for this algorithm, as below:
- Hill Climbing
- Iterative Hill Climbing
- Stochastic Hill Climbing
Which can be used by typing:
```
HC(max_it)
IHC(max_it)
SHC(max_it)
```

## Simmulated Annealing
The Simmulated Annealing algorithm receive as parameter just the temperature to be used. You can call the function as below:
```
SA(temperature)
```
The decrease value can be changed in the hardcode.

## Genetic Algorithm