Skip to content

Commit a5cec10

Browse files
committed
feat(sudoku): flush-left brag block, no headers/labels/separators
Match the exact layout requested for screenshot bragging: - Remove '── Visual verification ──' header + footer - Remove 'Solved grid:' label + '-----' separators - Drop the 2-space indent on all brag lines (flush left) - Grid stays at 4-space indent (matches display() default) - ✅ verified line at the very end
1 parent 21fb779 commit a5cec10

1 file changed

Lines changed: 13 additions & 21 deletions

File tree

benches/sudoku_speculate_bench.rs

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,6 @@ fn main() {
506506
// the user can visually confirm the solved grid and the bench asserts the
507507
// solution is actually correct. The `Instant` here is a single-shot
508508
// representative timing for bragging, not a benchmark.
509-
println!("── Visual verification (untimed vs bench) ────────────────────");
510509

511510
let t_vfast0 = Instant::now();
512511
let s_verify_fast = solve_fast();
@@ -548,41 +547,34 @@ fn main() {
548547
(Inkala has a unique solution — they must match)"
549548
);
550549

551-
// ── Brag-worthy hero block ──
550+
// ── Brag block (flush-left, clean for screenshots). ──
552551
let speedup_vs_bt = t_vbt.as_nanos() as f64 / t_vfast.as_nanos().max(1) as f64;
553552
let speedup_vs_sp = t_vsp.as_nanos() as f64 / t_vfast.as_nanos().max(1) as f64;
554553
let hero = format!("⚡ World's Hardest Sudoku solved in {}", fmt_us(t_vfast));
555554
let sub = "(Arto Inkala — 21 clues, 60 empties)";
556555
let w = hero.len().max(sub.len());
557556
println!();
558-
println!(" ╔{}╗", "═".repeat(w + 2));
559-
println!(" ║ {:<width$} ║", hero, width = w);
560-
println!(" ║ {:<width$} ║", sub, width = w);
561-
println!(" ╚{}╝", "═".repeat(w + 2));
557+
println!("╔{}╗", "═".repeat(w + 2));
558+
println!("║ {:<width$} ║", hero, width = w);
559+
println!("║ {:<width$} ║", sub, width = w);
560+
println!("╚{}╝", "═".repeat(w + 2));
562561
println!();
563-
println!(" Leaderboard (single-shot, this run):");
564-
println!(" 🥇 solve_fast {:>10} {:>7} steps {}/speed",
562+
println!("Leaderboard (single-shot, this run):");
563+
println!(" 🥇 solve_fast {:>10} {:>7} steps {}/speed",
565564
fmt_us(t_vfast), s_verify_fast.steps, "—");
566-
println!(" 🥈 backtrack {:>10} {:>7} steps {:.1}× slower",
565+
println!(" 🥈 backtrack {:>10} {:>7} steps {:.1}× slower",
567566
fmt_us(t_vbt), s_verify_bt.steps, speedup_vs_bt);
568-
println!(" 🥉 speculate {:>10} fell back {:.1}× slower",
567+
println!(" 🥉 speculate {:>10} fell back {:.1}× slower",
569568
fmt_us(t_vsp), speedup_vs_sp);
570569
println!();
571-
println!(" solve_fast = MRV cell selection + naked-singles constraint");
572-
println!(" propagation. Pure modelless, no training.");
570+
println!("solve_fast = MRV cell selection + naked-singles constraint");
571+
println!(" propagation. Pure modelless, no training.");
573572
println!();
574-
println!(" ✅ verified: 3 solvers agree, grid valid, unique solution confirmed");
575-
println!();
576-
577-
// ── Solved grid (proof). ──
578-
println!(" Solved grid:");
579-
println!(" ─────────────────────────────────────────────");
580573
for line in s_verify_fast.final_board.display().lines() {
581-
println!(" {line}");
574+
println!(" {line}");
582575
}
583-
println!(" ─────────────────────────────────────────────");
584576
println!();
585-
println!("── end visual verification ──────────────────────────────────");
577+
println!("✅ verified: 3 solvers agree, grid valid, unique solution confirmed");
586578
println!();
587579

588580
// Sink to prevent elision.

0 commit comments

Comments
 (0)