맨위로가기

게임 복잡도

"오늘의AI위키"는 AI 기술로 일관성 있고 체계적인 최신 지식을 제공하는 혁신 플랫폼입니다.
"오늘의AI위키"의 AI를 통해 더욱 풍부하고 폭넓은 지식 경험을 누리세요.

1. 개요

게임 복잡성은 게임의 난이도를 측정하는 척도로, 주 공간 복잡성, 게임 트리 크기, 의사결정 트리, 계산 복잡성 등 다양한 요소로 평가된다. 주 공간 복잡성은 도달 가능한 게임 위치의 경우의 수를 의미하며, 게임 트리 크기는 가능한 모든 게임 플레이의 경우의 수를 나타낸다. 의사결정 트리는 각 위치의 가치를 평가하는 데 사용되며, 계산 복잡성은 게임을 해결하는 데 필요한 자원과 시간을 나타낸다. 게임별 복잡성은 틱택토, 체스, 바둑 등 다양한 게임을 예시로 들어 상태 공간, 게임 트리, 평균 게임 길이, 분기 계수 등을 비교하여 설명한다.

더 읽어볼만한 페이지

  • 조합론적 게임 이론 - 젠가
    젠가는 54개의 나무 블록으로 타워를 쌓아 블록을 제거하고 위에 올려 타워를 무너뜨리지 않고 버티는 게임이며, 마지막으로 턴을 완료한 플레이어가 승리한다.
  • 조합론적 게임 이론 - 님 (게임)
    님은 여러 돌 더미에서 플레이어들이 번갈아 돌을 가져가는 수학 게임으로, 다양한 변형과 수학적 이론이 존재하며 마지막 돌을 가져가는 사람이 승리하거나 패배하는 방식으로 즐길 수 있다.
  • 게임 이론 - 대연정
    대연정은 의원내각제 또는 이원집정부제 국가에서 대립하는 거대 정당들이 국가적 위기 극복, 정치적 봉쇄, 또는 비례대표제 하의 연립 내각 구성의 필요에 따라 연합하는 정부 형태로, 정치적 안정과 국민 통합에 기여할 수 있지만 유권자 선택권 제한 및 소수 정당 약진의 우려도 있다.
  • 게임 이론 - 완전 정보
    완전 정보 게임은 게임 이론에서 모든 플레이어가 게임의 모든 정보를 공유하는 게임을 의미하며, 체스, 틱택토, 오목 등이 이에 해당한다.
게임 복잡도

2. 게임 복잡성 측정

게임의 복잡성은 다양한 방법으로 측정될 수 있다. 이 섹션에서는 게임 복잡성을 측정하는 몇 가지 방법에 대해 설명한다.

아래 표는 다양한 게임들의 복잡성을 나타낸다. 게임 복잡성이 크기 때문에 로그의 밑은 10을 사용한다.

게임보드 크기 (positions)상태 공간 복잡성 (log10)게임 트리의 복잡성 (log10)평균 게임 길이 (plies)분기 계수참조
틱택토93594
1538143.7
펜토미노6412181075[60] [61]
칼라14131850[60]
커넥트 포421321364[63] [64]
도미니어링 (8 × 8)641527308[60]
콩카141533|[60]
영미식 체커3220 or 1840702.8[63] [65] [66]
오와레121232603.5[63]
큐빅6430342054.2[63]
더블 더미 브리지(52)<17<40525.6
파노로나4521464411[68]
나인 멘스 모리스2410505010[63]
타블루트8127| |[69]
국제식 체커 (10x10)503054904[63]
차이니즈 체커 (2인용)12123| 180[70]
차이니즈 체커 (6인용)12178| 600[70]
오델로 (리버시)6428585810[63]
OnTop (2p base game)7288623123.77[71]
라인스 오브 액션6423644429[72]
오목 (15x15, 자유형)2251057030210[63]
헥스 (11x11)12157985096[60]
체스64441237035[73]
비주얼드 (8x8)64<50| 70[74]
GIPF37251329029.3[75]
육목3611721403046000[76]
백개먼282014455250[77]
샹치90401509538[63] [78] [79]
아발론61251548760[80] [81]
하바나27112715766240[60] [82]
트윅스트57214015960452[83]
장기904416010040[79]
쿼리도81421629160[84]
카르카손72>401957155[85]
아마존 (10x10)1004021284374 or 299[87] [88]
쇼기817122611592[78] [89]
Thurn and Taxis (2 player)336624056879[90]
바둑 (19x19)361170505211250[63] [91] [92] [93]
아리마64434029217281[94] [95] [96]
스트라테고9211553538121.739[97]
무한 체스무한무한무한무한무한[100]
매직 더 개더링무한언바운드됨언바운드됨무한무한[101]



하지만, 게임 규칙을 조금만 변경해도 복잡성 수치가 크게 바뀔 수 있다는 점을 유의해야 한다.

2. 1. 주 공간 복잡성

게임의 '''주 공간 복잡성'''은 게임을 처음 위치에서 시작했을 때 도달할 수 있는 합법적인 게임 위치의 수이다.[30] 게임을 계산하기 너무 어려울 때는 가끔 일부 속임수를 써서 상한을 계산할 수도 있는데, 이는 게임 과정에서 절대 일어날 수 없는 포지션을 의미한다.

2. 2. 게임 트리 크기

게임 트리 크기는 게임을 시작하여 나올 수 있는 모든 경우의 수를 나타내는 것으로, 게임의 초기 위치를 루트로 하는 게임 트리의 잎 노드 수이다.[1]

게임 트리는 일반적으로 상태 공간 크기보다 훨씬 크다. 동일한 위치가 서로 다른 순서로 움직여 여러 게임에서 발생할 수 있기 때문이다. 예를 들어, 틱택토 게임에서 보드에 X 두 개와 O 하나가 있는 위치는 첫 번째 X의 위치에 따라 두 가지 다른 방식으로 도달할 수 있다.[1] 게임 트리 크기의 상한은 게임 트리 크기를 증가시키는 방식으로(예: 불법적인 움직임을 허용) 게임을 단순화하여 계산할 수 있다.[1]

보드 크기 또는 위치 반복에 대한 규칙에 의해 이동 횟수가 제한되지 않는 게임의 경우, 게임 트리는 일반적으로 무한하다.[1]

2. 3. 의사결정 나무

의사결정 트리는 게임의 특정 상태에서 최적의 수를 찾기 위한 의사 결정 과정을 나타내는 트리 구조이다. 각 위치는 "플레이어 A 승리", "플레이어 B 승리", "무승부" 중 하나로 표시된다. 이는 그래프 내 다른 위치를 통해 해당 값을 증명할 수 있을 때(양측의 최적 플레이 가정)를 기준으로 한다.[1]

터미널 위치(게임의 최종 상태)는 바로 표시할 수 있다. 플레이어 A가 이동할 차례인 위치는 A에게 승리하는 다음 위치가 있으면 "플레이어 A 승리", 모든 다음 위치가 B에게 승리하면 "플레이어 B 승리", 모든 다음 위치가 무승부이거나 B에게 승리하면 "무승부"로 표시한다. B가 이동하는 위치도 이와 유사하게 적용된다.

2. 3. 1. 의사 결정 복잡성

게임의 초기 위치의 가치를 확립하는 최소 의사 결정 트리의 리프 노드 수이다.[1]

2. 3. 2. 게임 트리의 복잡성

게임의 '''트리 복잡성'''은 초기 위치의 가치를 결정하는 가장 작은 ''전체'' 너비 의사결정 트리의 리프 노드 수이다.[30] 전체 너비 트리는 각 깊이에 있는 모든 노드를 포함한다.

이것은 초기 위치의 값을 결정하기 위해 미니맥스 검색에서 평가해야 할 위치의 수에 대한 추정치이다.

게임 트리의 복잡성을 추정하기는 어렵지만, 일부 게임의 경우 게임의 평균 분기 계수 ''b''를 평균 게임의 수 ''d''만큼 거듭제곱하여 근사값을 구할 수 있다.

:GTC \geq b^d

2. 4. 계산 복잡성

게임의 '''계산 복잡성'''은 게임이 임의적으로 커질 때, 즉 빅 오 표기법이나 복잡도 클래스의 멤버십으로 표현될 때 나타나는 점증적 난이도를 설명한다. 이 개념은 특정 게임이 아니라, n-by-n 보드에서 게임을 함으로써 임의적으로 크게 만들 수 있도록 일반화된 게임들에 적용된다.

점증적 복잡성은 게임을 해결하기 위해 가장 효율적인 알고리즘에 의해 정의된다. 가장 일반적인 복잡성 측정(컴퓨팅 시간)은 가능한 모든 경우에 솔루션 알고리즘이 작동해야 하기 때문에 점증적 상태-공간 복잡성의 로그에 의해 항상 경계를 낮춘다. 그것은 게임 패밀리에 작용하는 어떤 특정한 알고리즘의 복잡성에 의해 상한선이 될 것이다. 유사한 언급이 두 번째로 일반적으로 사용되는 복잡성 측정치, 즉 계산에 사용되는 공간이나 컴퓨터 메모리의 양에도 적용된다. 알고리즘이 게임 상태를 저장할 필요가 없기 때문에 일반적인 게임의 공간 복잡성에 하한선이 있다는 것은 명백하지 않다. 그러나 관심 있는 많은 게임들은 PSPACE-hard로 알려져 있고, 그들의 공간 복잡성은 점증적 상태-공간 복잡성의 로그에 의해 하한선이 될 것이다.

  • 깊이 우선 미니맥스 전략은 전체 트리를 탐구해야 하기 때문에 게임의 트리-복잡성에 비례하는 계산 시간과 알고리즘이 가능한 각 이동 깊이에 트리의 한 노드를 항상 저장해야 하기 때문에 트리-복잡성의 로그에 메모리 다항식의 양이 사용되며, 그리고 가장 높은 이동 깊이에서 노드 수를 항상 저장해야 하기 때문이다.
  • 후진 귀납법은 각 가능한 위치에 대해 정확한 이동을 계산하고 기록해야 하므로 상태-공간 복잡성에 비례하는 메모리와 시간을 모두 사용한다.

3. 게임별 복잡성

게임보드 크기 (위치)상태 공간 복잡성
(log10)
게임 트리 복잡성
(log10)
평균 게임 길이
(플라이)
분기 계수참조
틱택토93594
1538143.7
펜토미노6412181075[60][61]
칼라14131850
커넥트 포421321364[63][64]
도미니어링 (8 × 8)641527308[60]
콩칵141533[60]
영미식 체커321840702.8[63][65][66]
오와레121232603.5
큐빅6430342054.2[63]
더블 더미 브리지(52)<17<40525.6
파노로나4521464411[68]
나인 멘스 모리스2410505010[63]
타불트8127[69]
국제식 체커 (10x10)503054904[63]
차이니즈 체커 (2인용)12123180[70]
차이니즈 체커 (6인용)12178600[70]
리버시 (오델로)6428585810[63]
OnTop (2p base game)7288623123.77[71]
라인스 오브 액션6423644429[72]
오목 (15x15, 자유형)2251057030210[63]
헥스 (11x11)12157985096[60]
체스64441237035[73]
비주얼드 (8x8)64<5070[74]
GIPF37251329029.3[75]
육목3611721403046000[76]
백개먼282014455250[77]
중국 장기90401509538[63][78][79]
아발론61251548760[80][81]
하바나27112715766240[60][82]
트윅스트57214015960452[83]
장기904416010040[79]
쿼리도81421629160[84]
카르카손72>401957155[85]
아마존 (10x10)1004021284374 또는 299[86][87][88]
쇼기817122611592[78][89]
Thurn_and_Taxis (2 player)336624056879[90]
바둑 (19x19)361170505211250[63][91][92][93]
아리마64434029217281[94][95][96]
스트라테고9211553538121.739[97]
무한 체스무한무한무한무한무한[100]
매직 더 개더링무한언바운드됨언바운드됨무한무한[101]


3. 1. 틱택토

틱택토는 3x3 크기의 보드에서 진행되는 게임으로, 가능한 상태의 상한은 39 = 19,683이다.[1][2] 하지만 이 중에는 5개의 X가 있고 O가 없는 경우나, 두 플레이어 모두 3개의 행을 가진 경우 등 불가능한 경우도 포함되어 있다. 이러한 불가능한 경우를 제외하면 5,478가지의 상태가 존재한다. 또한, 위치의 회전 및 반사를 고려하면 765개의 본질적으로 다른 위치만 남는다.

게임 트리를 살펴보면, 초기에는 9가지 가능한 이동이 있고, 그 다음에는 8가지 가능한 응답이 있는 등 최대 9! = 362,880개의 게임이 가능하다. 하지만 실제로는 9번 미만의 이동으로 게임이 끝날 수 있으므로, 가능한 게임은 255,168개이다. 여기서 위치의 회전 및 반사를 고려하면 26,830개의 가능한 게임만 남는다.

틱택토의 계산 복잡성은 일반화 방식에 따라 달라진다. 일반적인 ''m'',''n'',''k''-게임은 ''m'' x ''n'' 크기의 보드에서 진행되며, ''k''개를 연속으로 먼저 놓는 플레이어가 승리한다. 이 게임은 전체 게임 트리를 검색하여 DSPACE(''mn'')에서 해결할 수 있으며, 이는 PSPACE 복잡도 클래스에 해당한다. 더 나아가 PSPACE-완전 문제임이 밝혀졌다.[3]

3. 2. 차이니즈 체커

샹치|중국어 발음중국어에 대한 내용은 중국 장기 문서를 참고하고, Chinese Checkers|영어 발음영어에 대한 내용은 차이니즈 체커 문서를 참고하라.

주어진 소스에는 차이니즈 체커에 대한 내용이 없다. 따라서, 섹션 제목에 해당하는 내용을 작성할 수 없다.

참조

[1] 웹사이트 combinatorics - TicTacToe State Space Choose Calculation https://math.stackex[...] 2020-04-08
[2] 웹사이트 Btsan/generate_tictactoe https://github.com/B[...] 2018-10-20
[3] 논문 Gobang ist PSPACE-vollständig (Gobang is PSPACE-complete)
[4] 간행물 Computers and Games, Second International Conference, CG 2000, Hamamatsu, Japan, October 26-28, 2000, Revised Papers Springer
[5] 간행물 Games of No Chance: Papers from the Combinatorial Games Workshop held in Berkeley, CA, July 11–21, 1994 Cambridge University Press
[6] 문서 See van den Herik et al for rules.
[7] 웹사이트 John's Connect Four Playground https://tromp.github[...]
[8] 간행물 More Games of No Chance: Proceedings of the 2nd Combinatorial Games Theory Workshop held in Berkeley, CA, July 24–28, 2000 Cambridge University Press
[9] 논문 Games solved: Now and in the future
[10] 논문 Checkers is Solved 2007-07-06
[11] 논문 Game over: Black to play and draw in checkers https://ticc.uvt.nl/[...]
[12] 논문 N by N checkers is Exptime complete
[13] 문서 See Allis 1994 for rules
[14] 간행물 IJCAI 2013, Proceedings of the 23rd International Joint Conference on Artificial Intelligence, Beijing, China, August 3-9, 2013 IJCAI/AAAI
[15] 논문 Best Play in Fanorona leads to Draw https://dke.maastric[...]
[16] 웹사이트 An Upper Bound on the Complexity of Tablut http://ai.unibo.it/b[...] 2018
[17] 논문 The Shortest Game of Chinese Checkers and Related Problems
[18] 논문 Classes of pebble games and complete problems
[19] 논문 The Othello game on an n\times n board is PSPACE-complete
[20] 학위논문 Analysis and Implementation of the Game OnTop https://project.dke.[...] Maastricht University, Dept of Knowledge Engineering
[21] 학위논문 Informed Search in Complex Games https://dke.maastric[...] Maastricht University, Maastricht, The Netherlands
[22] 논문 Hex ist PSPACE-vollständig (Hex is PSPACE-complete)
[23] 논문 Programming a Computer for Playing Chess http://archive.compu[...]
[24] 논문 Computing a perfect strategy for n\times n chess requires time exponential in n
[25] 간행물 2014 IEEE Conference on Computational Intelligence and Games, CIG 2014, Dortmund, Germany, August 26-29, 2014 IEEE
[26] 학위논문 Analysis and Implementation of the game Gipf https://project.dke.[...] Maastricht University
[27] 서적 2009 Chinese Control and Decision Conference
[28] 논문 On the fairness and complexity of generalized k -in-a-row games http://dl.acm.org/ci[...] 2018-04-12
[29] 논문 Practical issues in temporal difference learning 1992-05-01
[30] 학위논문 Searching for Solutions in Games and Artificial Intelligence https://project.dke.[...] University of Limburg, Maastricht, The Netherlands
[31] 논문 Computer Chinese Chess http://www.csie.ndhu[...] 2004-03
[32] arXiv Space-state complexity of Korean chess and Chinese chess
[33] 웹사이트 Implementing a Computer Player for Abalone Using Alpha-Beta and Monte-Carlo Search https://project.dke.[...] Dept of Knowledge Engineering, Maastricht University 2012-03-29
[34] 학위논문 Pushy Computing: Complexity Theory and the Game Abalone Reed College
[35] 웹사이트 Creating a Havannah Playing Agent https://project.dke.[...] 2012-03-29
[36] arXiv Havannah and TwixT are PSPACE-complete 2014-03-25
[37] 학위논문 Txixt: Theory, Analysis, and Implementation https://project.dke.[...] Faculty of Humanities and Sciences of Maastricht University
[38] 학위논문 Mastering Quoridor http://hyperion.cs.w[...] University of New Mexico 2005-05
[39] 학위논문 Implementing a Computer Player for Carcassonne https://project.dke.[...] Maastricht University, Dept of Knowledge Engineering
[41] conference Computer Games Workshop, Amsterdam, the Netherlands, 15-17 June 2007
[42] 웹사이트 A Knowledge-Based Approach of the Game of Amazons https://project.dke.[...] Universiteit Maastricht, Institute for Knowledge and Agent Technology
[43] arXiv Amazons is PSPACE-complete 2005-02-02
[44] 저널 Computer shogi 2002-01
[45] 저널 Shogi on n × n board is complete in exponential time
[46] 학위논문 Monte-Carlo Search Techniques in the Modern Board Game Thurn and Taxis https://project.dke.[...] Maastricht University
[47] 웹사이트 Combinatorics of Go https://tromp.github[...]
[48] 웹사이트 Number of legal Go positions https://tromp.github[...]
[49] 웹사이트 Statistics on the length of a go game https://homepages.cw[...]
[50] 서적 Information Processing; Proceedings of IFIP Congress
[51] 웹사이트 Analysis and Implementation of the Game Arimaa https://project.dke.[...]
[52] 웹사이트 Move Ranking and Evaluation in the Game of Arimaa http://icosahedral.n[...]
[53] 웹사이트 A Look at the Arimaa Branching Factor http://arimaa.janzer[...]
[54] 학위논문 Competitive Play in Stratego https://project.dke.[...] Maastricht
[55] arXiv Transfinite game values in infinite chess
[56] 저널 The mate-in-n problem of infinite chess is decidable
[57] arXiv Magic: the Gathering is Turing Complete
[58] arXiv Magic: the Gathering is as Hard as Arithmetic
[59] arXiv Wordle is NP-hard 2022-05-14
[60] 저널 Games solved: Now and in the future
[61] 문서 Hilarie K. Orman: ''Pentominoes: A First Player Win'' in ''[http://www.msri.org/publications/books/Book29/contents.html Games of no chance]'', MSRI Publications – Volume 29, 1996, pages 339-344. Online: [http://www.msri.org/publications/books/Book29/files/orman.pdf pdf].
[63] 학위논문 Searching for Solutions in Games and Artificial Intelligence https://project.dke.[...] University of Limburg, Maastricht, The Netherlands
[64] 웹인용 John's Connect Four Playground https://tromp.github[...]
[65] 저널 Checkers is Solved 2007-07-06
[66] 간행물 Game over: Black to play and draw in checkers
[68] 저널 Best Play in Fanorona leads to Draw https://dke.maastric[...]
[69] 웹인용 An Upper Bound on the Complexity of Tablut http://ai.unibo.it/b[...] 2018
[70] 저널 The Shortest Game of Chinese Checkers and Related Problems http://emis.ams.org 2021-06-26
[71] 학위논문 Analysis and Implementation of the Game OnTop https://project.dke.[...] Maastricht University, Dept of Knowledge Engineering
[72] 학위논문 Informed Search in Complex Games https://dke.maastric[...] Maastricht University, Maastricht, The Netherlands
[73] 저널 Programming a Computer for Playing Chess http://archive.compu[...]
[74] ArXiv Bejeweled, Candy Crush and other Match-Three Games are (NP-)Hard
[75] 학위논문 Analysis and Implementation of the game Gipf https://project.dke.[...] Maastricht University
[76] 서적 2009 Chinese Control and Decision Conference
[77] 저널 Practical issues in temporal difference learning 1992-05-01
[78] 저널 Computer Chinese Chess http://www.csie.ndhu[...] 2004-03
[79] ArXiv Space-state complexity of Korean chess and Chinese chess
[80] 웹인용 Implementing a Computer Player for Abalone Using Alpha-Beta and Monte-Carlo Search https://project.dke.[...] Dept of Knowledge Engineering, Maastricht University 2012-03-29
[81] 학위논문 Pushy Computing: Complexity Theory and the Game Abalone Reed College
[82] 웹인용 Creating a Havannah Playing Agent https://project.dke.[...] 2012-03-29
[83] 학위논문 TWIXT: THEORY, ANALYSIS AND IMPLEMENTATION https://project.dke.[...] Maastricht University, Faculty of Humanities and Sciences of Maastricht University
[84] 학위논문 Mastering Quoridor http://hyperion.cs.w[...] University of New Mexico 2005-05
[85] 학위논문 Implementing a Computer Player for Carcassonne https://project.dke.[...] Maastricht University, Dept of Knowledge Engineering
[86] 문서 The lower branching factor is for the second player.
[87] 인용 The Monte-Carlo Approach in Amazons
[88] 웹인용 A Knowledge-Based Approach of the Game of Amazons https://project.dke.[...] Universiteit Maastricht, Institute for Knowledge and Agent Technology
[89] 저널 Computer shogi 2002-01
[90] 학위논문 Monte-Carlo Search Techniques in the Modern Board Game Thurn and Taxis https://project.dke.[...] Maastricht University
[91] 웹인용 Combinatorics of Go https://tromp.github[...]
[92] 웹인용 Number of legal Go positions https://tromp.github[...]
[93] 웹인용 Statistics on the length of a go game https://homepages.cw[...]
[94] 웹인용 Analysis and Implementation of the Game Arimaa https://project.dke.[...]
[95] 웹인용 Move Ranking and Evaluation in the Game of Arimaa http://icosahedral.n[...]
[96] 웹인용 A Look at the Arimaa Branching Factor http://arimaa.janzer[...]
[97] 학위논문 Competitive Play in Stratego https://project.dke.[...] Maastricht
[98] 웹사이트 Chess on an Infinite Plane http://www.chessvari[...]
[99] 웹사이트 Trappist-1 http://www.chessvari[...]
[100] ArXiv Transfinite game values in infinite chess
[101] 저널 Magic: the Gathering is Turing Complete https://arxiv.org/pd[...]



본 사이트는 AI가 위키백과와 뉴스 기사,정부 간행물,학술 논문등을 바탕으로 정보를 가공하여 제공하는 백과사전형 서비스입니다.
모든 문서는 AI에 의해 자동 생성되며, CC BY-SA 4.0 라이선스에 따라 이용할 수 있습니다.
하지만, 위키백과나 뉴스 기사 자체에 오류, 부정확한 정보, 또는 가짜 뉴스가 포함될 수 있으며, AI는 이러한 내용을 완벽하게 걸러내지 못할 수 있습니다.
따라서 제공되는 정보에 일부 오류나 편향이 있을 수 있으므로, 중요한 정보는 반드시 다른 출처를 통해 교차 검증하시기 바랍니다.

문의하기 : help@durumis.com