Skip to content

BAC1 to BAC5 levels

This page presents in detail the five journeys of pedagogical chaos: their theme, their step count, their target duration and their star scale. The catalogs are defined backend-side in the classes PedagogiqueEnigmeBac1 through PedagogiqueEnigmeBac5 (package com.perfshop.chaos), and the default duration is returned by the PedagogiqueEnigme.defaultTimerSeconds(level) method.

Summary table

Level Id Internal name Steps Duration Narrative key product Agent code DYNAMIC answer ⭐ max
BAC+1 bac1 First contact 10 30 min (1800 s) USB-C cable €22 4 decimal digits sum of digits × 10 1
BAC+2 bac2 Decoder 15 45 min (2700 s) CODE Pro adapter €64 4 decimal digits code ÷ sum of digits 2
BAC+3 bac3 Analyst 20 60 min (3600 s) Keyboard €29 + mouse €19 4 uppercase hex chars sum of decimal values of the digits 3
BAC+4 bac4 Architect 25 75 min (4500 s) SSD Lorem NVMe €255 4 uppercase hex chars hex code mod 256 4
BAC+5 bac5 System master 30 90 min (5400 s) DDR4 16 GB kit €79 4 uppercase hex chars XOR of the two bytes 5

Total: 100 enigmas spread across the five levels. Each level ends with a DYNAMIC step whose answer depends on the agent code (details in agent-code.md); all other steps have a static hash pre-computed at init by PedagogiqueEnigme.h().

Pedagogical progression

flowchart LR
    BAC1["🎓 BAC+1<br/>First contact<br/>10 steps · 30 min"]
    BAC2["🎓 BAC+2<br/>Decoder<br/>15 steps · 45 min"]
    BAC3["🎓 BAC+3<br/>Analyst<br/>20 steps · 60 min"]
    BAC4["🎓 BAC+4<br/>Architect<br/>25 steps · 75 min"]
    BAC5["🎓 BAC+5<br/>System master<br/>30 steps · 90 min"]
    BAC1 -->|Pure math<br/>simple commerce| BAC2
    BAC2 -->|Logic<br/>classical ciphers| BAC3
    BAC3 -->|HTTP, Docker<br/>observability| BAC4
    BAC4 -->|Hex, XOR, JWT<br/>algorithmics| BAC5
    BAC5 -->|Crypto, complexity<br/>Hamming, Dijkstra|DONE((✅))

The journeys are independent: the student is not required to complete bac1 to access bac2. The instructor chooses the level to activate for the whole class, or the student can select it themselves via POST /pedagogique/level if the license allows.

BAC+1 — First contact

  • Java class: PedagogiqueEnigmeBac1
  • i18n files: i18n/enigmes/bac1/enigmes_XX.json
  • 10 steps — 30-minute timer
  • Narrative product: a basic USB-C cable at €22 (stock 60)

Target audience: post-high-school students, first-year students in technical programs, discovery audience. The level assumes no computer science background — only pure math and logic: digit sum, arithmetic and geometric sequences, Fibonacci sequence, coordinate grids, commercial arithmetic (price × quantity, total computation with shipping fees). The agent code is a purely numeric 4-digit code, explicitly chosen so the student does not have to handle hexadecimal.

The student walks through the e-commerce funnel end to end: price filter, product page, add to cart, checkout, order confirmation. The final DYNAMIC step is read on the order confirmation page (see agent-code.md).

BAC+2 — Decoder

  • Java class: PedagogiqueEnigmeBac2
  • i18n files: i18n/enigmes/bac2/enigmes_XX.json
  • 15 steps — 45-minute timer
  • Narrative product: a "CODE Pro" USB-C adapter at €64 (ordered in quantity 2)

Target audience: technical programs, first-year bachelor's degree. The level introduces slightly more abstract concepts while staying on pure computation: Caesar cipher, Atbash cipher, anagrams, perfect square sequences, prime numbers, combinatorics (counting arrangements), commercial arithmetic with discounts and VAT, IP length concepts (without assuming protocol knowledge — the context is given in the statement).

The agent code remains numeric with 4 digits. The DYNAMIC answer is an integer division of the code by the sum of its digits — accessible without a calculator with a little care.

BAC+3 — Analyst

  • Java class: PedagogiqueEnigmeBac3
  • i18n files: i18n/enigmes/bac3/enigmes_XX.json
  • 20 steps — 60-minute timer
  • Narrative products: basic USB keyboard €29 + basic optical mouse €19

Target audience: computer science bachelor's, engineering school first year. The level assumes HTTP basics (status codes, verbs, headers), Docker knowledge (images, ports, basic commands), observability fundamentals (Prometheus, logs, latency). The level also introduces hexadecimal reading — the agent code switches from a numeric format to a 4 uppercase hex char format, and the DYNAMIC answer is the decimal sum of the four hex digits (e.g., A3F7 → 10+3+15+7 = 35).

Statements alternate between short theoretical questions and concrete observations in the store (filter by price range, stock lookup, checkout with different shipping modes).

BAC+4 — Architect

  • Java class: PedagogiqueEnigmeBac4
  • i18n files: i18n/enigmes/bac4/enigmes_XX.json
  • 25 steps — 75-minute timer
  • Narrative product: SSD Lorem NVMe 1 TB PCIe 4.0 at €255

Target audience: master's, engineering school at the end of the curriculum. The level deepens hexadecimal and bitwise operations (explicit XOR, base 2/10/16 conversion), introduces Base64 JWT payload decoding, uses SQL-like combinatorial logic (AND/OR clauses, negation), advanced combinatorics (arrangements $A(n,p)$, permutations $P(n,p)$), modular arithmetic, and a shortest path enigma of the Dijkstra type on a small graph.

The commercial steps handle several shipping modes (Standard, Express, Premium) to illustrate cart total computation with variable shipping. The DYNAMIC answer is the hex code converted to decimal modulo 256 — classically a byte masking operation.

BAC+5 — System master

  • Java class: PedagogiqueEnigmeBac5
  • i18n files: i18n/enigmes/bac5/enigmes_XX.json
  • 30 steps — 90-minute timer
  • Narrative product: DDR4 16 GB kit (2×8 GB) at €79 (ordered in quantity 2)

Target audience: end of master's, engineers in continuing education, experienced professionals wanting to verify their foundations. The level covers the whole spectrum:

  • Cryptography: simplified RSA (modular exponentiation on small numbers), Mersenne primes, basic hash functions
  • Advanced algorithmics: Dijkstra on 6+ node graphs, Hamming code (minimum distance), complexity $O(n \log n)$ vs $O(n^2)$
  • Compression: run-length encoding
  • Classical crypto: ROT13, octal, RLE
  • Propositional logic with 4 variables
  • Network: RFC 822 addresses, bit/s ↔ byte/s conversion with transfer time computation
  • Mathematical constants: decimals of π, logarithms

The final DYNAMIC answer is a XOR between the two bytes of the hex code — for example A3F70xA3 ^ 0xF7 = 0x54 = 84. It is the only step that requires reasoning on full bytes rather than just individual digits.

The journey is nominally doable in 90 minutes for a prepared professional; a student at the end of a master's program can considerably exceed this without failing — the star system (see stars.md) deducts one star in case of overrun.

Star scale

The number of stars rewards both the level difficulty and speed:

Level In time Out of time
bac1 1 ⭐ 1 ⭐
bac2 2 ⭐ 1 ⭐
bac3 3 ⭐ 2 ⭐
bac4 4 ⭐ 3 ⭐
bac5 5 ⭐ 4 ⭐

The minimum is 1 star (a bac1 student out of time stays at 1 ⭐ — no star is ever deducted below 1). The exact algorithm is computeStars(level, inTime) in ChaosStudentController — details in stars.md.

Default duration summary

The PedagogiqueEnigme.defaultTimerSeconds(String level) method returns:

case "bac1" -> 1800;   // 30 min
case "bac2" -> 2700;   // 45 min
case "bac3" -> 3600;   // 60 min
case "bac4" -> 4500;   // 75 min
case "bac5" -> 5400;   // 90 min
default     -> 2700;   // fallback 45 min

The instructor can override this duration at activation by passing a timerSeconds parameter in the body of POST /pedagogique/activate: for example {"level":"bac3","timerSeconds":2400} for a bac3 journey shortened to 40 minutes in demo mode.


Next pages: ← Concept · Enigma system → · Dynamic agent code →