Scoring in MLflow Jedi is tracked per team in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/elenacarino-max/Pildora4_ext_StarWars/llms.txt
Use this file to discover all available pages before exploring further.
score column of the teams table. Points are added and deducted by database functions in database.py in real time — every successful chamber completion, every hint requested, every mission run recorded, and the final defense submission all modify the score atomically within a single SQLite transaction. The scoreboard can be toggled visible or hidden by the teacher at any moment via the scoreboard_visible flag on the session.
Score events
Every event that changes a team’s score maps to a specific database function. The table below documents each event exactly as implemented indatabase.py:
| Event | Points | Function | Condition |
|---|---|---|---|
| Chamber solved correctly | +20 | complete_chamber() | Once per chamber; idempotent — only fires when team.chamber_index == chamber_index |
| Hint used | −5 | use_hint() | Each hint level; up to 3 hints per challenge |
| Forced advance (5 failures) | −10 | force_advance_chamber() | Once per chamber; applied instead of +20 |
| Mission completed | +30 | save_mission_run() | First time only per mission; UNIQUE(team_id, mission_id) prevents double-award |
| All 3 missions bonus | +15 | save_mission_run() | Awarded once when missions_completed >= 3 and phase == 'missions' |
| Defense submitted | +25 | save_defense() | First submission only; re-sealing the same defense does not re-award |
score = score + N expressions inside the same transaction that updates the team’s state, so a crash mid-function cannot leave the database in a partially scored state.
Maximum score calculation
A team that solves every challenge on the first attempt, uses no hints, and submits a complete defense achieves the following breakdown:| Component | Calculation | Points |
|---|---|---|
| 6 Chambers × 20 pts | complete_chamber() called 6 times | 120 |
| 3 Missions × 30 pts | save_mission_run() called 3 times (first time each) | 90 |
| All-missions bonus | Awarded once when the third mission is saved | 15 |
| Defense | save_defense() called once | 25 |
| Maximum total | 250 |
Phase progression
Each team moves through a linear state machine tracked in thephase column. The transitions are enforced by the database functions — no UI action can skip a phase.
chambers (start)
Initial state.
chamber_index = 0, phase = 'chambers'. The team works through Chambers 1–6 sequentially. complete_chamber() increments chamber_index after each success. force_advance_chamber() does the same with a −10 penalty.missions
Entered automatically when
chamber_index reaches 6. phase is set to 'missions' inside the same UPDATE that writes chamber_index = 6. The team can now attempt the three MLflow missions (Tatooine → Coruscant → Mustafar) in any order.comparator
Entered automatically inside The
save_mission_run() once COUNT(mission_runs WHERE team_id) >= 3. The team can now compare their three runs in the MLflow UI comparator view and choose which to defend.AND phase='missions' guard ensures the +15 bonus fires exactly once.defense
Entered automatically by
assign_holocron(), which is called at the end of save_mission_run(). Once a holocron is assigned, phase is set to 'defense' and the team receives their specific debate scenario.Hint system
Hints are progressive disclosures designed to guide without simply giving away the answer. The three levels for each chamber move from conceptual context to category to partial syntax:| Level | Example (Chamber 1 — experiment) | Cost |
|---|---|---|
| 1 | ”Una campaña agrupa runs relacionadas.” | −5 pts |
| 2 | ”La función pertenece a la categoría Experiment.” | −5 pts |
| 3 | mlflow.set_e_________("Biblioteca_Jedi_Digits") | −5 pts |
use_hint() and the hint_usage table:
- The current hint level is computed by counting existing
hint_usagerows for(team_id, challenge_id)— no separate level column is needed inteams. - Once
level >= 3,use_hint()returns early without inserting or deducting points — hints are capped at 3 per challenge. - The insert uses
INSERT OR IGNOREagainst theUNIQUE(team_id, challenge_id, level)constraint. A race condition or double-click cannot deduct points twice for the same hint level. - The
hints_usedcounter on theteamsrow is incremented alongside the score deduction in the sameUPDATEfor display on the scoreboard.
Forced advance
When a team is stuck and cannot solve a chamber, the teacher (or the automatic 5-failure trigger) can advance them past it: The relevant function isforce_advance_chamber():
- The
if team[0] == chamber_indexguard makes the operation idempotent — calling it twice for the same chamber does not double-penalise. - The teacher can trigger this manually via the dashboard (
unlock_next_chamber()wrapscomplete_chamber()) or it fires automatically onceattempt_count(team_id, challenge_id, valid=False) >= MAX_ATTEMPTS(whereMAX_ATTEMPTS = 5, defined inviews/student.py).
Holocron assignment
After all three missions are complete, each team is assigned a Holocron — a structured debate scenario that defines the analytical lens for their final defense presentation. The assignment logic inassign_holocron() distributes all seven scenario types fairly across teams in a session:
positionis the team’s 1-based join order within the session.(position - 1) % 7cycles through the 7 available holocron types so no two consecutive teams in the same session receive the same scenario.- The teacher can override the assignment using
reassign_holocron(team_id, holocron_id), which validates that the chosenholocron_idexists inHOLOCRONSbefore writing. assign_holocron()is a no-op if the team already has aholocron_id— repeated calls do not reset the assignment.
consejo-desconfiado, recursos-limitados, auditoria-imperial, senado-galactico, lado-oscuro-metrica, rescate-prioritario, and mision-produccion.