"매 search space = 매 algorithm 의 매 explore-able 모든 candidate 의 set". 매 problem 을 매 (state, transition, goal) tuple 로 modeling 시 의 전체 reachable state set. 매 search 의 효율 = 매 1) space 의 size 줄이기 + 2) 매 promising region 의 priorit ize.
매 핵심
매 정의 components
State: 매 partial / full solution candidate.
Initial state: 매 search 시작 점.
Successor function: 매 state → 매 reachable next states.
Goal test: 매 state 가 매 valid solution 인지.
Path cost: 매 path 의 매 quality metric.
매 size scaling
Combinatorial explosion: 매 N-queens 의 N=8 → 매 16M state. N=20 → 매 effectively infinite.
Branching factor (b)×depth (d) → b^d.
Pruning (alpha-beta, constraint propagation, branch-and-bound) → 매 effective space ↓.
매 응용
Pathfinding: 매 grid/graph 의 매 cell/node space.
Game AI: 매 chess/go 의 매 game tree.
Planning: 매 STRIPS, PDDL 의 매 action sequence space.
NAS: 매 neural architecture 의 매 hyperparameter space.
LLM reasoning: 매 chain-of-thought / tree-of-thought 의 매 reasoning tree.
# 매 search space 의 매 prune via 매 arc-consistency.defac3(domains,constraints):queue=[(x,y)forxindomainsforyinconstraints.get(x,[])]whilequeue:x,y=queue.pop(0)ifrevise(domains,x,y,constraints):ifnotdomains[x]:returnFalse# 매 inconsistentforzinconstraints.get(x,[])-{y}:queue.append((z,x))returnTrue
Pattern 4: Tree-of-Thoughts (LLM reasoning space)
# 매 LLM 의 매 reasoning step 을 매 search node 로.asyncdeftot_search(problem,max_depth=5,beam=3):frontier=[{"state":problem,"trace":[]}]fordinrange(max_depth):cands=[]fornodeinfrontier:thoughts=awaitllm.expand(node["state"],k=beam)fortinthoughts:cands.append({"state":t,"trace":node["trace"]+[t]})# 매 evaluator (LLM-as-judge) 가 매 top-beam pick.scored=awaitllm.evaluate(cands)frontier=sorted(scored,key=lambdax:-x["score"])[:beam]ifany(is_goal(n["state"])forninfrontier):breakreturnfrontier[0]["trace"]
매 결정 기준
상황
Approach
매 small finite space
BFS / DFS — 매 complete
매 large but heuristic-able
A* / IDA*
매 huge stochastic
MCTS (UCT)
매 continuous space
gradient-based / Bayesian opt
매 LLM reasoning
Tree-of-Thoughts / Graph-of-Thoughts
매 constraint-rich
CSP solver (Z3, OR-Tools)
기본값: 매 first 매 reformulate problem 으로 매 space 의 size ↓ — 매 algorithm choice 보다 효과 큼.