Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
State space (computer science)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Set of all possible values of a system}} {{redirect|State space}} {{More footnotes|date=February 2012}} [[File:Vacuum World.tif|thumb|Vacuum World, a [[shortest path problem]] with a finite state space]] In [[computer science]], a '''state space''' is a [[discrete space]] representing the set of all possible configurations of a system.<ref name=MISSD/> It is a useful abstraction for reasoning about the behavior of a given system and is widely used in the fields of [[artificial intelligence]] 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]] starting at 1 and are incremented over time<ref name=CMUINF/> has an infinite discrete state space. The angular position of an undamped [[pendulum]]<ref name=MIDYNS/> is a continuous (and therefore infinite) state space. ==Definition== State spaces are useful in [[computer science]] as a simple model of machines. Formally, a state space can be defined as a [[tuple]] [''N'', ''A'', ''S'', ''G''] where: * ''N'' is a [[Set (mathematics)|set]] of states * ''A'' is a set of arcs connecting the states * ''S'' is a nonempty [[subset]] of ''N'' that contains start states * ''G'' is a nonempty subset of ''N'' that contains the goal states. ==Properties== {{Chess diagram | tright | |__|__|__|__|__|ql|_|__ |__|__|__|ql|__|__|__|__ |__|__|__|__|__|__|ql|__ |ql|__|__|__|__|__|__|__ |__|__|__|__|__|__|__|ql |__|ql|__|__|__|__|__|__ |__|__|__|__|ql|__|__|__ |__|__|ql|__|__|__|__|__ |A valid state in the state space of the eight queens puzzle }} A state space has some common properties: * complexity, where [[branching factor]] is important * structure of the space, see also [[graph theory]]: ** 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.<ref name=MIDYNS/> ====Finite==== If the size of the state space is finite, calculating the size of the state space is a [[Enumerative combinatorics|combinatorial]] problem.<ref name=SACEA/> 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 :<math> \binom{64}{8} = 4,426,165,368</math> 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]], 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.<ref name=MIDYNS/> Discrete state spaces can also have ([[countable set|countably]]) infinite size, such as the state space of the time-dependent "counter" system,<ref name=CMUINF/> similar to the system in [[queueing theory]] defining the number of customers in a line, which would have state space {0, 1, 2, 3, ...}. ==Exploration== {{main|State space search}} Exploring a state space is the process of enumerating possible states in search of a goal state. The state space of [[Pacman]], for example, contains a goal state whenever all food pellets have been eaten, and is explored by moving Pacman around the board.<ref name=BAIL2/> ===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.<ref name=BAIL2/> 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_(logic)|completeness]] and optimality in searching a state space:<ref name=BAIL2/><ref name=BAIL3/> * [[Breadth-first search]] * [[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]]. ==See also== {{portal|Computer programming}} {{col div|colwidth=20em}} * [[Phase space]] for information about phase state (like continuous state space) in physics and mathematics. * [[Probability space]] 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]] * [[State (computer science)]] * [[Artificial intelligence]] * [[Dynamical systems]] * [[Glossary of artificial intelligence]] * [[Machine learning]] * [[Mathematical optimization]] * [[Multi-agent system]] * [[Game theory]] * [[Combinatorics]] {{colend}} ==References== {{reflist|30em|refs= <ref name=MIDYNS>{{cite web |last1=Nykamp |first1=Duane |title=The idea of a dynamical system |url=https://mathinsight.org/dynamical_system_idea |website=Math Insights |access-date=12 November 2019}}</ref> <ref name=MISSD>{{cite web |last1=Nykamp |first1=Duane |title=State space definition |url=https://mathinsight.org/definition/state_space |website=Math Insights |access-date=17 November 2019}}</ref> <ref name=BAIL2>{{cite web |last1=Abbeel |first1=Pieter |title=Lecture 2: Uninformed Search |url=http://ai.berkeley.edu/slides/Lecture%202%20--%20Uninformed%20Search/SP14%20CS188%20Lecture%202%20--%20Uninformed%20Search.pptx |website=UC Berkeley CS188 Intro to AI |access-date=30 October 2019}}</ref> <ref name=BAIL3>{{cite web |last1=Abbeel |first1=Pieter |title=Lecture 3: Informed Search |url=http://ai.berkeley.edu/slides/Lecture%202%20--%20Uninformed%20Search/SP14%20CS188%20Lecture%202%20--%20Uninformed%20Search.pptx |website=UC Berkeley CS188 Intro to AI |access-date=12 November 2019}}</ref> <ref name=CMUINF>{{cite web |last1=Papernick |first1=Norman |title=Infinite States and Infinite State Transitions |url=https://www.cs.cmu.edu/afs/cs/academic/class/15671-f95/www/handouts/sm-basics/node8.html |publisher=Carnegie Mellon University |access-date=12 November 2019}}</ref> <ref name=SACEA>{{cite book |last1=Zhang |first1=Weixong |title=State-space search: algorithms, complexity, extensions, and applications |url=https://books.google.com/books?id=bifeGGCDlWcC |date=1999 |publisher=Springer |isbn=978-0-387-98832-0}}</ref> }} {{DEFAULTSORT:State Space}} [[Category:Models of computation]] [[Category:Dynamical systems]] [[Category:Reconfiguration]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Chess diagram
(
edit
)
Template:Col div
(
edit
)
Template:Colend
(
edit
)
Template:Main
(
edit
)
Template:More footnotes
(
edit
)
Template:Portal
(
edit
)
Template:Redirect
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)