Learning and progress
The “My path” lessons, points, streak, pauses, quests and badges.
Each algorithm is described with what it reads, its steps, the values it uses (with their place in the code), what it shows and its limits.
My path: points, streak, pauses, quests and badges
My path offers one-minute lessons about sickle cell disease. Each lesson passed earns points and grows a streak of days, and a finished unit opens a chest. The rules are the same in the bot and in the app, and the server grades the answers. A mistake never costs anything.
Where you see it: In the bot: "My points and games", then "My path". In the app: the Journal tab, then "My path". You see your streak, your pauses, your quests of the day, your points and your badges.
What the algorithm reads
- Your answers to the questions of a lesson (self-report)
- The day of each lesson passed (computed from the series or the sorrce summary)
- Your crisis or hospital days (to protect the streak) (computed from the series or the sorrce summary)
- Your daily check-in (for the third quest) (self-report)
The calculation, step by step
The values used
| Name in the code | Value | Role | Where |
|---|---|---|---|
XP_LESSON | 10 | Points for a lesson passed for the first time | src/trevor/conversation/chemin.py:30 |
XP_PERFECT | 5 | Extra points for a first lesson with no mistake | src/trevor/conversation/chemin.py:31 |
XP_CHEST | 20 | Points of the chest of a finished unit | src/trevor/conversation/chemin.py:34 |
XP_QUESTS | 10 | Points for the three quests of the day done | src/trevor/conversation/chemin.py:35 |
XP_REVIEW_RIGHT | 1 | Point for a right answer in review | src/trevor/conversation/chemin.py:32 |
XP_REVIEW_DAY_CAP | 5 | Daily cap of review points | src/trevor/conversation/chemin.py:33 |
QUEST_RIGHT_TARGET | 5 | Right answers targeted by the quest of the day | src/trevor/conversation/chemin.py:36 |
FREEZE_EVERY | 7 | Streak days to earn a pause | src/trevor/conversation/chemin.py:37 |
FREEZE_MAX | 2 | Pauses in reserve at most | src/trevor/conversation/chemin.py:38 |
REVIEW_STEPS | (1, 3, 7) | Days before a missed question is asked again | src/trevor/conversation/chemin.py:39 |
PASS_RATIO | 0.6 | Share of right answers to pass a lesson | src/trevor/conversation/chemin.py:42 |
What is shown
For each person, Trévor tracks the lessons done and the path points (added to "My points" and to the levels). It also tracks the streak, the pauses, the quests of the day and the badges.
A worked example
You pass the first lesson with 2 right answers out of 3: 10 points. You replay it with no mistake: 5 more points. You replay it again: 0 points. The next day you do a lesson: your streak goes to 2. The day after, you are in hospital: the streak holds, with no pause spent.
What this algorithm cannot do
- Points reward the act of learning. They never depend on a health value you declare.
- There is no ranking between people and no reward in money.
- The lessons come from courses and recommendations cited on each card. They are being reviewed by a doctor and do not replace the advice of your care team.
- Age or situation do not yet personalize the path: everyone living with sickle cell disease sees the same units in the same order.
Code : src/trevor/conversation/chemin.py (complete_lesson, settle, series_length, claim_quests, apply_review, earn_badges), src/trevor/conversation/chemin_screens.py (chemin_context, chemin_complete, chemin_state), data/chemin/drepanocytose.json, data/chemin/badges.json
