Skip to content

This repository contains a basic implementation of Particle Swarm Optimization (PSO) in Python.

Notifications You must be signed in to change notification settings

andref12/pso-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Particle Swarm Optimization (PSO) - Basic Implementation

This repository contains a basic implementation of Particle Swarm Optimization (PSO) in Python. PSO is a computational method used for optimization problems, inspired by the social behavior of birds and fish.

image

Prerequisites

Ensure you have Python instaled (>=3.6). You may need the following dependencies:

pip install numpy matplotlib pygame

Usage

Run the script with:

python main.py

By default, the implementation optimizes a sample function, but you can modify it to suit your needs.

Customization

  • Change the objective function in the code to optimize a different function.
  • Adjust hyperparameters such as the number of particles, inertia weight, and acceleration coefficients.

About

This repository contains a basic implementation of Particle Swarm Optimization (PSO) in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages