Content deleted Content added
Undid revision 1117989573 by Oopsemoops (talk) self revert per TP comment validating original edit |
m Reverted 1 edit by 2401:D800:B4:30E9:A7A9:79A9:75AC:EDC7 (talk) to last revision by Remsense |
||
(40 intermediate revisions by 25 users not shown) | |||
Line 1:
{{Short description|Notion in combinatorial game theory}}
{{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 <math>GTC \geq b^d</math>, where {{Mvar|b}} is the game's average [[branching factor]] and ''{{Mvar|d}}'' is the number of [[Ply (chess)|plies]] in an average game.
=== 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 82 ⟶ 88:
|style="text-align:right;"|3.7
|style="text-align:right;"|
|[[PSPACE-complete]]<ref>{{cite conference
| last = Slany | first = Wolfgang
| editor1-last = Marsland | editor1-first = T. Anthony
| editor2-last = Frank | editor2-first = Ian
| contribution = The complexity of graph Ramsey games
| doi = 10.1007/3-540-45579-5_12
| pages = 186–203
| publisher = Springer
| series = Lecture Notes in Computer Science
| title = Computers and Games, Second International Conference, CG 2000, Hamamatsu, Japan, October 26-28, 2000, Revised Papers
| volume = 2063
| year = 2000}}</ref>
|-
|[[Pentomino]]es
Line 90 ⟶ 107:
|style="text-align:right;"|10
|style="text-align:right;"|75
|style="text-align:right;"|<ref name="GamesSolved"/><ref>{{cite conference
| last = Orman | first = Hilarie K.
| editor-last = Nowakowski | editor-first = Richard J.
| contribution = Pentominoes: a first player win
| contribution-url = https://www.msri.org/publications/books/Book29/files/orman.pdf
| isbn = 0-521-57411-0
| mr = 1427975
| pages = 339–344
| publisher = Cambridge University Press
| series = Mathematical Sciences Research Institute Publications
| title = Games of No Chance: Papers from the Combinatorial Games Workshop held in Berkeley, CA, July 11–21, 1994
| volume = 29
| year = 1996}}</ref>
| {{dunno}}, but in [[PSPACE]]
|-
Line 118 ⟶ 147:
|style="text-align:right;"|8
|style="text-align:right;"|<ref name="GamesSolved"/>
| {{dunno}}, but in [[PSPACE]]; in [[P (complexity class)|P]] for certain dimensions<ref>{{
| last1 = Lachmann | first1 = Michael
| last2 = Moore | first2 = Cristopher
| last3 = Rapaport | first3 = Ivan
| editor-last = Nowakowski | editor-first = Richard
| contribution = Who wins Domineering on rectangular boards?
| isbn = 0-521-80832-4
| mr = 1973019
| pages = 307–315
| publisher = Cambridge University Press
| series = Mathematical Sciences Research Institute Publications
| title = More Games of No Chance: Proceedings of the 2nd Combinatorial Games Theory Workshop held in Berkeley, CA, July 24–28, 2000
| volume = 42
| year = 2002}}</ref>
|-
|[[Congkak]]
Line 135 ⟶ 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>
| | | issue = 4
| journal = [[ICGA Journal]]
| pages = 187–197
| title = Game over: Black to play and draw in checkers
| url = https://ticc.uvt.nl/icga/journal/contents/Schaeffer07-01-08.pdf
| archive-url = https://web.archive.org/web/20160403093928/https://ticc.uvt.nl/icga/journal/contents/Schaeffer07-01-08.pdf
| archive-date = 2016-04-03
| url-status = dead
| volume = 30
| year = 2007}}</ref>
|[[EXPTIME-complete]]<ref name="robson1984">{{cite journal | author = J. M. Robson | title = N by N checkers is Exptime complete | journal = [[SIAM Journal on Computing]] | volume = 13 | issue = 2 | pages = 252–267 | year = 1984 | doi = 10.1137/0213018}}</ref>
|-
Line 156 ⟶ 210:
|[[PSPACE-complete]]<ref name="Reisch1980"/>
|-
|[[Computer bridge|Double dummy bridge]]{{refn|group=nb|
|style="text-align:right;"|(52)
|style="text-align:right;"|<17
Line 163 ⟶ 217:
|style="text-align:right;"|5.6
||
|align="left"|PSPACE-complete<ref>{{cite conference
| last1 = Bonnet | first1 = Edouard
| last2 = Jamain | first2 = Florian
| last3 = Saffidine | first3 = Abdallah
| editor-last = Rossi | editor-first = Francesca
| contribution = On the complexity of trick-taking card games
| contribution-url = https://www.aaai.org/ocs/index.php/IJCAI/IJCAI13/paper/view/6920
| pages = 482–488
| publisher = IJCAI/AAAI
| title = IJCAI 2013, Proceedings of the 23rd International Joint Conference on Artificial Intelligence, Beijing, China, August 3-9, 2013
| year = 2013}}</ref>
|-
|[[Fanorona]]
Line 208 ⟶ 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<ref name=pebble>{{cite journal
| last1 = Kasai | first1 = Takumi
| last2 = Adachi | first2 = Akeo
| last3 = Iwata | first3 = Shigeki
| doi = 10.1137/0208046
| issue = 4
| journal = SIAM Journal on Computing
| mr = 573848
| pages = 574–586
| title = Classes of pebble games and complete problems
| volume = 8
| year = 1979}} Proves completeness of the generalization to arbitrary graphs.</ref>
|-
|[[Chinese checkers]] (6 sets)
Line 217 ⟶ 292:
|style="text-align:right;"|600
|style="text-align:right;"|<ref name=Bell_Halma/>
|[[EXPTIME]]-complete
|-
|[[Reversi]] (Othello)
Line 226 ⟶ 301:
|style="text-align:right;"|10
|style="text-align:right;"|<ref name="Allis1994"/>
|[[PSPACE-complete]]<ref>{{cite journal
| last1 = Iwata | first1 = Shigeki
| last2 = Kasai | first2 = Takumi
| doi = 10.1016/0304-3975(94)90131-7 | doi-access = free
| issue = 2
| journal = Theoretical Computer Science
| mr = 1256205
| pages = 329–340
| title = The Othello game on an <math>n\times n</math> board is PSPACE-complete
| volume = 123
| year = 1994}}</ref>
|-
|OnTop (2p base game)
Line 264 ⟶ 349:
|style="text-align:right;"|96
|style="text-align:right;"|<ref name="GamesSolved"/>
|[[PSPACE-complete]]<ref name="Reisch1980">{{cite journal | author = Stefan Reisch | title = Hex ist PSPACE-vollständig (Hex is PSPACE-complete) | journal = Acta Inform
|-
|[[Chess]]
Line 286 ⟶ 371:
}} Shannon gave estimates of 10<sup>43</sup> and 10<sup>120</sup> respectively, smaller than the upper bound in the table,
which is detailed in [[Shannon number]].</ref>
|[[EXPTIME-complete]] (without [[Fifty-move rule|50-move drawing rule]])<ref name="Fraenkel1981">{{
| last1 = Fraenkel | first1 = Aviezri S. |author1-link = Aviezri Fraenkel
| last2 = Lichtenstein | first2 = David
| doi = 10.1016/0097-3165(81)90016-9 | doi-access = free
| issue = 2
| journal = [[Journal of Combinatorial Theory, Series A]]
| mr = 629595
| pages = 199–214
| title = Computing a perfect strategy for <math>n\times n</math> chess requires time exponential in <math>n</math>
| volume = 31
| 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 294 ⟶ 389:
|style="text-align:right;"|
|style="text-align:right;"|70
|style="text-align:right;"|<ref name="Gual14">{{cite
| last1 = Gualà | first1 = Luciano
| last2 = Leucci | first2 = Stefano
| last3 = Natale | first3 = Emanuele
| arxiv = 1403.5830
| contribution = Bejeweled, Candy Crush and other match-three games are (NP-)hard
| doi = 10.1109/CIG.2014.6932866
| pages = 1–8
| publisher = IEEE
| title = 2014 IEEE Conference on Computational Intelligence and Games, CIG 2014, Dortmund, Germany, August 26-29, 2014
| year = 2014}}</ref>
|[[NP-hard]]
|-
Line 332 ⟶ 437:
|style="text-align:right;"|95
|style="text-align:right;"|38
|style="text-align:right;"|<ref name="Allis1994">{{cite thesis | author = Victor Allis | author-link = Victor Allis | year = 1994 | title = Searching for Solutions in Games and Artificial Intelligence | degree = Ph.D. |publisher= University of Limburg, Maastricht, The Netherlands | isbn = 90-900748-8-0 | url = https://project.dke.maastrichtuniversity.nl/games/files/phd/SearchingForSolutions.pdf}}</ref><ref name="Hsu2004">{{cite journal | author1 = Shi-Jim Yen, Jr-Chang Chen | author2 = Tai-Ning Yang | author3 = Shun-Chin Hsu | title = Computer Chinese Chess | date = March 2004 | journal = International Computer Games Association Journal | volume = 27 | issue = 1 | pages = 3–18 | url = http://www.csie.ndhu.edu.tw/~sjyen/Papers/2004CCC.pdf | url-status = dead | archive-url = https://web.archive.org/web/20070614111609/http://www.csie.ndhu.edu.tw/~sjyen/Papers/2004CCC.pdf | archive-date = 2007-06-14 | doi=10.3233/ICG-2004-27102 | s2cid = 10336286 }}</ref><ref name="Donghwi">{{cite arXiv | author = Donghwi Park | title = Space-state complexity of Korean chess and Chinese chess | eprint= 1507.06401| year = 2015| class = math.GM }}</ref>
| {{dunno}}, believed to be [[EXPTIME-complete]]
|-
Line 344 ⟶ 449:
|[[PSPACE-hard]], and in [[EXPTIME]]
|-
|[[Havannah (board game)|Havannah]]
|style="text-align:right;"|271
|style="text-align:right;"|127
Line 359 ⟶ 464:
|style="text-align:right;"|60
|style="text-align:right;"|452
|style="text-align:right;"|<ref name="Thesis_Moesker">{{cite thesis | title=
url = https://project.dke.maastrichtuniversity.nl/games/files/msc/Thesis_Moesker.pdf |
author = Kevin Moesker | year=2009 | publisher =
|style="text-align:right;"|
|-
Line 399 ⟶ 504:
|style="text-align:right;"|84
|style="text-align:right;"|374 or 299<ref>The lower branching factor is for the second player.</ref>
|style="text-align:right;"|<ref name="Kloetzer_themonte-carlo">{{cite conference
| last1 = Kloetzer | first1 = Julien
| last2 = Iida | first2 = Hiroyuki
| last3 = Bouzy | first3 = Bruno
| contribution = The Monte-Carlo approach in Amazons
| contribution-url = https://helios2.mi.parisdescartes.fr/~Bouzy/publications/KIB-MCAmazons-CGW07.pdf
| pages = 185–192
| title = Computer Games Workshop, Amsterdam, the Netherlands, 15-17 June 2007
| 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 419 ⟶ 532:
|style="text-align:right;"| <ref name="Schadd2010">{{cite thesis | author = F.C. Schadd | title = Monte-Carlo Search Techniques in the Modern Board Game Thurn and Taxis | year = 2009 | url =https://project.dke.maastrichtuniversity.nl/games/files/msc/Fschadd_thesis.pdf | publisher = Maastricht University| archive-url = https://web.archive.org/web/20210114164554/https://project.dke.maastrichtuniversity.nl/games/files/msc/Fschadd_thesis.pdf | archive-date = 2021-01-14 }}</ref>
|
|-
|[[Go (game)|Go (19x19)]]
|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>
|-
|[[Arimaa]]
Line 455 ⟶ 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
|-
|[[Magic: The Gathering]]
Line 463 ⟶ 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>{{
|[[NP-hardness|NP-hard]], unknown if [[PSPACE-complete]] with parametization
|}
Line 496 ⟶ 609:
[[Category:Combinatorial game theory]]
|