AV Part 2 — Reimagining Autonomous Fleet Coordination With Swarm Computing

From Centralized Bottlenecks to Geo-Fenced, Internet-Backed Resilient P2P Cooperation

Freedom Preetham
Autonomous Agents
Published in
10 min readDec 18, 2024

--

Autonomous vehicles (AVs) have pushed localized decision-making to remarkable heights. With onboard compute handling obstacle detection, path planning, and collision avoidance, individual AVs can operate independently in real time. Yet as we scale to AV fleets, a significant problem arises:

  • Vehicles rely on centralized servers to coordinate traffic flow, congestion management, and shared fleet state synchronization.

This reliance introduces high latency, single points of failure, and poor resilience when servers are slow. This also adds a significant cost to central infra that can be pushed downstream.

The core question is:

Why not use the intelligence already embedded in each AV to enable a fully decentralized, peer-to-peer fleet coordination system?

This blog serves as a high-level framework, with individual sections to be expanded in upcoming posts. In Part 1, I introduced assumptions about reimagining reinforcement learning, which will connect to future blogs demonstrating its benefits for swarm computing.

The idea is not to cover the entire AV stack. There are existing playbook written for this already. Instead the blog series focuses on nuances, and innovation around swarm computing.

This blog is part of the Autonomous Vehicle series:

I have spoken to few people in the industry (on the AV side) and I do not believe P2P decentralization is enabled as of today.

Imagine a fleet where every AV operates both as a client (requesting data) and as a server (sharing its state) using internet protocols, constrained only by a centrally-defined geo-fence. Within this geo-fence, vehicles form dynamic clusters, small localized groups based on proximity and traffic relevance, that independently synchronize and optimize their behavior. These clusters adapt to the diverse conditions within the geo-fence, whether managing congestion at intersections, coordinating in high-density zones, or maintaining free-flow traffic, while exchanging minimal state information with adjacent clusters to maintain smooth transitions. Vehicles communicate dynamically, without range restrictions, achieving:

  1. Near-zero latency for critical decisions.
  2. Resilience against server downtimes.
  3. Scalability as fleet size increases.

Here’s a clear breakdown of what happens today and where P2P can transform fleet-level decision-making:

Today’s Decision-Making Architecture

The Proposal: A Geo-Fenced P2P Client-Server Model

I propose shifting fleet coordination to a Peer-to-Peer (P2P) model where:

  • Vehicles communicate over standard internet protocols (e.g., TCP/UDP).
  • Geo-fencing boundaries are defined by a central mapping algorithm and shared globally.
  • Each AV operates as both a client and a server, publishing and requesting state updates directly with peers.

In this setup:

  1. Local autonomy remains intact for immediate tasks (obstacle avoidance, path planning).
  2. Vehicles exchange critical data (e.g., positions, velocities, traffic intent) with peers, solving for global objectives collaboratively.
  3. Resilience is built in: failure of one vehicle or node does not disrupt overall operations.

The Mathematical Foundation of P2P Coordination

This framework relies on three mathematical pillars:

  1. Dynamic Graph Theory to formalize vehicle communication.
  2. Distributed Consensus for synchronizing shared states.
  3. Distributed Optimization for solving global traffic and congestion objectives.

Dynamic Vehicle Communication Graph

At any moment t, the AV fleet forms a communication graph G(t)=(V,E(t)), where:

  • V: The set of all vehicles.
  • E(t): Internet-based logical edges defined by geo-fence proximity, not physical range.

An edge eij(t) exists if two vehicles i and j are both inside the geo-fence and eligible to communicate:

This graph is dynamic, as vehicles continuously enter and exit the geo-fenced area.

Engineering Implementation:

(This will be expanded in a new blog)

  • Each AV uses a lightweight peer discovery protocol to maintain a list of reachable peers.
  • Geo-fence boundaries are cached locally to reduce server queries.

Localized Clustering in the Geo-Fence

Within the global geo-fence, vehicles dynamically form localized clusters based on their proximity, communication quality, and contextual relevance. Each cluster represents a subset of vehicles operating under similar traffic conditions, such as navigating an intersection, managing congestion, or coordinating speeds on a free-flow arterial road.

How Clusters Are Formed:

Proximity-Based Grouping: A vehicle j is added to the neighborhood N(i) of vehicle i if:

where R is a communication range threshold, and d(i,j) is the distance between vehicles.

Dynamic Adaptation: As vehicles move, neighborhoods evolve. Vehicles entering R are added to the cluster, while those leaving are removed.

Traffic Context: Neighborhoods prioritize vehicles traveling in the same direction or those directly influencing the local traffic flow.

Cluster-Specific Objectives:

Clusters operate semi-independently, optimizing for localized objectives such as:

Intersection Management: Vehicles near intersections negotiate priorities using consensus and optimization algorithms to minimize delay:

where Ti_(π) is the delay for vehicle i under priority order π.

Congestion Zones:

In high-density clusters, vehicles synchronize speeds to smooth traffic flow and avoid bottlenecks:

Free-Flow Zones: Vehicles on open roads maintain high-speed coordination, optimizing throughput with minimal synchronization overhead.

Cluster Communication Graph: Each cluster forms a subgraph G_k(t) within the global communication graph G(t) = (V,E(t)), where:

V_k ⊂ V: Vehicles in cluster k.

E_k(t): Logical edges between vehicles in V_k, based on:

Distributed Consensus for State Synchronization

Within each localized cluster, vehicles synchronize their states (e.g., average speed, traffic density) using a distributed consensus algorithm. Each cluster operates independently, ensuring that state updates reflect local conditions. For a vehicle i in cluster k, the update rule is.

Consensus Equation

Each vehicle i updates its state si(t) based on neighbors N(i):

This ensures smooth convergence to a cluster-wide equilibrium, tailored to the specific traffic conditions in that neighborhood.

where:

  • s_i^t​: The current state of vehicle i at time t. (e.g., speed)
  • ϵ: A small step size or learning rate that controls the magnitude of the updates. It ensures smooth convergence.
  • N(i): The set of neighbors of vehicle i (the vehicles directly connected to i).
  • s_j^t — s_i^t​: The difference between the state of vehicle j and the state of vehicle i.
  • w_ij: The weight assigned to the interaction between vehicles i and j. This weight ensures the update remains stable and converges over time:

Intuition Behind the Update Rule:

The term

represents the weighted average difference between the state of vehicle i and its neighbors

  • If s_j^t > s_i^t​, vehicle i will move its state s_i​ closer to s_j.
  • If s_j^t < s_i^t​, vehicle i will still adjust s_i​ closer to s_j.
  • Over time, this repeated averaging across neighbors ensures all vehicles converge to a consensus state.

The small step size ϵ ensures the system doesn’t overshoot or oscillate while converging.

Why It Works:
Under connected graphs and small ϵ, this guarantees:

Engineering Note: Vehicles only exchange delta states to minimize bandwidth.

Distributed Optimization for Fleet Coordination

The P2P model solves for fleet-level traffic optimization without a central server. Each vehicle collaboratively minimizes:

where:

  • x_i: Position of vehicle i.
  • fi(xi): Local cost function (e.g., energy or time delay).
  • c_ij​: Coupling cost encouraging smooth traffic flow.

Optimization Updates

Vehicles use projected gradient descent to collaboratively optimize their positions and states while respecting the geo-fence constraints. Within each cluster, vehicles adapt their positions x_i​ to minimize local cost functions while ensuring smooth transitions at cluster boundaries.

At cluster boundaries, vehicles temporarily belong to both neighboring clusters. During this transition period, the state update equation becomes:

Explanation:

  • ΠΩ: Projects the updated position x_i​ back into the geo-fence boundary Ω, ensuring that vehicles remain within legal operational areas.
  • ∇fi(xit): The gradient of the local cost function f_i​, which represents individual objectives (e.g., energy minimization, time delay).
  • c_ij(x_i^t — x_j^t): The coupling cost for maintaining smooth interactions between neighbors j in clusters k_1 and k_2​.

Localized Context: The above equation reflects the localized nature of P2P clustering:

  • Within a single cluster, vehicles interact only with their immediate neighbors N(i), minimizing computational overhead and focusing on local conditions.
  • At cluster boundaries, vehicles integrate influences from multiple neighborhoods (e.g., transitioning from a high-density congestion zone to a free-flow arterial road), ensuring continuity and stability in their behavior.

By leveraging localized cluster coordination alongside gradient-based optimization, the system achieves seamless transitions between diverse traffic environments while maintaining geo-fenced constraints. This enhances both the scalability and resilience of the AV fleet.

Intersection Priority as a Distributed Negotiation Problem

Instead of a server assigning right-of-way, vehicles negotiate priorities locally within their cluster, adapting to the specific conditions of the intersection. The negotiation process works as follows:

State Sharing:

Each vehicle shares its time-to-arrival and intended trajectory with nearby peers in its cluster.

Priority Assignment:

Vehicles collectively determine the passing order π\piπ that minimizes total delay for all vehicles in the intersection cluster:

where V_k​ represents the set of vehicles in the intersection cluster, and Ti_(π) is the delay for vehicle i under the passing order π.

Dynamic Cluster Boundaries:

Vehicles entering or leaving the intersection adjust their participation in the cluster dynamically. Boundary vehicles share state updates with neighboring clusters to maintain smooth transitions.

By limiting negotiation to localized clusters, the system reduces computational and communication overhead while ensuring real-time responsiveness. This approach allows each intersection to operate independently, preserving scalability even in dense urban environments.

The P2P Architecture

The three core layers in the P2P architecture remain unchanged but can now explicitly reference clustering:

  • Peer Discovery: AVs use geo-fence boundaries and local proximity thresholds to discover and validate peers within their cluster.
  • Consensus Layer: Synchronizes local states (e.g., traffic density, intersection priorities) within clusters while exchanging minimal state updates with neighboring clusters.
  • Optimization Layer: Minimizes cluster-specific objectives (e.g., intersection delay, congestion management) using gradient-based methods.

Usecases That Can Be Pushed Downstream

By leveraging distributed optimization, consensus protocols, real-time graph communication, and localized clustering, a decentralized peer-to-peer (P2P) AV system can address a broader set of challenges beyond traffic flow, congestion management, and fleet state synchronization:

  • Dynamic Road Condition Analysis: Vehicles within clusters share real-time updates on hazards (e.g., potholes, weather, construction zones), propagating critical information to adjacent clusters.
  • Energy-Efficient Routing: Clusters collaboratively optimize routes and energy usage locally, reducing fleet-wide computational load while minimizing fuel or battery consumption.
  • Collision Prediction and Prevention: Vehicles in each cluster share trajectories and velocities to predict and prevent chain collisions dynamically.
  • Ad-Hoc Intersection Management: Localized intersection clusters negotiate right-of-way dynamically, replacing fixed traffic signals and minimizing delays.
  • Dynamic Parking Coordination: Vehicles in parking-demand clusters locate, reserve, and share availability with adjacent clusters for efficient allocation without centralized systems.
  • Localized Load Balancing: Clusters in high-demand zones reposition vehicles locally to alleviate congestion, sharing surplus demand data with neighboring clusters for broader coordination.
  • Hazard and Emergency Response: Clusters near emergency events clear lanes and reroute traffic dynamically, prioritizing critical paths while ensuring system-wide awareness.
  • Cybersecurity Threat Isolation: Vehicles within clusters detect and isolate compromised nodes locally, containing threats before they affect the broader fleet.
  • Ad-Hoc Traffic Signal Replacement: Clusters at intersections establish virtual signals dynamically, based on real-time negotiated priorities, for smoother flow.
  • Real-Time Road Pricing and Tolls: Clusters calculate dynamic tolls based on localized congestion, emissions, and road usage, propagating rates outward as necessary.
  • Decentralized Accident Recovery: Vehicles near accidents collaborate to coordinate detours, share alerts, and restore traffic flow more quickly than centralized systems.
  • Noise and Emission Minimization: Vehicles in clusters synchronize speeds, braking, and acceleration to reduce idling, emissions, and noise pollution collaboratively.
  • Passenger Transfer Optimization: Clusters optimize shared ride transfers locally, reducing travel time and energy consumption across multiple routes.
  • Localized Decentralized Platooning: Vehicles in highway clusters autonomously form high-efficiency formations to reduce aerodynamic drag and improve traffic flow.

This swarm intelligence framework enables AV fleets to self-organize, enhancing resilience, scalability, and operational efficiency while eliminating single points of failure.

The Benefits and Trade-Offs

By leveraging onboard intelligence, peer-to-peer internet protocols, and distributed algorithms, we eliminate centralized bottlenecks while ensuring real-time, fault-tolerant AV fleet coordination. I believe that this is the future of autonomous fleets, a decentralized swarm where vehicles collaborate dynamically, guided only by a geo-fence and mathematical precision.

--

--

Autonomous Agents
Autonomous Agents

Published in Autonomous Agents

Notes of Artificial Intelligence and Machine Learning.

Freedom Preetham
Freedom Preetham

Written by Freedom Preetham

AI Research | Math | Genomics | Quantum Physics

Responses (2)