Skip to main content

Laboratory Intelligence Toolkit - Swarm Intelligence Module

Project description

matplotlab - Laboratory Intelligence Toolkit

A lightweight Python library implementing Swarm Intelligence algorithms from lab coursework.

Features

Swarm Intelligence (SI)

  • Particle Swarm Optimization (PSO) - 3 implementations (basic, adaptive, modular)
  • Ant Colony Optimization (ACO) for Traveling Salesman Problem
  • 6 benchmark fitness functions (sphere, rastrigin, quadratic, oscillating, multi_modal, lab6_custom)
  • 5 boundary handling strategies (clamping, reflecting, wraparound, random reset, velocity damping)
  • 2 search methods (random search, brute force)
  • 7 lab implementation codes

Installation

Local Installation (Development)

pip install -e .

From PyPI (After Publishing)

pip install matplotlab

Quick Start

SI Module

from matplotlab.si import pso_adaptive, rastrigin
import numpy as np

best_x, best_val, history = pso_adaptive(
    rastrigin,
    dim=10,
    bounds=(-5.12, 5.12),
    num_particles=30,
    iterations=100
)
print(f"Best solution: {best_x}, Value: {best_val}")

Available Functions

from matplotlab.si import show_all_params

# View all 25 available functions and their parameters
show_all_params()

Get Help on Any Function

from matplotlab.si import pso_basic

# View function documentation and parameters
pso_basic.help()

# View quick parameter reference
pso_basic.params()

# View source code
pso_basic.show()
from matplotlab.si import run_aco

best_path, best_distance = run_aco(
    distances=distance_matrix,
    n_ants=20,
    n_iterations=50,
    alpha=1,
    beta=2,
    evaporation=0.5
)
print(f"Best tour: {best_path}, Distance: {best_distance}")

Requirements

  • Python 3.8+
  • numpy >= 1.19.0
  • matplotlib >= 3.3.0

Modules

SI (Swarm Intelligence)

  • algorithms.pso - PSO implementations
  • algorithms.aco - Ant Colony Optimization
  • algorithms.search - Random and Brute Force Search
  • optimization.fitness - Fitness functions
  • optimization.boundaries - Boundary handling strategies

CV (Computer Vision)

  • To be implemented

HCI (Human-Computer Interaction)

  • To be implemented

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matplotlab-0.1.15.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matplotlab-0.1.15-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file matplotlab-0.1.15.tar.gz.

File metadata

  • Download URL: matplotlab-0.1.15.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for matplotlab-0.1.15.tar.gz
Algorithm Hash digest
SHA256 ec3771296fb8dc55b3238edb5d1426f152c0d5e2aa5b141616c3fb9b912bd1ec
MD5 63400b3e0fdcba954b3ce8c97946698f
BLAKE2b-256 aab583fe023cc4907020a2d89f071694477e8f70110a9f59133d0d7a79f81085

See more details on using hashes here.

File details

Details for the file matplotlab-0.1.15-py3-none-any.whl.

File metadata

  • Download URL: matplotlab-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for matplotlab-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 91746790b2097a80fb6cfe211e4ab7b140177bebcc8253e801d0cb6edde360ab
MD5 5ab5b94c1d12425b99cbac8f64cbfe20
BLAKE2b-256 5867d84b7b457176b5804339ffbf454ce2765dda0596c3b7fdc968b1b8575905

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page