Text

SAILS illustration

When Machines Work Together: Orchestrating Autonomous Systems to Stay Safe

How can autonomous machines collaborate without compromising safety? Researchers at Mälardalen University show how reinforcement learning combined with formal safety contracts can coordinate fleets of machines—ensuring efficiency while preventing unsafe behaviour.

Modern construction sites are gradually becoming testbeds for autonomy. Excavators dig, loaders transfer material, and transport vehicles haul it away—all increasingly guided by software rather than human operators. But when multiple autonomous machines work together, coordination becomes a serious safety challenge. What happens if one machine starts loading before another is ready? What if two vehicles try to access the same resource at the same time?

A recent study from researchers at Mälardalen University explores how artificial intelligence can help autonomous machines collaborate efficiently as well as safely (i.e., ensuring that safety rules are never violated). The work was carried out within the SAILS pre-study (Safety Assurance of Artificial Intelligence Systems) funded by Trusted Smart Systems (TSS), which investigates how AI can be safely integrated into critical industrial systems.

The challenge: autonomy without losing control

In many industrial environments, machines already operate autonomously, but often in isolation. The next step is systems of systems—multiple independent machines cooperating to complete complex tasks.

Consider a construction scenario where a digger excavates soil, a loader transfers it, and a transporter moves it to a dump site. While each machine can act independently, safe operation requires careful coordination: machines must synchronize tasks, avoid collisions, manage shared resources, and ensure that battery levels do not drop dangerously low during operation.

Traditional safety engineering methods struggle in such environments, especially when AI-based decision making is involved. Safety standards typically assume deterministic behaviour, while AI methods often rely on probabilistic learning and adaptation.

The solution: combining formal safety models with learning

The researchers developed a new framework that brings together formal verification methods and machine learning.

The system models each autonomous machine and its interactions using timed automata in the verification tool UPPAAL Stratego. On top of these models, the researchers introduce safety contracts—explicit rules that define what must always hold during operation.

Examples include:

  • A machine must stop working and go for charging if its battery drops below a safe threshold
  • A loader may only begin loading if the transporter is present
  • Only one machine may access a shared resource at a time
  • The entire system must enter a safe shutdown if a violation occurs

Instead of checking safety only after the system is designed, these contracts become active constraints that guide how the system behaves during their execution of tasks.

Learning safe strategies

The next step is to teach the system how to operate efficiently without violating those safety constraints.

Using reinforcement learning, the framework explores different execution strategies—for example deciding when machines should start tasks, when to charge batteries, or how to coordinate shared resources. During simulation, unsafe strategies are automatically rejected by the safety contracts.

Over time, the system learns policies that maximize efficiency while remaining provably safe.

From risky behaviour to safe coordination

The simulations reveal the importance of this safety-aware approach.

Without the learned strategy, violations occurred in roughly 20–30% of simulated runs—for example when machines continued operating with dangerously low battery levels or attempted to access shared resources simultaneously. With the synthesized strategy, however, no safety violations were observed across repeated simulation runs, indicating that the learned policy effectively enforced all safety constraints.

At the same time, the system still completed its mission efficiently, successfully transferring the required material within the simulated construction scenario.

Why this matters

As autonomous systems become more common in industry, ensuring their safety becomes increasingly difficult—especially when AI is involved. The SAILS pre-study addresses this challenge by exploring how AI decision-making can be bounded by formal safety guarantees, rather than replacing them.

The results demonstrate that learning-based coordination can be combined with rigorous safety models, offering a path toward trustworthy autonomous systems in complex industrial environments.

This work also contributes to the broader SAILS initiative, which aims to build knowledge on AI safety standards, regulatory frameworks, and practical assurance methods for AI-enabled systems—a topic that is becoming increasingly important as new regulations such as the EU AI Act take shape.