Content deleted Content added
Citation bot (talk | contribs) Add: website. | Use this bot. Report bugs. | Suggested by Abductive | Category:Game theory | #UCB_Category 204/205 |
m Reverted 1 edit by 2401:D800:B4:30E9:A7A9:79A9:75AC:EDC7 (talk) to last revision by Remsense |
||
(25 intermediate revisions by 19 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 [[Computational complexity theory|computational complexity]] of various game scenarios.
==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}}
{| class="wikitable sortable sticky-header"
|-
!Game
Line 172 ⟶ 177:
|style="text-align:right;"|70
|style="text-align:right;"|2.8
|style="text-align:right;"|<ref name="Allis1994"/><ref>{{cite journal | author = Jonathan Schaeffer| title = Checkers is Solved | journal = Science | date = July 6, 2007 | doi=10.1126/science.1144079 | volume=317 |issue= 5844 |pages= 1518–1522 | pmid=17641166 |display-authors=etal|bibcode=2007Sci...317.1518S | s2cid = 10274228 | doi-access= free }}</ref><ref>{{cite journal
| last = Schaeffer | first = Jonathan
| doi = 10.3233/ICG-2007-30402
Line 267 ⟶ 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 287 ⟶ 292:
|style="text-align:right;"|600
|style="text-align:right;"|<ref name=Bell_Halma/>
|[[EXPTIME]]-complete
|-
|[[Reversi]] (Othello)
Line 378 ⟶ 383:
| year = 1981}}</ref>
|-
|[[Bejeweled (video game)|Bejeweled]] and [[Candy Crush Saga|Candy Crush]] (8x8)
|style="text-align:right;"|64
|style="text-align:right;"|<50
Line 506 ⟶ 511:
| contribution-url = https://helios2.mi.parisdescartes.fr/~Bouzy/publications/KIB-MCAmazons-CGW07.pdf
| pages = 185–192
| title = Computer Games Workshop, Amsterdam,
| year = 2007}}</ref><ref name="Hengens_thesis">{{cite web |author=P. P. L. M. Hensgens |title=A Knowledge-Based Approach of the Game of Amazons |year=2001 |publisher=Universiteit Maastricht, Institute for Knowledge and Agent Technology |url=https://project.dke.maastrichtuniversity.nl/games/files/msc/Hensgens_thesis.pdf}}</ref>
|[[PSPACE-complete]]<ref>{{cite arXiv | author = R. A. Hearn | author-link=Bob Hearn | title = Amazons is PSPACE-complete | date = 2005-02-02 | eprint = cs.CC/0502013 }}</ref>
|-
|[[Shogi]]
Line 531 ⟶ 536:
|style="text-align:right;"|361
|style="text-align:right;"|170
|style="text-align:right;"|
|style="text-align:right;"|
|style="text-align:right;"|250
|style="text-align:right;"|<ref name="Allis1994"/><ref name="cwi">{{cite web | title = Combinatorics of Go |author1=John Tromp |author2=Gunnar Farnebäck | year = 2007 | url = https://tromp.github.io/go/gostate.ps}} This paper derives the bounds 48<log(log(''N''))<171 on the number of possible games ''N''.</ref><ref name="Tromp2016">{{cite web | title=Number of legal Go positions | author=John Tromp | year=2016 | url=https://tromp.github.io/go/legal.html}}</ref>
<ref>{{Cite web|url=https://homepages.cwi.nl/~aeb/go/misc/gostat.html|title = Statistics on the length of a go game}}</ref>
|[[EXPTIME-complete]] (without the [[superko rule]])<ref name="Robson1983">{{Cite book | author = J. M. Robson | chapter = The complexity of Go | title = Information Processing; Proceedings of IFIP Congress | year = 1983 | pages = 413–417}}</ref>
|-
Line 562 ⟶ 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 570 ⟶ 576:
|style="text-align:right;"|
|style="text-align:right;"|
|style="text-align:right;"|<ref name="Churchill2020">{{cite
|AH-hard<ref name="Biderman">{{cite arXiv | author = Stella Biderman | title = Magic: the Gathering is as Hard as Arithmetic | year = 2020 | class = cs.AI | eprint = 2003.05119
|-
|[[Wordle]]
|style="text-align:right;"|5
|style="text-align:right;"|4.113 (12,972)
|style="text-align:right;"|
|style="text-align:right;"|6
|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 603 ⟶ 609:
[[Category:Combinatorial game theory]]
|