Skip to main content

Artificial Algorithm Intelligence - Self-Adaptive Algorithm Selection & Universal Problem Solving

Project description

AAlgoI: Artificial Algorithm Intelligence

The self-optimizing algorithm selector that gets smarter with every run.

What is it?

AAlgoI automatically chooses the fastest algorithm for your problem—sorting, pathfinding, optimization—by learning from experience. It ships with a pre-trained RL model that knows which algorithm works best for your data shape, size, and constraints.

Installation

pip install aalgoi

5-Second Demo

from aalgoi import UniversalSolver

solver = UniversalSolver()

# Sorting
result = solver.solve("sort this list", [64, 34, 25, 12, 22, 11, 90])
# → Uses timsort (87% faster than quicksort on nearly-sorted data)

# Pathfinding
result = solver.solve("find shortest path", {
    'graph': {'A': {'B': 4, 'C': 2}, 'B': {'D': 5}, 'C': {'D': 1}},
    'start': 'A', 'end': 'D'
})
# → Uses Dijkstra (optimal for weighted graphs)

# Optimization
result = solver.solve("knapsack problem", {
    'items': [{'value': 60, 'weight': 10}, {'value': 100, 'weight': 20}],
    'capacity': 50
})
# → Uses greedy knapsack (2ms, 95% optimal)

How It Works

  1. Context Engine analyzes your data (size, patterns, constraints)
  2. Knowledge Graph narrows candidates by problem type
  3. RL Agent selects the best algorithm from experience
  4. Self-Healing falls back to alternatives if execution fails

Performance

Problem Type Algorithms Tested AAlgoI Speedup
Sorting (nearly sorted) 6 87% faster
Pathfinding (sparse) 3 45% faster
Optimization (small) 2 2ms vs 15ms

Features

Zero-config - Works out of the box
Pre-trained - No cold start, instant intelligence
Self-learning - Improves with every execution
Explainable - Knows why it chose an algorithm
Extensible - Add custom algorithms via registry

Advanced Usage

# Custom configuration
solver = UniversalSolver(config={
    'use_bandit': True,      # Enable multi-armed bandit exploration
    'use_drift': True,       # Detect data distribution changes
    'kg_enabled': True       # Use knowledge graph reasoning
})

# Get explanation
result = solver.solve(problem, data)
print(result.explanation)
# → "Selected timsort because data is 94% nearly-sorted..."

Requirements

  • Python 3.8+
  • torch>=2.0.0
  • numpy>=1.24.0

License

MIT License - Use freely in personal and commercial projects.

Contributing

  1. Fork the repo
  2. Add your algorithm to algorithms/
  3. Submit a PR with benchmark results

Built with ❤️ by the AAlgoI team

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

aalgoi-1.0.2.tar.gz (6.8 MB view details)

Uploaded Source

Built Distribution

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

aalgoi-1.0.2-py3-none-any.whl (83.3 kB view details)

Uploaded Python 3

File details

Details for the file aalgoi-1.0.2.tar.gz.

File metadata

  • Download URL: aalgoi-1.0.2.tar.gz
  • Upload date:
  • Size: 6.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for aalgoi-1.0.2.tar.gz
Algorithm Hash digest
SHA256 15b8fe274e83cd36e7650dd9c2ecd6300b079f58e5b8ddb63a8a4f590d52db3d
MD5 33b4aab9d0dfe700fe64e5ca11bc4127
BLAKE2b-256 fc1e31490fc5b41821e78850f5dbaa8c04493533287ca26ac2f3577fb667a542

See more details on using hashes here.

File details

Details for the file aalgoi-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: aalgoi-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 83.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for aalgoi-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 59d618d1a83a43171ef137f9e7e23675bad6f1dee459b14b696b4358b8dc1c17
MD5 fe46fd467e5af1c73485c5f733ebfd24
BLAKE2b-256 5528285d27931d78fc0cafd579b4f01ee147910cf6a1fd8f50f47aa6f39c807b

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