Every sphere is a candidate reasoning step ("thought") the model could take next; an edge is one step of generation from a parent thought. Colour encodes step type (thought / action / observation) and brightness encodes the running value of that step.
value(n) = value(parent) + score(n) — cumulative path value
beam(d) = top-K children by value(n), K = beam width — Tree-of-Thought pruning
π* = argmax_leaf value(leaf), backtracked to root — best plan found
- Chain-of-Thought — a single greedy path: the model commits to one next thought at each step and never looks back, like beam width = 1 with no alternatives generated.
- Tree-of-Thought — at each depth, every kept thought spawns
branching factor candidate continuations; only the top beam width by cumulative value survive to expand further (grey spheres are the pruned candidates that were generated but abandoned).
- ReAct — alternates Thought → Action → Observation steps along one main line; some actions "fail", spawning a short dead-end retry branch before the model observes the failure and continues on the main line — interleaving reasoning with tool use and backtracking.
- When the search finishes, the highest-value leaf is traced back to the root (gold path) — the plan the search actually commits to.
This mirrors how real systems differ: a plain chain-of-thought prompt reasons once, forward-only; tree-of-thought / OpenAI o1-o3-style deliberation explores and prunes multiple candidate continuations before answering; ReAct-style agents interleave reasoning with tool calls and recover from failed actions mid-plan.