[Welcome to Sensei's Library!]

StartingPoints
ReferenceSection
About


Paths
Speculation

 

Number Of Possible Outcomes of a Game
Path: Speculation   · Prev: GoAndEconomics   · Next:
    Keywords: Theory

MarkD: Moved from the Sandbox page.


MEIJIN TOUYA: Hey, just wondering (I can't think of anywhere else to ask this), but can you give me a number in scientific notation that expresses the number of possible outcomes of a game? I remember it's really huge, and one guy said that there was more possible outcomes than the number of molecules in the known universe. Can anyone give me a formula for this? :) Thanks

Confused: For a game there are only a few possible outcomes:

  • White wins
  • Black wins
  • Jigo - depending on the rules
  • No Result - depending on the rules

If you want to split it down further, you can give the reason why a player wins and by how much. This would probably add another few hundred possible outcomes like:

  • ... wins by resignation
  • ... wins on time
  • ... wins by 0.5 point
  • ... wins by 1 point
  • ... wins by 1.5 points
  • etc.

For some rules without a way to deal with superko this list may be infinite, although there's probably no practical use for that gem of knowledge.

The question how many legal positions are there is a lot harder. The absolute upper limit is 3^361 which is roughly 10^172. Quite a lot of these positions are illegal, so the real number is smaller, but finding a good estimate on how much smaller isn't trivial.

Scryer: If a sizeable fraction of these positions are legal, we could get an estimate by randomly spraying B/W/empty on a board and checking the result to see whether it's a legal position, repeating as long as we have patience for it. There's no a priori reason to think the overall proportion would be different from a random sample, is there?

Scryer: I went ahead and did this experiment today (7 Aug 2003). On a 19x19 board with the me randomly assigned to white, black or empty, in my first run 1.18% of 260,000 positions were legal (that is, no stones of either side were totally surrounded). In my second run, 1.22% of 620,000 positions were legal. In my third run, 1.195% of 45,500,000 were legal. I submit that this constitutes some evidence that the actual number of legal positions is near 10^170 -- much greater than the estimated number of particles in the universe (assuming it's finite) even including zero-mass particles such as photons and (if they're really zero-mass) neutrinos. For comparison, my program claims about 48% of 5x5 positions are legal, 24% of 9x9 positions are legal, and 9% of 13x13 positions are legal. I also checked 2x2 by hand: of the 81 possible positions, 57 are legal, and can be reached in actual play (e.g. a1, pass, a2, pass, b1, pass, pass). This matches the 0.704 value the program claims.

Check out Maximum Number Of Live Groups for another 'ultimate' question...

Imperator?: "On a 19x19 board, there are about 4.63x10^170 possible positions and about 10^360 possible games. (By contrast, the number of legal positions in chess is estimated to be between 10^43 and 10^50, and physicists estimate that there are not more than 10^90 protons in the entire universe.)" from the [ext] Wikipedia

Scryer: The number of possible positions given in this article is certainly the same order of magnitude of my estimate, which is 3.39x10^170 possible positions. I'm confident of at least two digits of accuracy in my estimate given my assumptions above, but I don't know what assumptions the Wikipedia author has made. I think my assumptions (that there are no captured pieces on the board) should correctly reflect the number of possible positions, but I'm willing to listen to reason. In any case, the numbers are close enough and big enough that it doesn't make a difference.

John Tromp On October 13, 1999, I posted the following in a rec.games.go thread on "Number of Legal Go Positions."

my program gives the following counts:

  • 1x1: 1 legal, 2 illegal, prob 0.333333
  • 2x2: 57 legal, 24 illegal, prob 0.703704
  • 3x3: 12675 legal, 7008 illegal, prob 0.643957
  • 4x4: 24318165 legal, 18728556 illegal, prob 0.564925
  • 4x5: 1840058693 legal, 1646725708 illegal, prob 0.527724

anything larger requires approximation:

  • 9x9: prob 0.235
  • 13x13: prob 0.087
  • 19x19: prob 0.012

(the C programs are available on request)

John Tromp Earlier in 1999, in a thread on "Math and Go", I found a lower bound on the number of possible legal games in Go on 19x19:

1) Partition the board in three sets B,W,E with the properties

   |B|=|W|=103, |E|=155, each set is connected, and each point in E
   is adjacent to both B and W.

2) consider all N=2^155 subsets of Black stones on E, and order them

   in a sequence S_0,S_1,...,S_{N-1} such that every two consecutive
   subset differ by only one Black stone (eg take your standard 155 bit
   Gray code).

3) a game can now be played as follows:

   black plays on all of B in one of 103! ways and occupies S_0 on E,
   while white passes.
   for i=1 to N-1 do
     if |S_i| = |S_{i-1}| + 1 then black plays to S_i
     else  // it must be that |S_i| = |S_{i-1}| - 1
       white plays on all of W in one of 103! ways and occupies
       E \ S_i, thereby capturing all of black, while black passes
       white plays on the point S_{i-1} \ S_i
       black plays on all of B in one of 103! ways and occupies S_i on E,
       thereby capturing all of white, while white passes
     endif

4) no position is ever repeated

Note that |S_i| = |S_{i-1}| - 1 can be chosen to hold half the N times, and each of these gives 103!^2 choices. The number of possible games on 19x19 is therefore > 103!^2^155 > 2^2^164.

ALGA : There is a french article at Quebec go association web site :

            [ext] http://www.fqjr.qc.ca/go/chroniquesRQ/Nombres.pdf

He compares chess and go...

Scryer: There's a thread in rec.games.go (2003-08) about the possibility that quantum computers can sort out the whole lot, no matter how big the numbers are. I haven't studied quantum computers in general, but in my field (cryptography) they aren't magic in this way: it's expected that a suitably large quantum computer could dramatically reduce the level of effort in factoring numbers, to the point where one would need to double the size of keys to get the same level of protection... which is, of course, straightforward. I believe there's currently a project afoot that will (with considerable expense and hardware) allow the researchers to factor any 4-bit number, including 15! I think it unlikely that magic will ever be able to cut through the difficulties of brute forcing go.


Anonymous: I don't think "number of possible outcomes" has been defined yet. How about defining "final board positions".

  • the best move would be pass for either player, if it were their turn
  • there are no dead stones on the board (you may want to relax this condition)
  • all the dame are filled in (you may want to relax this condition)
  • what scoring rule and ko rule is being applied? (this probably affects the answer)

Are there any other conditions that should be added?



Path: Speculation   · Prev: GoAndEconomics   · Next:
This is a copy of the living page "Number Of Possible Outcomes of a Game" at Sensei's Library.
(OC) 2004 the Authors, published under the OpenContent License V1.0.