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 0=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:

   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. Each of these games lasts for 207*(2^155-1) moves.

ilan: In fact, E does not have to be connected for this to work, which is good, since I believe that it cannot be connected and satisfy the criteria of condition 1).

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?

Alexandre: If you can solve the problem above, then not only are you able to "solve" the game of go, you also have the best player never created, i.e. an algorithm for KamiNoItte Whatever, the number of "final board positions" is completly subjective and is almost infinite...

Ex : the master play the first stone and his opponent resign.

Almost every position may be considered final.

If you then consider the order the moves where played (same position but different games) you can multiply this number...

So what ? We are playing a game with a number of position n times greater than the number of particles in the whole universe (and n is a super very huge number )... great !

Now, let's play in order to get a number smaller : our level in kyu (or for players in dan, the number of handicap stones to the best player around)


Jacques: In the FunGoFacts page, the sentence "It is believed there are more possible game variations than atoms in the universe" leads to this discussion.

This is not only a belief but a trivial fact, even if we limit the game to less than 40 moves.

The mass of universe is equivalent to the weight of 4e78 hydrogen atoms. (Search google, and find somthing like: [ext] http://www.sunspot.noao.edu/sunspot/pr/answerbook/universe.html) Lets assume 4e78 as an upper bound for the numer of atoms. The number of games, specially on an empty board, is well approached by permutation(361, n).

Meaning: The first player has 361 (=19x19) possible moves, the second has 360, then 359, 358, and so on. The number of games can be approached by 361x360x359x? ... x(362-n) (for n moves). This number is just an approximation, because there may be more (when captured stones are removed) or less (because suicide and Ko recapturing is not allowed), but in the first moves of a game, it is a very good approximation. PERM(361,30) = 1.5e76, PERM(361,31) = 5.1e78, PERM(361,32) = 1.6e81

So the sentence should be:

It is a FACT that the number of atoms in the universe is smaller than the possible variations IN THE FIRST 32 MOVES of a 19x19 Go game. (If it's not 32, its very close to 32.)

Pashley It goes up a bit slower if you take symmetry into account. For the first move, the possiblities are

  • one on tengen
  • 36 elsewhere on diagonals
  • 36 elsewhere on 10,n lines
  • 288 not on either.

However there are only 9 unique moves on diagonals (because, for example, you can play 44 in any corner), and 9 on 10,n lines (for example, 10,3 on any side). For the other 288 moves, divide by 8 for symmetry (for example 35 or 53 in any corner), so only 36 unique moves.

Allowing for symmetry, then, there are only 1 + 18 + 36 = 55 unique opening moves.

Anonymous: Yes, bu this luxury can only be afforded to the first move, however, for the second move there are 360 possible positions, i.e.:

[Diagram]

Move 2

This is much different than:

[Diagram]

Move 2

Centaur: No, if the first move was on a symmetrical point, the number of possibilities for the second move is smaller, depending on the kind of symmetry.

1 at tengen: 9 distinct possibilities on diagonals, 9 distinct possibilities on 10-lines, and 36 possibilities in asymmetrical points = 54 possibilities for 2

1 at diagonal or 10-line except tengen: 18 distinct possibilities on the same diagonal or 10-line, and 171 possibilities elsewhere = 189 possibilities.

1 at asymmetrical point: 2 anywhere on the board = 360 possibilities

After that, depending on the moves the opponents take, there may be other symmetrical positions where the next move is essentially halved or quartered or divided by 8.

Tas: Great divide the number of possible games by a billion, or a quadrillion if you like... it doesn't matter.


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) 2007 the Authors, published under the OpenContent License V1.0.
[Welcome to Sensei's Library!]
StartingPoints
ReferenceSection
About