GEO INFER ANT

From ActiveInferenceInstitute/GEO-INFER · View interactive version

GEO INFER ANT is an AI agent skill from the GitHub repository ActiveInferenceInstitute/GEO-INFER. Ant Colony Optimization and swarm intelligence for geospatial problems. Use when solving spatial optimization with ACO, PSO, ABC algorithms, implementing stigmergic coordination, or optimizing geographic routing and resource allocation with bio-inspired methods.

How to use this skill

Skill file

GEO-INFER-ANT

Instructions

Core capabilities

matrix-backed routing, VRP-style constraints, and multi-objective paths.

global neighborhoods, adaptive parameters, and swarm coordination.

auditing, and digital trace coordination.

traffic routing consume real supplied observations and graph/network inputs.

performance statistics are available from importable package APIs.

Key imports

import numpy as np

from geo_infer_ant.algorithms import (
    AntColonyOptimization,
    ParticleSwarmOptimization,
    ArtificialBeeColony,
)
from geo_infer_ant.core import PheromoneSystem, SwarmAgent, AgentPopulation

Examples

Matrix-backed ACO

distance_matrix = np.array([
    [0.0, 1.0, 2.0],
    [1.0, 0.0, 1.0],
    [2.0, 1.0, 0.0],
])
optimizer = AntColonyOptimization(
    number_of_ants=20,
    max_iterations=50,
    variant="ACS",
    random_seed=42,
)
optimizer.initialize_problem(
    nodes=np.arange(3),
    distance_matrix=distance_matrix,
)
result = optimizer.solve()
print(result.best_solution, result.best_fitness)

Agent interfaces

Use uv run --frozen geo-infer catalog ANT to discover public source

APIs, then geo-infer describe before calling a selected target. Scripts use

geo_infer_api.agent_runtime.AgentSession; the optional stdio MCP server is

geo-infer-mcp. See requests, native objects and composition.

The adapter retains this module's dependencies and authorization requirements.

Guidelines

Use explicit bounds and finite numeric objective functions. Seed every

optimization or application run when reproducibility matters, and initialize

ACO with its problem matrices before solving. Treat empty observations or an

absent graph as an input condition and inspect the returned status rather than

assuming an improvement.

Validation

Run the module gate from the repository root:

uv run python GEO-INFER-TEST/run_unified_tests.py --module ANT

For focused development, run the affected tests first:

uv run python -m pytest -c pyproject.toml -W error \
  GEO-INFER-ANT/tests/unit/test_deep_contracts.py

The fresh-process population RSS probe measures 100 real agents with the existing

200 MiB ceiling and 60-second deadline. Its child excludes inherited coverage

autostart and rejects active tracing/profiling; the parent suite remains covered.

Import/allocation timings and delayed stack traces support timeout diagnosis.

All optimizers accept random_seed/seed for reproducible local validation.

State serialization is JSON-compatible, H3 resolutions accept integer or

h3_rN forms, and malformed spatial bounds or matrices fail at the boundary.

Integrations

ANT integrates with GEO-INFER-SPACE when installed and keeps deterministic

local behavior available when optional spatial adapters are absent. Population

agents can share a PheromoneSystem and can receive an injected Active Inference

model from GEO-INFER-ACT.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.