All workGame of Code 2026

Towards Recovery

2nd place

An addiction-severity screen someone can take in private. It flags risk for a human counsellor, shows what drove each score, and never acts on its own.

My part
Screening flow, emotion sampling, risk model, drug-use map
Team
Dhruv and Friends, four of us
When
June 2026
Built for
Game of Code 2026, Mauritius

The problem

The Addiction Severity Index is a standard first screen for substance misuse, but it needs a trained clinician in the room. That puts two walls in front of the people who need it most: getting an appointment at all, and the stigma of being seen walking in.

Towards Recovery brings an ASI-structured screen to the person, in private, and keeps checking in afterwards. A counsellor still makes every call.

What I did

  • Redesigned the screening around the real ASI: 21 questions across seven domains, a floating camera preview, and an emotion reading for each question.
  • Switched emotion capture from a single snapshot per question to continuous sampling every 500 ms, and weighted it so fear, anger and sadness count and a neutral face doesn't drown them out.
  • Trained the XGBoost risk model, then retrained it on more realistic statistics when the first version was too confident.
  • Built the drug-use hotspot map in Leaflet from published Mauritius figures, plus an English and French toggle across the app.
  • Redesigned the counsellor page so it shows the whole session summary before anyone can refer, and seeded three demo sessions, one per tier, for the judges.
  • Wrote the README, with the sources, the risk formula and what the model can't tell you.

How it works

  1. 01

    Consent, calibration, then 21 questions

    Before the camera turns on, the person sees what will happen and agrees to it. A six-second resting-face calibration follows, then 21 questions across medical, employment, drug use, alcohol, legal, family and social, and psychiatric.

  2. 02

    Compared with their own face

    The webcam is sampled while each question is answered, and readings are compared with that person's resting face, not a generic neutral. A big gap between what someone says and how they look gets flagged for a human to look at.

  3. 03

    Three tiers: monitor, review, refer

    The risk score adds the model's output, the size of any face-to-answer gap, how many domains were flagged and how severe the answers were. Under 40 is monitor, 40 to 70 is review, over 70 is refer.

  4. 04

    Check-ins catch drift

    People in the monitor tier check in over time with mood, sleep, anxiety and recent use. If they drift away from their own baseline on two readings in a row, they move up to review automatically, with the reason written down.

  5. 05

    What the counsellor sees

    The live tier, the flagged domains and, if they want it, a written summary. The summary is the only thing the language model touches.

Design decisions

  • A gap between face and answer is an inconsistency for a person to look at. Never lie detection. Tiredness, medication and nerves all look the same to a camera.
  • The camera is optional. The score still works on answers alone.
  • Honest high-risk answers raise the score even when the face matches them, so the system doesn't only reward catching people out.
  • Nothing is acted on automatically. Every refer goes past a counsellor first.

Results

2nd place at Game of Code 2026, where every team took on substance misuse.

Second prize, Game of Code 2026.

More screens

Built with

  • Next.js
  • FastAPI
  • SQLite
  • DeepFace
  • XGBoost
  • Leaflet
  • Gemini 2.0 Flash, summary only