💡 Inspiration Every app I use quietly experiments on me. Recommendation feeds, A/B tests, and engagement models learn what keeps me scrolling, clicking, and coming back.

So I asked: What if I flipped the objective function? What if an app learned what frustrates a user instead of what makes them comfortable?

That's how I built Misery Engine. 🎯 What it does Misery Engine is a meeting-booking app designed to deliver the worst possible user experience.

While users try to book a meeting, it tracks their interactions, including click speed, hesitation, misclicks, rage clicks, and backtracking.

It uses eight deliberate bad-UX tactics:

  1. Drifting Button: Confirm dodges your cursor.
  2. Label Swap: Yes and No switch places.
  3. Confirmation Spiral: Endless confirmation prompts.
  4. Liar Loader: Progress jumps backward.
  5. Vague Error: Unhelpful error messages.
  6. Shrinking Text: Text gets smaller while reading.
  7. Amnesia Form: Your name disappears.
  8. Fake Disabled: The wrong button appears functional. A machine-learning model learns which tactics frustrate each user most and adapts accordingly.

Users always complete their booking. Afterwards, the Frustration Autopsy reveals their misery score, behaviour profile, most effective tactics, and the UX principles violated.

Finally, the Good Version demonstrates how the same booking experience should actually work. 🛠️ How I built it Tech stack: HTML, CSS, vanilla JavaScript (ES modules), Vitest, jsdom, and Vercel.

The learning engine uses Multi-Armed Bandits with Thompson Sampling. Each UX tactic is treated as an arm with a Beta distribution. The model observes user reactions, calculates a frustration score, and updates its preferences to select more effective tactics.

The architecture consists of:

  • Behaviour tracking
  • Frustration scoring
  • Thompson Sampling engine
  • Eight independent UX tactics
  • Real-time debugging panel Privacy: All behavioural data stays in browser memory. Nothing is stored or transmitted.

🧗 Challenges I ran into

  • Annoying, but never broken: Every tactic has limits. Users can always complete their booking using a mouse, keyboard, or touch.
  • Measuring frustration: Distinguishing genuine frustration from normal behaviour required combining rage clicks, hesitation, backtracking, misclicks, and time.
  • Learning in a short session: Thompson Sampling, continuous rewards, and controlled exploration helped the model adapt within a single session.

🏆 Accomplishments that I'm proud of

  • Implemented a working ML model that adapts to individual users.
  • Demonstrated eight deliberately broken UX principles.
  • Built a complete Frustration Autopsy with personalized behavioural insights.
  • Kept the experience privacy-friendly, with no external data transmission.
  • Achieved 94 passing tests with zero runtime dependencies.
  • Created a Good Version that turns the experiment into a practical UX lesson.

📚 What I learned

  • Breaking good UX requires understanding the principles behind it.
  • Small design decisions can significantly affect user trust and behaviour.
  • Machine learning can optimize almost any objective, even frustration.
  • Building this project helped me understand how Thompson Sampling can learn from user feedback within a limited number of interactions.

🚀 What's next for Misery Engine

  • Add more deliberately frustrating UX tactics.
  • Build an opt-in anonymous Misery Leaderboard.
  • Introduce a teaching mode for UX students.
  • Explore contextual bandits for smarter tactic selection.
  • Open-source the tactic library.

Built With

Share this project:

Updates

Submission history