Skip to content
Samuele95 edited this page Jan 31, 2026 · 1 revision

FAQ

General

What is aggregate computing?

Aggregate computing is a programming paradigm where you write a single program that runs on every device in a network simultaneously. Instead of thinking about individual device behaviour and message passing, you reason about fields — spatial data structures that assign a value to every device.

What is a computational field?

A function phi: D x T -> V that maps every device d at every time step t to a value v. For example, a gradient field maps every device to its distance from a source.

Why "self-stabilising"?

All building blocks converge to the correct output from any initial state, within a bounded number of rounds. This means the system recovers automatically from failures, device additions/removals, and sensor changes.

Simulator

Why do nodes appear to jitter/move?

If you experience visual jitter, it may be caused by Plotly re-fitting axis ranges. The simulator uses uirevision="stable" and fixed axis ranges to prevent this. Make sure you're using the latest version.

Can I add/remove devices during simulation?

Yes. Use the "Add Random Device" and "Remove Random Device" buttons. The network topology and neighbour lists update automatically, and all fields re-stabilise.

What does the convergence chart show?

The convergence chart plots the maximum absolute change across all devices between consecutive rounds. When this value reaches zero, the field has stabilised.

Can I use a custom network topology?

Currently the simulator supports grid and random topologies via the UI. Programmatically, you can create any topology using the Network class and add_device() method.

Technical

What Python version is required?

Python 3.10 or later.

Can I run this without the web interface?

Yes. The simulation engine works independently:

from computational_fields.simulation.network import Network
from computational_fields.simulation.engine import SimulationEngine
from computational_fields.blocks.gradient import gradient

net = Network.grid(8, 8, comm_range=1.5,
    sensors_fn=lambda did, r, c: {"is_source": did == 0})
engine = SimulationEngine(net, lambda ctx: gradient(ctx, ctx.sense("is_source")))
results = engine.run(20)
print(results[-1])  # final round results

How is neighbour communication implemented?

Through the export mechanism. When a device calls nbr(ctx, value), its value is stored in the device's exports dict, keyed by the call path. On the next round, neighbours read these exports to get the values produced at the same call path.

What is call-path alignment?

Each call to rep, nbr, or share is identified by its position in the program's call stack. This ensures that nbr returns values from the same primitive invocation on neighbouring devices, even when the same function is called multiple times within one round.