/particleSwarmOptimization

Particle swarm optimization algorithm used to optimize the rastrigin function

Primary LanguagePython

Particle Swarm Optimization

The program uses particle swarm optimization to determine the minima of the rastrigin function.

Repl: https://repl.it/join/zwfkmhfu-kargq

Graph of rastrigin function

Requirements

The project is written in Python 3, with only one requirement, numpy==1.17.4.

Use pip install -r requirements.txt to install project requirements (just numpy)

or just do pip install numpy

Usage

main.py

The entry point for a custom run is main.py. It will prompt you to enter values for each parameter.

To run, python3 main.py

tests.py

To run, python3 tests.py

This is the file used for generating tests used for the report (see report.pdf). It generates a file tests.csv with results from all the runs.