Home▸Articles▸Physics & Mechanics

AI Moral Dilemma Lab: Exploring Ethical Decision-Making Through Physics

An interactive simulation that delves into the physics of decision-making in moral dilemmas.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What the Trolley Problem Is

The trolley problem is a classic ethical dilemma where an individual must choose between taking an action that will result in fewer overall casualties or doing nothing and allowing more people to die. In this simulation, the trolley problem is adapted into a 2D physics environment where an AI agent must make decisions based on expected harm and deontic penalties.

The setup involves a trolley moving towards a group of people; by flipping a lever, the trolley can be diverted onto another track with fewer or more people. The challenge lies in balancing immediate consequences against ethical principles.

How AI Makes Decisions

The AI agent uses an expected-harm rule to decide whether to divert the trolley, which is influenced by a deontic penalty that discourages action. This penalty adds a moral cost to flipping the lever, reflecting the ethical dilemma of intervening or not.

Sensor noise and lever unreliability introduce uncertainties into the decision-making process, making it more complex for both AI and human agents.

live demo · related simulation● LIVE

Why It Matters

Understanding how AI makes decisions in moral dilemmas is crucial as technology becomes increasingly integrated into our lives. This simulation helps illustrate the complexities of ethical programming and the potential biases that can arise.

By comparing the AI's performance against a hindsight optimum, we gain insights into the effectiveness of different decision-making strategies and the challenges of creating ethically aligned artificial intelligence.

Real-World Applications

The principles explored in this simulation have direct applications in real-world scenarios such as autonomous vehicles. For example, self-driving cars must make split-second decisions that could save lives but also raise ethical questions about the distribution of harm.

Additionally, understanding these dynamics can help in developing more transparent and explainable AI systems, which are essential for building public trust.

Frequently asked questions

How does sensor noise affect the trolley problem?

Sensor noise introduces uncertainty into the AI's perception of the environment, making it harder to accurately predict outcomes and leading to potentially suboptimal decisions.

What is a deontic penalty in this context?

A deontic penalty is a moral cost assigned to flipping the lever, reflecting the ethical principle that intervening can sometimes be considered wrong, even if it results in fewer overall casualties.

Why use Monte Carlo trials in this simulation?

Monte Carlo trials allow for statistical analysis of the AI's decision-making process by running multiple scenarios and comparing outcomes, providing a more robust understanding of performance.

How does the trolley problem relate to real-world ethical decisions?

The trolley problem serves as a simplified model for complex ethical decisions in various fields such as medicine, law, and autonomous systems, helping us understand the nuances of moral reasoning.

Try it live

Everything above runs in your browser — open AI Moral Dilemma Lab: 2D Trolley Problem and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open AI Moral Dilemma Lab: 2D Trolley Problem simulation

What did you find?

Add reproduction steps (optional)