Step 339. The Highest-Level Contest — A Domestic Rematch or an International Final: Skill Gaps Are Small; Operations Decide the Match
Level 4 — Professional | Difficulty ★★★★★ | Estimated time: 2+ days (preparation cycle + completing the competition + results recording)
Prerequisites: the domestic-competition cycle of Steps 324–326, Step 328’s international-competition operations, Step 338’s intensive weakness training completed. The team’s operations rules and shift rules must be finalized in documents.
- What you need: one target competition (a domestic-major rematch or an international final), the finalized team operations documents (shift schedule, swap rules, stuckness tree), Step 338’s weakness-training results table, and a team channel. The endgame-strategy script is a measured tool you run with your competition’s situation; every competition scene and ranking is a screen example.
- Caution: competitions at this level carry large variables. Today’s completion criterion is not rank — it’s being able to answer yes to "did we do our best preparation and execution?"
- ⚠️ All exercises in this chapter are for your own lab and legal platforms only. Applying them to unauthorized systems is a crime. Read and follow the competition rules (team size, no external collaboration, permitted tool scope) before the start.
Having finished the weakness-remediation training, you now stand on the final chase line toward the goal. A domestic-championship rematch or a bid for an international final — at this stage, the skill difference between participating teams is already small. Every team is prepared.
So the match is decided elsewhere. Day-of operations, the speed of the decision to abandon a stuck problem, the management of the last three hours, and a mental game that doesn’t collapse. This is a competition where you trust and execute everything you’ve built so far — skill, teamwork, operations rules, mental management. Today you organize the procedures that best support that execution.
1. Learning Objectives
By the end of this chapter, you will be able to:
- Explain the structure in which "non-skill variables" decide the match at highest-level competitions
- Place the preparation cycle (intensive training → operations check → condition management) against the competition schedule
- Use the endgame-strategy calculator to make the "verification mode vs new challenge" judgment numerically
- Enforce the decision to abandon a stuck problem — with its records — as a team rule
- Complete the results record and the team retrospective regardless of the outcome
2. Background Knowledge — Today’s Tools and Concepts
Today’s Tools at a Glance
| Category | Details |
|---|---|
| Language/environment | Python 3 (endgame-strategy calculation), team channel, the competition platform, finalized operations documents |
| Today’s command | python step339_endgame.py — per-problem commit/abandon judgments for the endgame |
| Concepts needed | The preparation cycle, the economics of decision, endgame management, separating outcome from execution |
| Today’s deliverable | A competition prep calendar + an endgame plan + a competition log + a results record & team retrospective |
2-1. What Decides the Match at This Level — Non-Skill Variables
Look at the scoreboard of a top-tier competition: the gap from 1st to 5th is one or two problems. That means problem-solving skill has converged — and therefore what separates the ranks is not skill but the efficiency of the process by which skill converts into points.
There are four non-skill variables. ① Problem assignment — who grabbed which problem first. ② Stagnation management — how quickly you abandoned a stuck problem and moved. ③ Endgame operations — did you spend the last three hours on verification or on a reckless challenge. ④ Condition — the state of sleep, meals, and focus. All four can be prepared before the competition — and that is this entire chapter.
2-2. The Preparation Cycle — Lay It Out by Counting Back from the Competition
Once the target competition is fixed, divide the remaining period into three blocks. Exactly this cycle.
| Block | Period (example) | What you do |
|---|---|---|
| Intensive training | 4–2 weeks before | Step 338-style weakness remediation — repeating top-tier problem types |
| Operations check | 2–1 weeks before | Rehearsal of the shift schedule, swap rules, stuckness tree — one mock time attack |
| Condition management | 1 week–day of | Stop new learning, fix the sleep rhythm, final check of equipment & environment |
The last block’s "stop new learning" is surprisingly hard. The closer the competition, the bigger the temptation of "if I just study this one more thing" — but new learning in this period blurs skilled movements like last-minute cramming before an exam. A top-tier competition’s skill is not made on the day — it is merely revealed on the day.
2-3. The Economics of Decision — Abandoning Creates Points
Here’s this chapter’s core sentence — "in top-tier fights, the decision to quickly abandon a stuck problem creates points." Let’s compute why this is economics.
The cost of spending one more hour on a stalled problem is not that hour — it’s the expected points that hour could have earned on other problems. The remaining 20% of a problem at 80% progress and the first 50% of a fresh problem at 0% differ in difficulty — the later 20% is far more expensive than the earlier 50%. Which is why "I’ve almost got it, just a bit more" is the most expensive illusion at a top-tier competition.
Note, though — abandoning is not deleting. Per the rule learned in Step 328, when you abandon, you save the entire attempt history. Only abandonment without records is a loss.
2-4. Endgame Management — Design the Last Three Hours in Advance
A competition’s last three hours are the stretch where fatigue peaks and judgment bottoms out. Leave this stretch’s strategy to the day’s tired brain and it collapses — so you decide it in advance, before the competition.
The endgame’s basic structure has two branches. ① Verification mode — re-confirm that every solved problem’s flag was submitted and accepted, and concentrate remaining force on a single high-progress problem. ② New-challenge mode — when your score sits far outside the ranks and conservative operations can’t reverse it, a gambling engagement on a high-point problem. Which of the two is correct is decided by the situation, and 3-2’s calculator helps that judgment.
And agree in advance on one attitude toward the outcome — the separation of outcome from execution. Competitions at this level carry large variables, so the best execution does not guarantee the best outcome. If you can answer yes to "did we do our best preparation and execution," that result is merely the starting point of the next challenge. Without this agreement, the post-competition team shakes in front of the result.
3. Follow Along
3-1. Fixing the Competition and Placing the Preparation Cycle
Fix the target competition and build the prep calendar by counting back from the event date.
Prep-calendar example (screen example — relative to competition day D):
D-28 ~ D-14 Intensive training: 1 top-tier weak-field problem a day + review
D-14 ~ D-7 Operations check: one 8-hour mock time attack — live check of shift schedule & swap rules
D-7 ~ D-1 Condition management: stop new learning, fix wake/sleep times to the competition's hours
D-1 Environment check: equipment, network, platform accounts, emergency contacts; early to bed
The operations-check block’s mock time attack is not technical training — it’s a rehearsal of the rules. It’s the occasion to confirm whether shift handoffs actually happen per the documents and whether the stuckness tree works in moments of panic. A rule that breaks here breaks at the competition too — fix it now.
3-2. The Endgame-Strategy Calculator — Judgment in Numbers
A tool so you don’t decide "do I keep holding this problem or drop it" by feel in the endgame. Save as step339_endgame.py.
# step339_endgame.py — competition endgame (last 3 hours) strategy calculator
# Replace the inputs with your own competition situation
from dataclasses import dataclass
@dataclass
class Problem:
name: str
progress: int # 0~100, progress estimate
stuck_hours: float # hours stalled
remaining_flag_steps: int # estimated steps left to the flag
TEAM_SCORE = 1850
NEXT_RANK_SCORE = 2100 # the team directly above us
HOURS_LEFT = 3.0
PROBLEMS = [
Problem("web-cabinet", 80, 0.5, 1),
Problem("pwn-kernel_1", 45, 2.0, 3),
Problem("rev-vm", 20, 1.5, 4),
]
POINT_EST = {"web-cabinet": 400, "pwn-kernel_1": 500, "rev-vm": 350}
print(f"=== Endgame Strategy Calculation ({HOURS_LEFT} hours left) ===")
print(f"Current {TEAM_SCORE} pts / team directly above {NEXT_RANK_SCORE} pts (gap {NEXT_RANK_SCORE-TEAM_SCORE} pts)n")
for p in PROBLEMS:
# estimate expected points from progress and stall time
momentum = max(0.0, p.progress / 100 - p.stuck_hours * 0.15)
feasible = p.remaining_flag_steps <= HOURS_LEFT and momentum > 0.3
verdict = "commit" if feasible else "abandon"
print(f"{p.name:<14} progress {p.progress:>3}% stalled {p.stuck_hours:>4.1f}h "
f"steps left {p.remaining_flag_steps} est {POINT_EST[p.name]} pts -> {verdict}")
print("n=== Endgame Rules (this chapter's defaults) ===")
print("1. A problem stalled 30 minutes is recorded and abandoned immediately — no recordless abandoning")
print("2. The final hour: no new engagements — re-verify flags of solved problems")
print("3. 15 minutes before the end: everyone makes a final save of submission logs & screenshots")
Here’s the measured output from running it:
=== Endgame Strategy Calculation (3.0 hours left) ===
Current 1850 pts / team directly above 2100 pts (gap 250 pts)
web-cabinet progress 80% stalled 0.5h steps left 1 est 400 pts -> commit
pwn-kernel_1 progress 45% stalled 2.0h steps left 3 est 500 pts -> abandon
rev-vm progress 20% stalled 1.5h steps left 4 est 350 pts -> abandon
=== Endgame Rules (this chapter's defaults) ===
1. A problem stalled 30 minutes is recorded and abandoned immediately — no recordless abandoning
2. The final hour: no new engagements — re-verify flags of solved problems
3. 15 minutes before the end: everyone makes a final save of submission logs & screenshots
How to read it: look at the two axes of the verdict logic. ① Do the remaining steps fit inside the remaining time — rev-vm has 4 steps left, which doesn’t fit in 3 hours, so it’s rejected. ② Momentum — progress minus the stall-time penalty. pwn-kernel_1 is at 45% progress, but 2 hours of stalling cut its momentum and got it rejected. The point is that "because it’s high-point" doesn’t enter the judgment — points only mean something when they’re obtainable. The calculator doesn’t replace judgment; it’s a restraint device that keeps the tired endgame brain from clutching at problems with "but you never know."
3-3. The Day Of — Executing the Fixed Plan
The skeleton of competition-day operations is exactly what Steps 326 and 328 drilled. One thing differs — at this level, not modifying the plan is the plan.
Target-competition progress log (screen example):
[00:00] Start. Enumerate all problems — 18 problems. Kickoff meeting 20 min, assignments fixed
[01:40] 2 warmup problems harvested (+300). Same pace as the qualifier average — per plan
[04:00] Engage web-cabinet. Auth bypass at the 1-hour mark — progress good
[06:30] pwn-kernel_1 hits the 30-minute stall — per the rule, record and swap
[09:00] Mid-competition meeting — 3 solves, within expected trajectory. Reconfirm afternoon assignments
[15:00] web-cabinet solved (+400). Scoreboard 4th — 250 pts behind 3rd
[21:00] Enter the endgame — calculator verdict: commit to the remaining web problem, abandon pwn/rev
[23:00] Verification mode — re-confirm all 6 submitted flags, save logs
[24:00] End. Final: 4th place, 6 solves
How to read it: the 06:30 swap should be visible — the scene where the 30-minute stall mark triggered an emotionless enforcement of the rule. And the 21:00 verdict made by the pre-agreement and the calculator. The fewer "traces of agonizing" in this log, the better-operated the competition. All the agonizing should have been done before the competition.
3-4. Abandoning a Stuck Problem — With Its Records
The actual procedure for abandoning. The goal is to leave emotion no room to intervene.
Abandonment enforcement checklist (screen example):
[ ] Confirm the 30-minute stall mark — by the timer, not by feel
[ ] Save the entire attempt history: command logs, scripts, one line on the stuck point, one line on the next hypothesis
[ ] Declare in the team channel: "[abandoning] pwn-kernel_1 — records done, next hypothesis: bypass via canary leak"
[ ] Engage the next problem — the next entry on the assignment table
Why declare in the channel — abandoning must be public so the whole team shares "this problem is not currently open," and when you retry after the competition, the documents show who got how far. Quietly letting go is not abandoning — it’s neglect.
3-5. After the End — Results Record and Team Retrospective
Right after the end, before looking at the rank, complete the records. Then hold the team retrospective regardless of the outcome.
Results-record template (screen example):
- Final rank / points / solve count:
- The gap to the team directly above, and the identity of that problem:
- Operations self-evaluation: shift-schedule adherence rate, swap-rule enforcement count, endgame-plan adherence
- Condition self-evaluation: sleep-plan adherence, stretches where focus collapsed
- One thing to take to the next competition (just one):
The last item matters — a retrospective that lists ten improvements changes nothing. A retrospective at this level is the occasion for choosing "the single one thing to change at the next competition." And separate from the retrospective, hold the team dinner — having come this far together is itself an achievement. A team that skips that occasion regardless of the outcome has no next season.
4. Missions & Exercises
Mission — Completing the Target Competition and Finishing the Records
- Fix the target competition (domestic-major rematch or international final) and write the prep calendar (3-1).
- In the operations-check block, run one 8-hour mock time attack to rehearse the shift schedule, swap rules, and stuckness tree.
- Complete the competition — per plan, down to the 30-minute stall rule, abandonment declarations, and the endgame calculator’s verdicts.
- After the end, complete the results-record template (3-5) — including "the single one thing to change next."
- Hold the team retrospective and dinner, and leave that record in the team documents.
Exercises
Exercise 1. List the four "non-skill variables" that decide rank at highest-level competitions, and explain why at this level these variables — not skill differences — decide the match.
Exercise 2. Explain why "stop new learning" is a rule in the preparation cycle’s final block (condition management).
Exercise 3. Explain why point values (POINT_EST) don’t enter the commit/abandon verdict in 3-2’s calculator, from the perspective of opportunity cost.
Exercise 4. Explain why a team needs "the separation of outcome from execution," together with what happens right after a competition when this agreement doesn’t exist.
5. Model Answers & Completion Criteria
Mission Model Answer
Check against these verification criteria.
- The calendar’s back-calculation: are the three blocks laid out counting back from competition day, and is stopping new learning stated in the condition block?
- Evidence of rehearsal: does the mock time attack’s log exist, and were the rule defects found there reflected in the documents?
- Traces of rule enforcement: does the competition log show 30-minute-stall swaps and abandonment declarations with timestamps?
- The endgame’s premeditation: was the endgame verdict grounded in the calculator and pre-agreements, not day-of improvisation?
- Retrospective completion: does the results record contain "the single one thing to change next," and were the retrospective & dinner held regardless of the outcome?
Exercise Answers
Answer 1. The non-skill variables are problem assignment, stagnation management, endgame operations, and condition. On a top-tier competition’s scoreboard, the gap between top teams is one or two problems — meaning the participating teams’ problem-solving ability has converged. When everyone solves the solvable problems, rank is decided by "who picked and grabbed the right problems faster," "who burned less time on stuck problems," "who didn’t bleed points in the last three hours." Skill can’t be changed on competition day, but all four of these variables are controlled by advance preparation and day-of rule enforcement — which is why preparation at this level is allocated to operations, not technique.
Answer 2. New learning right before a competition blurs skilled movements. A new technique executes slowly until it’s second nature, and the mid-competition "urge to try the newly learned thing" pulls you off the fixed tactics. Also, last-week learning easily encroaches on sleep, colliding directly with condition management. Since a top-tier competition’s skill is not made on the day but is the revealing of accumulated training, the final week’s task is not adding skill but sealing in condition — creating the conditions to pull out what you already have at its best state.
Answer 3. Points have value "only when obtainable." However high a 500-point problem is, if its remaining steps don’t fit in 3 hours or its momentum has broken, the expected points of spending remaining time on it approach zero. That time’s true cost is the value that could have been spent finishing a high-progress problem or verifying solved problems’ flags to prevent point loss. If points enter the verdict, the gambling logic of "it’s high-point, just a bit more" slips in — and the tired endgame brain is most vulnerable to that logic. So the calculator deliberately excludes points from the verdict and looks only at feasibility (remaining steps, momentum) — the correct place for points is after the verdict, in prioritizing when two or more feasible candidates remain.
Answer 4. Competitions at this level carry large variables, so the best execution doesn’t guarantee the best outcome — problem-type affinity, day-of server state, rival teams’ condition are all outside control. Without the agreement, the team retroactively evaluates execution by outcome — if the rank is low, they feel the plan was wrong, discard even the rules that worked, and face the next competition in an anxious state. If you agree in advance to use "did we do our best preparation and execution?" as the evaluation criterion, the outcome becomes data, not a verdict — even when it falls short, you can coldly look at "which point of execution was lacking," and if no point was lacking, you arrive unshaken at the conclusion that this result is merely the next challenge’s starting point.
Completion Criteria Checklist
- [ ] I fixed the target competition and wrote the prep calendar by back-calculation
- [ ] I stated stopping new learning and fixing the sleep rhythm in the condition block
- [ ] I rehearsed the operations rules with an 8-hour mock time attack and reflected the defects
- [ ] I enforced the 30-minute stall rule and abandonment declarations, leaving them in the competition log
- [ ] I made the endgame verdicts with the calculator and pre-agreements, and executed per plan
- [ ] I completed the results-record template and chose "the single one thing to change next"
- [ ] I held the team retrospective & dinner regardless of the outcome
6. Common Pitfalls & Fixes
Wall 1. I studied "just this one more technique" the week before the competition, and my condition collapsed
Symptom: digging into new write-ups until the night before, sleep broken, focus disintegrating on the afternoon of the competition.
Cause: a pattern of soothing anxiety with learning — the feeling of insufficient preparation keeps you studying until the very end.
Fix: follow the calendar, not the feeling. In 3-1’s calendar, new learning after D-7 is a rule violation. When anxiety rises, re-read the operations documents instead of learning — the shift schedule, the stuckness tree, the abandonment checklist. The feeling of "being ready" comes not from new knowledge but from a verified plan.
Wall 2. I get an error at the dataclass part
Symptom: running the script shows this error (measured — on Python 3.6 or earlier).
ModuleNotFoundError: No module named 'dataclasses'
Cause: dataclasses entered the standard library in Python 3.7. Older Pythons don’t have the module.
Fix: check your Python version first — python --version. In this book’s environment (3.12) it works as-is. If you must use an older version, install the backport with pip install dataclasses, or change Problem into a plain class.
Wall 3. The calculator says "abandon," but my hands won’t let go — I feel I’ve almost solved it
Symptom: a problem at 80% progress, yet you keep repeating "just a bit more" even as the stall stretches.
Cause: the sunk-cost fallacy — you invest more because the time already spent feels wasteful. And 80% progress is only an estimate; the real wall to the flag often hides in the remaining 20%.
Fix: use two devices. ① Mechanical enforcement by timer — when the 30-minute-stall alarm rings, record and swap without deliberation. "Without deliberation" is the key. ② Make the "next hypothesis" a mandatory entry in the abandonment declaration — with a hypothesis in hand, leaving is easy, and the confidence that you can return later makes abandoning possible. And remember — at this level, in the time you clutch an "almost solved" problem, rival teams produce one more solve.
Wall 4. The result fell short of the goal and the team’s mood sank
Symptom: 4th place in the championship rematch. The retrospective goes silent.
Cause: the whole team has fallen into the trap of retroactively evaluating execution by outcome (see Exercise 4).
Fix: fill in the results-record template (3-5) in order — especially "operations self-evaluation" and "condition self-evaluation" first. Once the fact that execution followed the plan is confirmed in numbers, the silence breaks. Copying this sentence verbatim into the team channel also works — "what matters is whether you did your best preparation and execution, and if the answer is yes, that result is merely the starting point of the next challenge." And don’t postpone the dinner — the more sunken the day, the more that occasion is needed.
Wall 5. Chasing a "comeback gamble" in the endgame, I missed a point leak on a solved problem
Symptom: you engaged a high-point problem in the last hour, then discovered after the end a flag-submission error on an already-solved problem (trailing space, wrong case).
Cause: the endgame strategy was decided by the day’s tired brain — the desire for a comeback discounted verification’s value.
Fix: keep endgame rule #2 by machine — the final hour is verification-only, no new engagements. Pin this rule as a message in the team channel before the competition and quote it again at endgame-entry time. The points "flag re-submission verification" recovers often exceed a single new problem — protecting points already earned is the endgame’s first mission.
7. Summary
Today’s Concepts
| Concept | One-line explanation |
|---|---|
| Non-skill variables | Problem assignment · stagnation management · endgame operations · condition — the real battleground of the top tier |
| Preparation cycle | Intensive training → operations check → condition management, laid out by back-calculation |
| Stop new learning | The final week’s task is not adding skill but sealing in condition |
| Economics of decision | Abandoning’s cost is opportunity cost — judge by feasibility, not point value |
| Endgame management | The last 3 hours’ strategy is designed before the competition — verification mode is the default |
| Separating outcome from execution | The evaluation criterion is not rank but "did we execute our best" |
Today’s Tools & Commands
| Tool/command | What it does |
|---|---|
python step339_endgame.py |
Endgame per-problem commit/abandon verdicts and rule output |
| Prep calendar | Three blocks laid out counting back from competition day |
| Abandonment enforcement checklist | Save records → declare in channel → engage next, enforced without emotion |
| Results-record template | Rank · gap · operations/condition self-evaluation · the single one thing to change |
| 3 endgame rules | 30-minute stall swap · final hour verification-only · final save 15 min before the end |
The Core Instinct
At this level, a competition is half decided the moment preparation ends. What happens on the day is only the execution of the plan, and the quality of execution is the accumulation of training in keeping rules without emotion. Letting go at the 30-minute stall, choosing verification in the endgame — all decisions that look trivial, but on a scoreboard of one-or-two-problem differences, this triviality is everything.
And even if the result falls short of the goal, what a team that has come this far should look at is not the rank number but the execution record. A loss in a competition fought per plan is a component of the next championship — and that component sits inside the logs and records you saved today.
Once every box is checked, Step 339 is complete.