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.17.tar.gz (20.0 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.17-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: matplotlab-0.1.17.tar.gz
  • Upload date:
  • Size: 20.0 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.17.tar.gz
Algorithm Hash digest
SHA256 3f5bc64b61af3e1d8301b03f0b55044d826676fc90a900c03541d452d1ffa64d
MD5 8789c9e919d85191163226fe0e8b2981
BLAKE2b-256 5d4465916ce9adb498a5970f9bcfa11e810ceb079b50bc4fcff54d6193b2118d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: matplotlab-0.1.17-py3-none-any.whl
  • Upload date:
  • Size: 22.1 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.17-py3-none-any.whl
Algorithm Hash digest
SHA256 3fb430d5bf7904f81215e357159fc07e09b05bf47347b7b325c088a4b3786e39
MD5 cb818152328063d6bc4957b6d1932451
BLAKE2b-256 e8347fff1872b69acfcbddfe9da8b8aa0707525c9c7abf6e2d82f33cd58917ee

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