A state space is the complete set of all possible configurations or situations that an agent or system can be in, formally defined as a graph where nodes represent distinct states and edges represent valid transitions between them. This abstract representation is the fundamental search domain for planning algorithms, reinforcement learning agents, and tree search methods like Monte Carlo Tree Search (MCTS). The size and structure of the state space directly determine the computational complexity of finding an optimal sequence of actions, or policy, to reach a goal.
