Best-improvement: examine all neighbors, take the best improving one. Stops at any local optimum.
10.0 0.995
idle
Iteration
0
Current cost
-
Best ever
-
Temperature
-
SA accept/reject
0/0

Current state

Cost over iterations

📊 Repeated-restart benchmark

Compare selected algorithms on the same problem instance and the same seeded starting state for every restart. Success frequency and solution cost are reported separately.

Misread to avoid: A high success rate does not imply the lowest mean cost, and one excellent run does not imply reliable success.

Fidelity boundary: this benchmark uses bounded step budgets and seeded synthetic starts. It compares these teaching implementations; it is not a hardware-performance benchmark or a proof of asymptotic superiority.

Algorithms to compare

Success rule appears after the benchmark runs.

No benchmark has run yet.
✨ Featured comparison
Featured comparison

Run greedy hill climbing and simulated annealing from the same landscape. The useful question is not which is smarter, but which escape options each one has.

Use the same starting state, then compare the route, final score, and local-trap behavior.

🧭 Visual explanation

Live state to watch
No state captured yet. Run or adjust the applet first.
Misread to avoid

📚 Lesson tour (5 steps)
Step 1/5: -

-

📝 Worksheet (3 questions)

Q1. TSP, best-improvement HC. Run to convergence several times from different restarts. Does it always find the SAME (global-optimum) solution?

Q2. Same TSP. Switch to random-restart HC. After several minutes, "best ever" cost is:

Q3. Simulated annealing. As temperature T cools toward zero, the algorithm behavior becomes:

🧪 Quick Assign · QA-LOCAL-01 · 10–15 min
QA-LOCAL-01 · Level 1 · 10–15 min
Why local search gets stuck or escapes

Run one local-search trajectory or a matched seeded-restart benchmark, then explain why an algorithm gets stuck, escapes, or succeeds reliably.

State snapshot appears here.
♿ Text and keyboard support

Text and keyboard support

Keyboard path

  • Use Tab and Shift+Tab to move through controls.
  • Use Enter or Space on buttons, and arrow keys on sliders or select controls.
  • The visual region is focusable and described by the state summary below.

Text state summary

Reduced motion and non-visual support

Reduced-motion settings are honored where possible. The current state is also available as text, so the main result does not depend only on color, animation, or spatial position.

Accessibility note: this layer gives a text equivalent for the applet state. It does not replace a full human screen-reader audit.