Guide
How to use Search Studio
Three places matter: the library, where you learn an algorithm; the studio, where you run it; and the export panel, where you take the trace away.
1. Learn the algorithm first
Open the library and pick an algorithm. Its page has:
- Introduction in plain language, and a precise definition.
- Pseudocode with a sentence on what each line does and why.
- Formulas: each written out, read aloud in words, and justified.
- Properties (complete? optimal? time and space) and common traps.
Press Try it to open the studio with that algorithm and a suitable example already loaded.
2. Run it in the studio
Choose a problem
- Examples come with the site: the six-city instance from the TSP deck, two five-city practice matrices, and three graphs for uninformed and informed search.
- Random makes a new TSP or graph from a size and a seed. The same seed always gives the same problem, so you can share it.
- Edit shows the problem as text you can change (format below) and saves it under My problems in this browser.
- Import accepts a problem as JSON (paste it or choose a file); Export problem gives you that JSON back.
Choose an algorithm and its settings
Only algorithms that fit the problem type are listed. Settings such as start city, beam width, tabu tenure, temperature or random seed appear below. Changing anything re-runs the algorithm from the start.
Step through
- ← → step back and forward, Space plays or pauses, Home / End jump to the first or last step.
- The slider scrubs; the speed menu sets seconds per step.
- The Trace tab lists every step's caption; click one to jump to it.
3. Read the stage
Left: the graph. Right: the working table for this algorithm, with the current row highlighted, and a small chart where one helps (temperature runs, restarts, roulette wheels). Below: the lists, such as OPEN and CLOSED written as node pairs (node, parent, value). At the bottom, in yellow, one sentence says what just happened.
| you see | it means |
|---|---|
| yellow ring | the node being expanded or the city the tour is at |
| orange ring | on OPEN (generated, waiting), or a candidate being considered |
| grey node | on CLOSED (already expanded) |
| green | path found, accepted edge, optimum, goal (double ring) |
| red dashes | an edge being removed or a choice being rejected |
| orange dashes | candidate edges from the current city |
| blue dashes | the second parent tour, or an out-and-back trip in the savings heuristic |
| thick orange edges (ACO) | pheromone: thicker means more |
4. Problem text formats
TSP: names, then the matrix
A B C D E 0 58 92 34 81 58 0 20 46 70 92 20 0 28 53 34 46 28 0 12 81 70 53 12 0
Use any whitespace or commas. The matrix may be asymmetric; the site tells you when it is.
Graph: start, goal, heuristic, edges
start S goal G undirected h S 7 h A 5 # edges: from to cost S A 2 S B 5 A G 6 B G 1
Write directed instead of undirected for one-way edges. Lines starting with # are comments. Nodes without a position are placed on a circle.
5. Take it away
- Printable trace: a self-contained HTML page with a cover (problem, settings, pseudocode) and one step per printed page. Open it in a browser and print, or save as PDF.
- Trace JSON / CSV: every step's caption, table and lists, for notes or spreadsheets.
- Current step as SVG: the graph drawing, for slides.
Conventions used everywhere
- Ties are broken alphabetically unless a setting says otherwise; MoveGen lists neighbours alphabetically.
- Tours are written in path representation; the edge back to the start is always included in the cost.
- Graph search is graph search: a node already on OPEN or CLOSED is not added again; UCS and A* update it when they find a cheaper path.
- The goal test happens when a node is picked from OPEN, as in the course.
- Random choices use a seeded generator, so a run can always be repeated exactly.