▶ SECURE CHANNEL ESTABLISHED · CLEARANCE LEVEL: PUBLIC

// PROJECT

OBSIDIAN

BLACK BOX CHALLENGE — v1.1.0

SYS > You have gained access to an unknown computational system.

SYS > It accepts numeric inputs. It returns numeric outputs.

SYS > Five black boxes. Five hidden functions. One mission: reverse-engineer them all.

SYS > WARNING: Every query is logged. Fewer probes = higher score.

SYS > Step 1: Probe the box. Step 2: Verify your formula (JS). Step 3: Submit C++ code to lock in your score.

01

Challenge Levels

L1
Linear Logic

A deterministic single-variable transformation. Clean, predictable, algebraic. Two well-chosen inputs are all you need.

Algebra
L2
Bitwise Gate

Input is treated as a byte. A bitwise mask is applied. Systematic sweeps from 0–255 will reveal the pattern.

Bit Manipulation
L3
ALU Engine

Shift registers, offset logic, and 8-bit saturation. Think low-level arithmetic unit with wrap-around behaviour.

Shift / Wrap
L4
State Machine

Output depends on prior inputs. The box has memory. Even/odd parity changes its behaviour. Reset between experiments.

Stateful · FSM
L5
DSP Filter

Stochastic output with additive noise. A hidden FIR kernel blends present and past samples. Average many runs.

Signal Processing
02

Probe Console — Query the Black Box

PROBE MODE · Send numeric inputs, observe outputs, deduce the function
// PROBE CONSOLE READY
// Send inputs here to observe how the black box behaves.
// Once you know the function, use Sections 03 and 04 to verify & submit.
03

Formula Submission — Verify Your Answer (JS)

SUBMISSION MODE · Enter your guessed formula and verify it live
// HOW TO WRITE YOUR FORMULA Use x as the input variable. Write a standard math expression (JavaScript syntax).
L1: 7 * x + 12  ·  L2: (x ^ 0x5A) & 0xFF  ·  L3: ((x << 1) + 5) & 0xFF
L4 (even input): Math.floor(x / 2)  ·  L4 (odd input): the verifier handles state automatically.
L5: 0.5 * x + 0.5 * prev — use prev for x[n-1]. Noise tolerance is built in.
The system runs 10 live API calls and compares your formula's output to the real result.
// SUBMISSION CONSOLE READY
// Type your formula above using x as the variable.
// Hit VERIFY — the system runs 10 live tests and gives you a PASS or FAIL.
04

C++ Code Submission — Lock In Your Score

C++ COMPILER · Submit code · Graded server-side · Points awarded on PASS
// C++ SUBMISSION CONTRACT Your program reads 10 numbers from stdin (one per line) and prints 10 results to stdout (one per line).
For stateful levels (L4, L5), your program must manage state internally across the 10 reads.
Level 5 uses ±0.15 noise tolerance. All other levels require exact integer output.
Compiled with: g++ -O2 -std=c++17. Timeout: 10s runtime, 20s compile.
Score formula: BASE_POINTS − 10 × probe_count. Only the first successful submit awards points.

// EXAMPLE PROGRAMS
L1: #include<iostream>
using namespace std;
int main(){double x; while(cin>>x) cout<<7*x+12<<"\n";}

L4: your program must remember state (even inputs update it, odd inputs use it).
L5: track x_prev across reads; output 0.5*x + 0.5*x_prev per line.
// C++ SUBMISSION TERMINAL
// Paste your C++ solution above and hit COMPILE & SUBMIT.
// Server will compile, run 10 test cases, and score your submission.
05

Live Leaderboard

Refreshing every 15s
// FETCHING SCOREBOARD…
# Team L1 L2 L3 L4 L5 Score Probes
// FETCHING DATA…
06

API Reference

MethodEndpointAuthBodyDescription
GET/Health check
POST/level/1X-API-Key{"input": N}Level 1 — Linear
POST/level/2X-API-Key{"input": N}Level 2 — Bitwise
POST/level/3X-API-Key{"input": N}Level 3 — ALU
POST/level/4X-API-Key{"input": N}Level 4 — State Machine
POST/level/4/resetX-API-KeyReset L4 state
POST/level/5X-API-Key{"input": N}Level 5 — DSP + Noise
POST/level/5/resetX-API-KeyReset L5 delay line
POST /level/{n}/submit-cpp X-API-Key {"code": "..."} C++ submission — compiled & graded server-side
GET/leaderboardRaw probe attempt counts
GET/scoreboardFull scoreboard with C++ solve status & scores
07

Example cURL

$ curl -X POST https://YOUR-API-URL/level/1 \

   -H "Content-Type: application/json" \

   -H "X-API-Key: OBSIDIAN-TEAM-ALPHA" \

   -d '{"input": 10}'


RESPONSE > {"level":1,"input":10,"output":82,"attempts":1,"team":"Team Alpha"}


$ curl -X POST https://YOUR-API-URL/level/1/submit-cpp \

   -H "Content-Type: application/json" \

   -H "X-API-Key: OBSIDIAN-TEAM-ALPHA" \

   -d '{"code": "#include<iostream>\nusing namespace std;\nint main(){double x; while(cin>>x) cout<<7*x+12<<\"\\n\";}"}'

08

Scoring Rules

500
Points · L1
700
Points · L2
900
Points · L3
1200
Points · L4
1500
Points · L5

RULES > Points are ONLY awarded when your C++ submission passes — Formula verification is practice.

RULES > Score = BASE_POINTS[level] − 10 × probe_attempts_on_that_level (min 0).

RULES > −10 pts deducted per API probe call made to that level before the C++ solve.

RULES > Only the FIRST successful C++ submission for a level earns points. Re-submits are free.

RULES > Ties broken by earliest correct C++ submission timestamp.

RULES > Attempt logs are final. No appeals. The CSV is law.