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.16.tar.gz (11.7 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.16-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: matplotlab-0.1.16.tar.gz
  • Upload date:
  • Size: 11.7 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.16.tar.gz
Algorithm Hash digest
SHA256 baf1379e0a96d645ce2ee622b47712b7267d96dc491b1c3e4a18fd8d64de45d3
MD5 4aaf2c9577cb94e248d2c1ff04c140f4
BLAKE2b-256 8765d3e16267cad3b225801585129456eb7cd186cdc6d7577e8d672dd534ef75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: matplotlab-0.1.16-py3-none-any.whl
  • Upload date:
  • Size: 14.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.16-py3-none-any.whl
Algorithm Hash digest
SHA256 e58a0b79539a8cfb9319e1a51af692e72827eb6389be74501b51a31e764b524d
MD5 0d3286cdce5e7a627f1f57332fefbd14
BLAKE2b-256 c870a7068edd8daa696c8f50c1da8a2d5b3b1cc8f31cefbdb4662fa1b7df35c3

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