Skip to main content

neataco is an Ant Colony Optimization algorithm written in pure python. The intention is to use this package with PyPy. The hot loops in the algorithm are perfect for PyPy's just-in-time compilation and results in very fast performance.

To run create an instance of AntColonyOptimization and call run(). The output is a list with the optimized sequence of input items.

The input items can be a list of anything, because the distance function also has to be provided. The distance function must be able to calculate the distance between any items in the input list.

An example:

from neataco import AntColonyOptimization
items = [10, 20, 15, 5, 100, 2, 30, 50]
distance_fn = lambda a, b: abs(b - a)

aco = AntColonyOptimization(
    items,
    distance_fn,
    ant_count=1024,
    alpha=1,
    beta=20,
    evaporation=0.2,
)
optimal_path = aco.run()
print(optimal_path)

This will print the shortest path between all of the numbers; in this case ordering them.

Metadata

Release files for neataco 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neataco 1.0.0
File Size Uploaded Provenance Actions
neataco-1.0.0.tar.gz 3.8 kB Without provenance Details for neataco-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for neataco 1.0.0
File Interpreter ABI Platform Actions
neataco-1.0.0-py3-none-any.whl Python 3 none any Details for neataco-1.0.0-py3-none-any.whl

Total release size: 20.2 kB

Release files / neataco-1.0.0.tar.gz

Download URL neataco-1.0.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
15f5523a62b189fa6efd9bcf9a617c71b6278fdb4ebe4fc276d1de1d6779ffb9
BLAKE2b-256 checksum
How to use checksums
a0d776fbce3f1c47b4455dbdfaa793a6703edc137cfc182af40e530d0025cf51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / neataco-1.0.0-py3-none-any.whl

Download URL neataco-1.0.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfd5017d2d3e76567f7ed86c1ed39557ebcb38faf2480914b76e9e1249571602
BLAKE2b-256 checksum
How to use checksums
1d1ea89f1ba9eb5199239307e9c89a39fdd7fb71454ecbd508674e52fc7dfe7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Security for neataco 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page