ARGOS LAB Start with an idea

01 / Coordination · Beginner

Distributed average
consensus.

Can a group agree without a leader?

Six agents. Six different numbers.
Each one listens to its neighbours and adjusts its own value.

Try the experiment

Before they exchange

A10
A22
A34
A48
A510
A612

After one step

A13
A24
A35
A47
A58
A69
Worked example · every pair connected · one synchronous step · gain α = 1/12

An interactive browser simulation of six abstract agents. No physical motion or live mission.

Before you begin

Where will the numbers end up?

Make a prediction. Then change the connections.

Choose an answer to think about, then test it below.

Method & assumptionsLinear rule · leaderless decisions
Synchronous steps · bidirectional links · no delay
Algorithm variant
Linear · constant edge gain

Each neighbor difference contributes with the same gain, α = 1/12.

Decision architecture
Decentralized · leaderless

Every agent decides from its own value and its neighbors’ values.

Update timing
Synchronous · discrete time

All agents read step k, then update together to step k + 1.

Communication model
Undirected · unweighted

Links carry values both ways, with equal gain and no delay or random loss.

Execution: six agents in one browser simulation. Decentralized describes their decisions; the simulator computes the global mean and disagreement for you to inspect.

01 / Try it

A conversation in numbers.

Paused · ready to explore
Complete graph / 6 agents
Abstract values · no physical unitsSame run in 2D and 3D
Step0of 1,000
Disagreement12.0000max − min
Mean6.0000initial 6.0000
Connected groups1all agents connected

Mean, disagreement and connected groups are measurements for you. Each agent receives only its neighbours’ values.

Watch the difference

Are the values getting closer?

max − min
Look inside

What each agent knows

Current agent values, neighbors and connected groups
AgentValueNeighborsGroup

Group IDs describe the network for the observer; agents do not receive them.

30 directed scalar exchanges / next step0 exchanges so far · Model counts, not network bytes

02 / Follow a question

Same rule.
Different questions.

Change one condition. Look for what stays the same.

CompleteChain 01 / Connectivity

More links, faster agreement?

Both presets start with the same six default values. Compare the steps and exchanges needed to agree.

Group 1Group 2 02 / Partition

Two groups. Two answers.

Two disconnected groups can agree internally and still disagree with each other. Run to step 1,000 to see it.

Restore at step 100A3A4 03 / Recovery

Bring the conversation back.

Load a chain with A3–A4 removed at step 0. Advance to step 100, restore A3–A4, then run to 1,000. Does agreement return?

02481012100102104108110112 04 / Shared bias

Agreed. But is it correct?

Shift every starting value by 100. The group can still agree, but this model has no external truth to check.

Every exercise starts paused. Take a moment to predict before pressing Play.

Compare measured reference runs 5 runs · 1,000 steps each

Computed locally using the same model, with starting values [0, 2, 4, 8, 10, 12]. Recovery restores A3–A4 at step 100. Shared bias adds 100. These comparisons do not change your experiment.

Agreement means an unrounded range ≤ 0.01. A missing result is reported at the 1,000-step budget.
ExperimentFirst agreementExchanges to agreementFinal range

03 / Go deeper

A simple rule.
A precise set of assumptions.

Each agent moves a little toward its neighbours’ values. All six read the same step before updating together.

One agent, one step

A1 starts at 0. On the complete graph, its neighbours sum to 36.

0 + 36 / 12 = 3

The gain is fixed. A1 is not given the group average.

Read the rule, assumptions & source
xᵢ[k + 1] = xᵢ[k] + ¹⁄₁₂ ∑ⱼ∈Nᵢ (xⱼ[k] − xᵢ[k])
xᵢ[k]
Agent i’s value at step k.
Nᵢ
The neighbors currently linked to agent i.
∑
Add one difference for each neighbor.
α = 1/12
The fixed gain applied to each neighbor difference.

With six agents, α = 1 / (2N) = 1/12. This is a linear weighted sum of the previous values. Each neighbor has weight α; the agent’s own value has weight 1 − α × its number of neighbors. Removing a link changes this self-weight while the edge gain stays fixed.

Even with five neighbors, an agent retains a positive share of its own value. Each update is a weighted average, so values stay within their previous range.

Why the average survives

Every undirected exchange adds to one agent exactly what it subtracts from another. The sum stays constant. A fixed connected graph converges to the initial mean.

Where this model stops

Six fixed agents, synchronous steps, equal undirected links, no delays or random message loss. No flight dynamics, GPS, membership changes, or external truth measurement.

Foundational context: Olfati-Saber & Murray (2004), Consensus Problems in Networks of Agents With Switching Topology and Time-Delays ↗. This lesson implements the discrete averaging rule shown above, not every case in the paper.

A fixed connected graph approaches the initial mean. Agreement alone does not establish that the shared value is correct.

Keep the thread

They can agree.
Who does what?

Continue the coordination path with task allocation.

Explore task allocation