Slashdot Mirror


Finally Calculated: All the Legal Positions In a 19x19 Game of Go (github.io)

Reader John Tromp points to an explanation posted at GitHub of a computational challenge Tromp coordinated that makes a nice companion to the recent discovery of a 22 million-digit Mersenne prime. A distributed effort using pooled computers from two centers at Princeton, and more contributed from the HP Helion cloud, after "many hiccups and a few catastrophes" calculated the number of legal positions in a 19x19 game of Go. Simple as Go board layout is, the permutations allowed by the rules are anything but simple to calculate: "For running an L19 job, a beefy server with 15TB of fast scratch diskspace, 8 to 16 cores, and 192GB of RAM, is recommended. Expect a few months of running time." More: Large numbers have a way of popping up in the game of Go. Few people believe that a tiny 2x2 Go board allows for more than a few hundred games. Yet 2x2 games number not in the hundreds, nor in the thousands, nor even in the millions. They number in the hundreds of billions! 386356909593 to be precise. Things only get crazier as you go up in boardsize. A lower bound of 10^{10^48} on the number of 19x19 games, as proved in our paper, was recently improved to a googolplex. (For anyone who wants to double check his work, Tromp has posted as open source the software used.)

28 of 117 comments (clear)

  1. Is it solved then? by menkhaura · · Score: 4, Interesting

    Can we consider the traditional game of Go solved, then? And how about chess, what about calculating 32-piece EGTBs?

    --
    Stupidity is an equal opportunity striker.
    Fellow slashdotter Bill Dog
    1. Re:Is it solved then? by Anonymous Coward · · Score: 4, Informative

      This is a count of legal[1] positions, or how many games you can end up with.

      A "solved" game would be one with efficient real-time evaluation of the next "winning moves", which is entirely a different job.

      [1] That should also depend on the regional rule variation. A legal move by the Chinese rule may not be one by the Korean rule.

    2. Re:Is it solved then? by Anonymous Coward · · Score: 2, Insightful

      No- they computed what all the possible boards are. "Solving" Go would involve finding an optimal move for each of those possible boards, which is much harder.

    3. Re:Is it solved then? by ledow · · Score: 4, Informative

      Do you realise how big a number 10^(10^48) actually is?

      The bit in brackets has 48 digits (say 47 zeroes after a number). Then the total is actually THAT NUMBER of digits.

      10^48 = 100000000000000000000000000000000000000000000000

      10^(10^48) has ^^^^^^ that many decimal digits in it's expression.

      For reference, Giga is 10^9. Tera is 10^12. Exa is 10^18.

      And THIS number, has 10^48 DIGITS when you say how big it is. It would take more than the storage of the world to write out how big that number was.

    4. Re:Is it solved then? by Megane · · Score: 4, Insightful

      It's like asking for the Answer to the Ultimate Question of Life, the Universe, and Everything, getting an answer of "42", then realizing you didn't actually know what the question was.

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    5. Re:Is it solved then? by Anonymous Coward · · Score: 2, Insightful

      A solution for Go would involve creating a directed graph, with cycles allowed. The result found in this article is the number of nodes in this graph. The edges in the graph would be legal moves, moving from one legal board configuration to another.

      You would have to additionally label each node in the graph with the scoring value of that position for each player, if the players agreed to end the game at that position. (The game of go does not have an explicit winning goal like "checkmate" in chess, rather the players agree that any more moves are pointless, and then count their territory.) It would probably also be a good idea to have a label for a position not being a reasonable place to end a game.

      Each edge (move) would also have to be labelled with the number of captured stones.

      Counting the number of legal games (with no handicap) would be counting all possible non-cyclic paths through the graph, starting from the blank board node, going to every position where it would be reasonable to end the game in. For each path, count the number of captures for each player, and add those + handicap/komi to the territory values of the position. Then you can determine who the winner is for that game.

      The number of edges required in that game graph is likely many times larger than the number of nodes. I would rather not think about the number of paths.

    6. Re:Is it solved then? by SuricouRaven · · Score: 4, Insightful

      This does not solve Go. It does make it possible to estimate how feasible solving Go is: Roughly how many universe-lifetimes will it take for your computer to calculate the next move?

    7. Re: Is it solved then? by Anonymous Coward · · Score: 2, Interesting

      If you could envision the complete Graham's number your head would literally turn into a black hole (Numberphile).

    8. Re:Is it solved then? by Vermonter · · Score: 2

      While some rule sets may allow for moves that are illegal in other sets (such as playing a suicide move), after all captured stones are removed from the board, the remaining position will be legal in all rule sets.

    9. Re:Is it solved then? by johntromp · · Score: 4, Informative

      The notion of legal position namely "every group of connected stones of the same color having an empty point adjacent to it" is NOT dependent on any particular choice of go rules.

      Only legality of moves is...

    10. Re:Is it solved then? by Impy+the+Impiuos+Imp · · Score: 2

      A long time ago, I read that a universe jammed with subatomic particle-sized computing components, about 10^^120 (for solid neutrons), running for the age of the universe at the speed of light, couldn't come close to playing a perfect game of chess, which has many powers fewer moves to consider.

      --
      (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
    11. Re: Is it solved then? by johntromp · · Score: 2

      You mean 3^(19*19), a MUCH bigger number.

    12. Re: Is it solved then? by camperdave · · Score: 2

      I don't know the game of Go, but it seems to me that the first player has four choices of where to put her stone. The second player has three, the first two, and the last one is forced. That's 4! or 24 possibilities, not millions or billions.

      --
      When our name is on the back of your car, we're behind you all the way!
  2. Re: 2x2 board by Teppy · · Score: 4, Interesting

    A 2x2 board has more than 3^4 possible games, not legal positions. The same legal position may occur in multiple games.

  3. Re:2x2 board by fph+il+quozientatore · · Score: 2

    That number probably refers to legal games (=sequences of moves). The result on the 19x19 board enumerates the legal positions, instead. Confusing abstract.

    --
    My first program:

    Hell Segmentation fault

  4. Re: 2x2 board by jofer · · Score: 4, Informative

    You capture opponents pieces and remove them from the board. There's a good introduction here (the site is a great resource overall): http://senseis.xmp.net/?RulesO... In addition to playing a stone, passing is always a legal move (if both players pass the game ends). Because of this, "infinite loop" positions occur frequently and there's a rule called ko to address that. If your move would repeat the previous board position, you must play somewhere else. (Again, a good explanation is http://senseis.xmp.net/?Ko ) At any rate, for any given board state, there are a huge (but finite) number of different sequences of moves that might have led to that board state.

  5. Re:2x2 board by Chris+Mattern · · Score: 2

    The summary is crap from beginning to end. It confuses counting positions with enumerating them. It confuses the number of possible games with the number of possible positions. All in all, a typical timothy post.

  6. This sounds like a job for Siri by Overzeetop · · Score: 4, Funny
    --
    Is it just my observation, or are there way too many stupid people in the world?
  7. Re:2x2 board by johntromp · · Score: 5, Interesting

    Author here.

    A single 2x2 game can visit as many as 48 of the 57 legal 2x2 positions, with many dozens of passes in between moves, and obviously many captures.

    This page

    http://tromp.github.io/java/go...

    on solving 2x2 go with various search methods may be helpful. I've lost track of my original 2x2 game counting code but suspect it was a close relative of this code.

  8. Re:Power Costs by GuB-42 · · Score: 2

    I don't know if backtracking is used but if it is, that's 1.21 gigawatts.

  9. Re: 2x2 board by johntromp · · Score: 4, Insightful

    The 386356909593 games do account for superko.
    That is exactly the number of simple (meaning not visiting the same point twice) paths starting
    from the empty node in the graph in Figure 4 on page 5 of our paper http://tromp.github.io/go/gost...

    Without superko, the number of 2x2 games would simply be infinite...

  10. Re: 2x2 board by johntromp · · Score: 5, Informative

    Yes, I counted the number of possible board states, which I call positions.

    You propose to instead use the word position to describe the complete game state including set of previously visited board positions.

    I say that's really confusing.

  11. Has anyone checked by Hognoxious · · Score: 3, Funny

    Has anyone checked the sky? I hope that overhead the stars aren't, without any fuss, going out.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  12. Re: 2x2 board by sexconker · · Score: 2

    That's a pointless measurement, though. A game of checkers has infinite possible games because you can repeat positions. For a player, or an AI trying to win a game, all that matters is the current game state and the possible game states, not how you arrived to that state.

  13. Re:2x2 board by johntromp · · Score: 3, Informative

    2x2 is Go played on a 2x2 board.
    where the 4 corners are the playable points.

    A game can continue for dozens of moves.

  14. Re: 2x2 board by johntromp · · Score: 2

    And the number of legal chess positions is in between the number of legal 9x9 Go positions and the number of legal 10x10 Go positions...

  15. Are symmetries left our because of superko? by GlobalEcho · · Score: 2

    Looking into the paper, we see that with L(2,2)=81-16-8=57 various positions that are symmetric transforms of each other are considered distinct. For example, on sees this in the upper right and lower left corners of Figure 1. Now, it's true that superko will break some of that symmetry, but not all of it. How much complexity disappears with more accounting for symmetry?

  16. Re:2x2 board by johntromp · · Score: 2

    This 8 move game disproves your claim:

          . .
          . .
    A2
          X .
          . .
    B1
          X .
          . O
    A1
          X .
          X O
    B2
          . O
          . O
    A1
          . O
          X O
    A2
          O O
          . O
    A1
          . .
          X .
    B2
          . O
          X .
    A2
          X O
          X .
    pass
    pass

    Btw, we're counting all games, not just games without mistakes.