A state space is the set of all possible configurations of a system.
[ It is a useful abstraction for reasoning about the behavior of a given system and is widely used in the fields of ]artificial intelligence
Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machine
A machine is a physical system using Power (physics), power to apply Force, forces and control Motion, moveme ...
and game theory.
For instance, the toy problem Vacuum World has a discrete finite state space in which there are a limited set of configurations that the vacuum and dirt can be in. A "counter" system, where states are the natural numbers
In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country").
Numbers used for counting are called '' cardinal ...
starting at 1 and are incremented over time[ has an infinite discrete state space. The angular position of an undamped ]pendulum
A pendulum is a weight suspended from a wikt:pivot, pivot so that it can swing freely. When a pendulum is displaced sideways from its resting, Mechanical equilibrium, equilibrium position, it is subject to a restoring force due to gravity that ...
[ is a continuous (and therefore infinite) state space.
]
Definition
In the theory of dynamical system
In mathematics, a dynamical system is a system in which a function describes the time dependence of a point in an ambient space. Examples include the mathematical models that describe the swinging of a clock pendulum, the flow of water i ...
s, the state space of a discrete system defined by a function ''ƒ'' can be modeled as a directed graph
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discre ...
where each possible state of the dynamical system is represented by a vertex with a directed edge from ''a'' to ''b'' if and only if ''ƒ''(''a'') = ''b''.[ This is known as a state diagram.
For a continuous dynamical system defined by a function ''ƒ'', the state space of the system is the ]image
An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensio ...
of ''ƒ''.
State spaces are useful in computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includin ...
as a simple model of machines. Formally, a state space can be defined as a tuple
In mathematics, a tuple is a finite ordered list (sequence) of elements. An -tuple is a sequence (or ordered list) of elements, where is a non-negative integer. There is only one 0-tuple, referred to as ''the empty tuple''. An -tuple is defi ...
'N'', ''A'', ''S'', ''G''where:
* ''N'' is a set of states
* ''A'' is a set of arcs connecting the states
* ''S'' is a nonempty subset
In mathematics, set ''A'' is a subset of a set ''B'' if all elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are unequal, then ''A'' is a proper subset o ...
of ''N'' that contains start states
* ''G'' is a nonempty subset of ''N'' that contains the goal states.
Properties
A state space has some common properties:
* complexity, where branching factor is important
* structure of the space, see also graph theory
In mathematics, graph theory is the study of '' graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of '' vertices'' (also called ''nodes'' or ''points'') which are conn ...
:
** directionality of arcs
** tree
** rooted graph
For example, the Vacuum World has a branching factor of 4, as the vacuum cleaner can end up in 1 of 4 adjacent squares after moving (assuming it cannot stay in the same square nor move diagonally). The arcs of Vacuum World are bidirectional, since any square can be reached from any adjacent square, and the state space is not a tree since it is possible to enter a loop by moving between any 4 adjacent squares.
State spaces can be either infinite or finite, and discrete or continuous.
Size
The size of the state space for a given system is the number of possible configurations of the space.
Finite
If the size of the state space is finite, calculating the size of the state space is a combinatorial problem.[ For example, in the Eight queens puzzle, the state space can be calculated by counting all possible ways to place 8 pieces on an 8x8 chessboard. This is the same as choosing 8 positions without replacement from a set of 64, or
:
This is significantly greater than the number of legal configurations of the queens, 92. In many games the effective state space is small compared to all reachable/legal states. This property is also observed in ]Chess
Chess is a board game for two players, called White and Black, each controlling an army of chess pieces in their color, with the objective to checkmate the opponent's king. It is sometimes called international chess or Western chess to dist ...
, where the effective state space is the set of positions that can be reached by game-legal moves. This is far smaller than the set of positions that can be achieved by placing combinations of the available chess pieces directly on the board.
Infinite
All continuous state spaces can be described by a corresponding continuous function and are therefore infinite.[ Discrete state spaces can also have (]countably
In mathematics, a Set (mathematics), set is countable if either it is finite set, finite or it can be made in one to one correspondence with the set of natural numbers. Equivalently, a set is ''countable'' if there exists an injective function fro ...
) infinite size, such as the state space of the time-dependent "counter" system,[ similar to the system in ]queueing theory
Queueing theory is the mathematical study of waiting lines, or queues. A queueing model is constructed so that queue lengths and waiting time can be predicted. Queueing theory is generally considered a branch of operations research because the ...
defining the number of customers in a line, which would have state space .
Exploration
Exploring a state space is the process of enumerating possible states in search of a goal state. The state space of Pacman
originally called ''Puck Man'' in Japan, is a 1980 maze action video game developed and released by Namco for arcades. In North America, the game was released by Midway Manufacturing as part of its licensing agreement with Namco America. The ...
, for example, contains a goal state whenever all food pellets have been eaten, and is explored by moving Pacman around the board.[
]
Search States
A search state is a compressed representation of a world state in a state space, and is used for exploration. Search states are used because a state space often encodes more information than is necessary to explore the space. Compressing each world state to only information needed for exploration improves efficiency by reducing the number of states in the search.[ For example, a state in the Pacman space includes information about the direction Pacman is facing (up, down, left, or right). Since it does not cost anything to change directions in Pacman, search states for Pacman would not include this information and reduce the size of the search space by a factor of 4, one for each direction Pacman could be facing.
]
Methods
Standard search algorithms are effective in exploring discrete state spaces. The following algorithms exhibit both completeness and optimality in searching a state space.[
* ]Breadth-First Search
Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth prior to moving on to the nodes at the next d ...
* A* Search
* Uniform Cost Search
These methods do not extend naturally to exploring continuous state spaces. Exploring a continuous state space in search of a given goal state is equivalent to optimizing an arbitrary continuous function which is not always possible, see mathematical optimization
Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criterion, from some set of available alternatives. It is generally divided into two subfi ...
.
See also
* State space representation for information about continuous state space in control engineering.
* State space (physics) for information about continuous state space in physics.
* Phase space for information about phase state (like continuous state space) in physics and mathematics.
* Probability space
In probability theory, a probability space or a probability triple (\Omega, \mathcal, P) is a mathematical construct that provides a formal model of a random process or "experiment". For example, one can define a probability space which models t ...
for information about state space in probability.
* Game complexity theory, which relies on the state space of game outcomes
* Cognitive Model#Dynamical systems for information about state space with a dynamical systems model of cognition.
* State space planning In artificial intelligence and computer programming, state space planning is a process used in designing programs to search for data or solutions to problems. In a computer algorithm that searches a data structure for a piece of data, for example ...
* State (computer science)
* Artificial intelligence
Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machine
A machine is a physical system using Power (physics), power to apply Force, forces and control Motion, moveme ...
* Dynamical systems
In mathematics, a dynamical system is a system in which a function describes the time dependence of a point in an ambient space. Examples include the mathematical models that describe the swinging of a clock pendulum, the flow of water in ...
* Glossary of artificial intelligence
* Machine learning
Machine learning (ML) is a field of inquiry devoted to understanding and building methods that 'learn', that is, methods that leverage data to improve performance on some set of tasks. It is seen as a part of artificial intelligence.
Machine ...
* Mathematical optimization
Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criterion, from some set of available alternatives. It is generally divided into two subfi ...
* Multi-agent system
A multi-agent system (MAS or "self-organized system") is a computerized system composed of multiple interacting intelligent agents.Hu, J.; Bhowmick, P.; Jang, I.; Arvin, F.; Lanzon, A.,A Decentralized Cluster Formation Containment Framework fo ...
* Game theory
* Combinatorics
Combinatorics is an area of mathematics primarily concerned with counting, both as a means and an end in obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many a ...
References
{{DEFAULTSORT:State Space
Models of computation
Dynamical systems
Reconfiguration