Trolley Problem Simulator
The Trolley Problem Simulator exists because philosophy is more interesting when you can't think your way around it. Twelve moral dilemmas, drawn from real philosophical literature, each one designed to put your stated values in direct conflict with your gut instinct. No right answers. Only yours.

The Build
The technically interesting part isn't the dilemmas, it's the data collected around them. Every session records audioContext-precision decision times per dilemma, confidence ratings per choice, and the accumulated philosophical alignment across all twelve responses. The results page then does five things simultaneously: grades your dominant philosophy, shows your hesitation pattern as a sorted bar chart, maps your choices against what Bentham, Kant, Singer, Aquinas, and Aristotle would have said, plots your rush/drag tendency on a feel meter, and compares your responses to aggregate community data, all derived from the same 12 choices. The other hard problem was the confirmation step. A quiz that lets you press A and move on teaches nothing. Adding a mandatory confirmation pause (like "Is this your final answer?" with Y/N keyboard shortcuts) forces a moment of genuine reflection before the choice locks. That one friction point is the difference between a survey and a simulator.
Built using Next.js, TypeScript, Tailwind CSS, Web Audio API, Recharts, Framer Motion
Key Decisions & Outcomes
- Decision timing tracked via audioContext.currentTime. The hesitation analysis on the results page is built from real per-dilemma response times, not estimates, revealing which scenarios genuinely conflicted each user
- Post-choice reflection surfaces the philosophical framework of the chosen option immediately after confirmation. Users see "Deontological choice" before moving on, connecting the decision to the theory without front-loading the answer
- What Would the Philosophers Say? section on results personalises each dilemma by showing both the utilitarian and deontological view with the user's chosen path highlighted, sourced from Bentham, Mill, Singer, Kant, Aquinas, and Aristotle
- Community comparison built on anonymous aggregate data, where per-dilemma percentage bars show how the user's choices align with everyone else who has taken it, making each result feel like a data point in a larger conversation
- Built a companion philosophy explainer covering Utilitarianism, Deontology, and Virtue Ethics with per-framework "Trolley Answer," key thinker cards (Bentham through MacIntyre), and a real-world connections section, with cited sources including the MIT Moral Machine study and Philippa Foot's original 1967 paper
If you're curious, feel free to explore: