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

Uploaded Python 3

File details

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

File metadata

  • Download URL: matplotlab-0.1.18.tar.gz
  • Upload date:
  • Size: 19.9 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.18.tar.gz
Algorithm Hash digest
SHA256 060eb334feb4ca9fc2f1b18b7772cf9379e4f4d08d967119fe67f78f558d3c66
MD5 8da2b243ff57e1087befa4d5649d301a
BLAKE2b-256 542e00a16cea08c4f30f17dd5f6f8989663acb777f0e88b795aae2fbed40bfcd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: matplotlab-0.1.18-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.18-py3-none-any.whl
Algorithm Hash digest
SHA256 12c0731ffe04b5c32be0f8db2726a06b380bd96763748771bf0027d0a05b74b4
MD5 ebc4c2632d78dfff0e6dc1b7eb8cb97f
BLAKE2b-256 3ac9ccb33110d5eb042b0ecdd7bef2c476862b7fa18ce7f473d38af123594f93

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