liveBook · Manning

ACOpy

As explained in Optimization Algorithms: AI techniques for design, planning, and control problems

ACOpy is a Python library that provides an implementation of ant colony optimization.

ACOpy is a Python library implementing ant colony optimization for shortest-path problems. Install it with pip, represent cities and distances as a NetworkX graph, and use ACOpy’s solver and colony objects to search for tours. section 10.3.5

City-routing example

A 20-city graph produced a route from New York City through Columbus, Detroit, Philadelphia, and other cities to Indianapolis, with a reported length of 11058.541. Results can vary because ACO includes randomness. section 10.3.5

How Optimization Algorithms: AI techniques for design, planning, and control problems covers it

How deep it goes
Provides an implementation workflow and parameter configuration but defers detailed algorithm internals to manual ACO code.
Examples
Uses a weighted graph of twenty cities and prints a generated route with its total distance.
What it assumes
Assumes Python graph construction and distance data while demonstrating the ACOpy-specific solver workflow.
What you can do after
Operate/configure ACOpy to construct a weighted graph, run tours, and retrieve a candidate route and cost.
How it connects
Connects ant colony optimization with NetworkX graphs, pheromone evaporation, weighted routes, and traveling salesperson problems.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Optimization Algorithms: AI techniques for design, planning, and control problems. The section links point to the parts of the book it draws on.