Content deleted Content added
Citation bot (talk | contribs) Removed access-date with no URL. | Use this bot. Report bugs. | Suggested by Mako001 | Linked from User:Mako001/access-date | #UCB_webform_linked 5/118 |
m Reverted 1 edit by 2401:D800:B4:30E9:A7A9:79A9:75AC:EDC7 (talk) to last revision by Remsense |
||
(48 intermediate revisions by 29 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 67 ⟶ 73:
|-
|[[Tic-tac-toe]]
|style="text-align:right;"|9
|style="text-align:right;"|3
|style="text-align:right;"|5
|style="text-align:right;"|9
|style="text-align:right;"|4
|style="text-align:right;"|
|[[PSPACE-complete]]<ref name="Reisch1980"/>
|-
|[[Sim (pencil game)|Sim]]
|style="text-align:right;"|15
|style="text-align:right;"|3
|style="text-align:right;"|8
|style="text-align:right;"|14
|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
|style="text-align:right;"|64
|style="text-align:right;"|12
|style="text-align:right;"|18
|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]]
|-
|[[Kalah]]<ref>See van den Herik et al for rules.</ref>
|style="text-align:right;"|14
|style="text-align:right;"|13
|style="text-align:right;"|18
|style="text-align:right;"|
|style="text-align:right;"|50
|
|Generalization is unclear
|-
|[[Connect Four]]
|style="text-align:right;"|42
|style="text-align:right;"|13
|style="text-align:right;"|21
|style="text-align:right;"|36
|style="text-align:right;"|4
|
| {{dunno}}, but in [[PSPACE]]
|-
|[[Domineering]] (8 × 8)
|style="text-align:right;"|64
|style="text-align:right;"|15
|style="text-align:right;"|27
|style="text-align:right;"|30
|style="text-align:right;"|8
|
| {{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]]
|style="text-align:right;"|14
|style="text-align:right;"|15
|style="text-align:right;"|33
|style="text-align:right;"|
|style="text-align:right;"|
|
|
|-
|[[English draughts|English draughts (8x8) (checkers)]]
|style="text-align:right;"|32
|
|style="text-align:right;"|40
|style="text-align:right;"|70
|style="text-align:right;"|2.8
|
| last = Schaeffer | first = Jonathan
| doi = 10.3233/ICG-2007-30402
| 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>
|-
|[[Oware|Awari]]<ref>See Allis 1994 for rules</ref>
|style="text-align:right;"|12
|style="text-align:right;"|12
|style="text-align:right;"|32
|style="text-align:right;"|60
|style="text-align:right;"|3.5
|
|Generalization is unclear
|-
|[[Qubic]]
|style="text-align:right;"|64
|style="text-align:right;"|30
|style="text-align:right;"|34
|style="text-align:right;"|20
|style="text-align:right;"|54.2
|
|[[PSPACE-complete]]<ref name="Reisch1980"/>
|-
|[[Computer bridge|Double dummy bridge]]{{refn|group=nb|
|style="text-align:right;"|(52)
|style="text-align:right;"|<17
|style="text-align:right;"|<40
|style="text-align:right;"|52
|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]]
|style="text-align:right;"|45
|style="text-align:right;"|21
|style="text-align:right;"|46
|style="text-align:right;"|44
|style="text-align:right;"|11
|
| {{dunno}}, but in [[EXPTIME]]
|-
|[[Nine men's morris]]
|style="text-align:right;"|24
|style="text-align:right;"|10
|style="text-align:right;"|50
|style="text-align:right;"|50
|style="text-align:right;"|10
|
| {{dunno}}, but in [[EXPTIME]]
|-
|[[Tablut]]
|style="text-align:right;"|81
|style="text-align:right;"|27
|style="text-align:right;"|
|style="text-align:right;"|
|style="text-align:right;"|
|
|
|-
|[[International draughts|International draughts (10x10)]]
|style="text-align:right;"|50
|style="text-align:right;"|30
|style="text-align:right;"|54
|style="text-align:right;"|90
|style="text-align:right;"|4
|
|[[EXPTIME-complete]]<ref name="robson1984"/>
|-
|[[Chinese checkers]] (2 sets)
|style="text-align:right;"|121
|style="text-align:right;"|23
|style="text-align:right;"|
|style="text-align:right;"|
|style="text-align:right;"|180
|
|[[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)
|style="text-align:right;"|121
|style="text-align:right;"|78
|style="text-align:right;"|
|style="text-align:right;"|
|style="text-align:right;"|600
|
|[[EXPTIME]]-complete
|-
|[[Reversi]] (Othello)
|style="text-align:right;"|64
|style="text-align:right;"|28
|style="text-align:right;"|58
|style="text-align:right;"|58
|style="text-align:right;"|10
|
|[[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)
|style="text-align:right;"|72
|style="text-align:right;"|88
|style="text-align:right;"|62
|style="text-align:right;"|31
|
|
url = https://project.dke.maastrichtuniversity.nl/games/files/msc/Briesemeister_Thesis.pdf |
author = Robert Briesemeister | year=2009 | publisher = Maastricht University, Dept of Knowledge Engineering }}</ref>
Line 240 ⟶ 325:
|-
|[[Lines of Action]]
|style="text-align:right;"|64
|style="text-align:right;"|23
|style="text-align:right;"|64
|style="text-align:right;"|44
|style="text-align:right;"|29
|
| {{dunno}}, but in [[EXPTIME]]
|-
|[[Gomoku]] (15x15, freestyle)
|style="text-align:right;"|225
|style="text-align:right;"|105
|style="text-align:right;"|70
|style="text-align:right;"|30
|style="text-align:right;"|210
|
|[[PSPACE-complete]]<ref name="Reisch1980"/>
|-
|[[Hex (board game)|Hex (11x11)]]
|style="text-align:right;"|121
|style="text-align:right;"|57
|style="text-align:right;"|98
|style="text-align:right;"|50
|style="text-align:right;"|96
|
|[[PSPACE-complete]]<ref name="Reisch1980">{{cite journal | author = Stefan Reisch | title = Hex ist PSPACE-vollständig (Hex is PSPACE-complete) | journal = Acta Inform
|-
|[[Chess]]
|style="text-align:right;"|64
|style="text-align:right;"|44
|style="text-align:right;"|123
|style="text-align:right;"|70
|style="text-align:right;"|35
|
|author=Claude Shannon
|author-link=Claude Shannon
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
|style="text-align:right;"|
|style="text-align:right;"|
|style="text-align:right;"|70
|style="text-align:right;"|<ref name="Gual14">{{cite conference
| 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]]
|-
|[[GIPF (game)|GIPF]]
|style="text-align:right;"|37
|style="text-align:right;"|25
|style="text-align:right;"|132
|style="text-align:right;"|90
|style="text-align:right;"|29.3
|
url = https://project.dke.maastrichtuniversity.nl/games/files/msc/Wentink_thesis.pdf |
author = Diederik Wentink | year=2001 | publisher = Maastricht University}}</ref>
|style="text-align:right;"|
|-
|[[Connect6]]
|style="text-align:right;"|361
|style="text-align:right;"|172
|style="text-align:right;"|140
|style="text-align:right;"|30
|
|
|[[PSPACE|PSPACE-complete]]<ref>{{cite journal|url=http://dl.acm.org/citation.cfm?id=1290195.1290250|title=On the fairness and complexity of generalized k -in-a-row games|first1=Ming Yu|last1=Hsieh|first2=Shi-Chun|last2=Tsai|date=1 October 2007|journal=Theoretical Computer Science|volume=385|issue=1–3|pages=88–100|access-date=12 April 2018|via=dl.acm.org|doi=10.1016/j.tcs.2007.05.031|doi-access=free}}</ref>
|-
|[[Backgammon]]
|style="text-align:right;"|28
|style="text-align:right;"|20
|style="text-align:right;"|144
|style="text-align:right;"|55
|style="text-align:right;"|250
|
|Generalization is unclear
|-
|[[Xiangqi]]
|style="text-align:right;"|90
|style="text-align:right;"|40
|style="text-align:right;"|150
|style="text-align:right;"|95
|style="text-align:right;"|38
|
| {{dunno}}, believed to be [[EXPTIME-complete]]
|-
|[[Abalone (board game)|Abalone]]
|style="text-align:right;"|61
|style="text-align:right;"|25
|style="text-align:right;"|154
|style="text-align:right;"|87
|style="text-align:right;"|60
|
|[[PSPACE-hard]], and in [[EXPTIME]]
|-
|[[Havannah (board game)|Havannah]]
|style="text-align:right;"|271
|style="text-align:right;"|127
|style="text-align:right;"|157
|style="text-align:right;"|66
|style="text-align:right;"|240
|
|[[PSPACE-complete]]<ref>{{cite arXiv |author1=E. Bonnet |author2=F. Jamain |author3=A. Saffidine | title = Havannah and TwixT are PSPACE-complete | date = 2014-03-25 | eprint = 1403.6518 | class = cs.CC}}</ref>
|-
|[[TwixT|Twixt]]
|style="text-align:right;"|572
|style="text-align:right;"|140
|style="text-align:right;"|159
|style="text-align:right;"|60
|style="text-align:right;"|452
|
url = https://project.dke.maastrichtuniversity.nl/games/files/msc/Thesis_Moesker.pdf |
author = Kevin Moesker | year=2009 | publisher =
|style="text-align:right;"|
|-
|[[Janggi]]
|style="text-align:right;"|90
|style="text-align:right;"|44
|style="text-align:right;"|160
|style="text-align:right;"|100
|style="text-align:right;"|40
|
| {{dunno}}, believed to be [[EXPTIME-complete]]
|-
|[[Quoridor]]
|style="text-align:right;"|81
|style="text-align:right;"|42
|style="text-align:right;"|162
|style="text-align:right;"|91
|style="text-align:right;"|60
|
| {{dunno}}, but in [[PSPACE]]
|-
|[[Carcassonne (board game)|Carcassonne]] (2p base game)
|style="text-align:right;"|72
|style="text-align:right;"|>40
|style="text-align:right;"|195
|style="text-align:right;"|71
|style="text-align:right;"|55
|
url = https://project.dke.maastrichtuniversity.nl/games/files/msc/MasterThesisCarcassonne.pdf |
author = Cathleen Heyden | year=2009 | publisher = Maastricht University, Dept of Knowledge Engineering }}</ref>
Line 394 ⟶ 499:
|-
|[[Game of the Amazons|Amazons (10x10)]]
|style="text-align:right;"|100
|style="text-align:right;"|40
|style="text-align:right;"|212
|style="text-align:right;"|84
|
|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]]
|style="text-align:right;"|81
|style="text-align:right;"|71
|style="text-align:right;"|226
|style="text-align:right;"|115
|style="text-align:right;"|92
|
|[[EXPTIME-complete]]<ref>{{cite journal |author1=H. Adachi |author2=H. Kamekawa |author3=S. Iwata | title = Shogi on n × n board is complete in exponential time | journal = Trans. IEICE | volume= J70-D | pages = 1843–1852 | year = 1987}}</ref>
|-
|[[Thurn and Taxis (board game)|Thurn and Taxis]] (2 player)
|style="text-align:right;"|33
|style="text-align:right;"|66
|style="text-align:right;"|240
|style="text-align:right;"|56
|style="text-align:right;"|879
|
|
|-
|[[Go (game)|Go (19x19)]]
|style="text-align:right;"|361
|style="text-align:right;"|170
|style="text-align:right;"|505
|style="text-align:right;"|211
|style="text-align:right;"|250
|
<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]]
|style="text-align:right;"|64
|style="text-align:right;"|43
|style="text-align:right;"|402
|style="text-align:right;"|92
|
|
| {{dunno}}, but in [[EXPTIME]]
|-
|[[Stratego]]
|style="text-align:right;"|92
|style="text-align:right;"|115
|style="text-align:right;"|535
|style="text-align:right;"|381
|
|
|style="text-align:right;"|
|-
|[[Infinite chess]]
|
|
|
|
|
|
|{{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:
|style="text-align:right;"|
|style="text-align:right;"|
|style="text-align:right;"|
|style="text-align:right;"|
|style="text-align:right;"|
|
|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 488 ⟶ 609:
[[Category:Combinatorial game theory]]
|