Content deleted Content added
m Reverted 1 edit by 2401:D800:B4:30E9:A7A9:79A9:75AC:EDC7 (talk) to last revision by Remsense |
|||
(8 intermediate revisions by 6 users not shown) | |||
Line 2:
{{Use mdy dates|cs1-dates=ly|date=May 2023}}
[[Combinatorial game theory]]
#State-space complexity (the number of legal game positions from the initial position)
#Game tree size (total number of possible games)
#Decision complexity (number of leaf nodes in the smallest decision tree for initial position)
#Game-tree complexity (number of leaf nodes in the smallest full-width decision tree for initial position)
#Computational complexity (asymptotic difficulty of a game as it grows arbitrarily large)
These measures involve understanding the game positions, possible outcomes, and
==Measures of game complexity==
=== State-space complexity ===
The
When this is too hard to calculate, an [[upper bound]] can often be computed by also counting (some) illegal positions
=== Game tree size ===
The
The game tree is typically vastly larger than the state
For games where the number of moves is not limited (for example by the size of the board, or by a rule about repetition of position) the game tree is generally infinite.
=== Decision trees ===
The following two methods of measuring game complexity use decision trees:
==== Decision complexity ====
==== Game-tree complexity ====
It is hard even to estimate the game-tree complexity, but for some games an approximation can be given by
▲It is hard even to estimate the game-tree complexity, but for some games an approximation can be given by raising the game's average [[branching factor]] ''b'' to the power of the number of [[Ply (chess)|plies]] ''d'' in an average game, or:
=== Computational complexity ===
The
The asymptotic complexity is defined by the most efficient algorithm for solving the game (in terms of whatever [[computational resource]] one is considering).
* The [[depth-first search|depth-first]] [[minimax strategy]] will use
* [[Backward induction]] will use both memory and time proportional to the state-space complexity, as it must compute and record the correct move for each possible position.
==Example: tic-tac-toe (noughts and crosses)==
For [[tic-tac-toe]], a simple upper bound for the size of the state space is 3<sup>9</sup> = 19,683. (There are three states for each
To bound the game tree, there are 9 possible initial moves, 8 possible responses, and so on, so that there are at most 9! or 362,880 total games. However, games may take less than 9 moves to resolve, and an exact enumeration gives 255,168 possible games. When rotations and reflections of positions are considered the same, there are only 26,830 possible games.
The computational complexity of tic-tac-toe depends on how it is [[generalized game|generalized]]. A natural generalization is to [[m,n,k-game|''m'',''n'',''k''-games]]: played on an ''m'' by ''n'' board with winner being the first player to get ''k'' in a row.
==Complexities of some well-known games==
Due to the large size of game complexities, this table gives the ceiling of their [[logarithm]] to base 10.
{{sticky header}}
Line 278 ⟶ 272:
|style="text-align:right;"|180
|style="text-align:right;"|<ref name=Bell_Halma>{{cite journal|author=G.I. Bell|title=The Shortest Game of Chinese Checkers and Related Problems|journal=Integers|year=2009|volume=9|doi=10.1515/INTEG.2009.003|arxiv=0803.1245|bibcode=2008arXiv0803.1245B|s2cid=17141575}}</ref>
|[[EXPTIME]]-complete
| last1 = Kasai | first1 = Takumi
| last2 = Adachi | first2 = Akeo
Line 298 ⟶ 292:
|style="text-align:right;"|600
|style="text-align:right;"|<ref name=Bell_Halma/>
|[[EXPTIME]]-complete
|-
|[[Reversi]] (Othello)
Line 574 ⟶ 568:
|style="text-align:right;"|infinite
|style="text-align:right;"|<ref>{{cite arXiv | author = CDA Evans and Joel David Hamkins | title = Transfinite game values in infinite chess | year = 2014| class = math.LO | eprint = 1302.4377 }}</ref>
|{{Unknown}}, but mate-in-''n'' is decidable<ref name="Brumleve2012">{{cite journal | author = Stefan Reisch, Joel David Hamkins, and Phillipp Schlicht | title = The mate-in-n problem of infinite chess is decidable | journal = Conference on Computability in Europe | year = 2012 | pages = 78–88 | arxiv = 1201.5597 }}</ref>
|-
|[[Magic: The Gathering]]
Line 592 ⟶ 586:
|style="text-align:right;"|
|style="text-align:right;"|<ref>{{cite arXiv |last1=Lokshtanov |first1=Daniel |last2=Subercaseaux |first2=Bernardo |date=2022-05-14 |title=Wordle is NP-hard |class=cs.CC |eprint=2203.16713 }}</ref>
|[[NP-hardness|NP-hard]], unknown if [[PSPACE-complete]] with parametization
|}
Line 615 ⟶ 609:
[[Category:Combinatorial game theory]]
|