Possible # of legal positions.

General conversations about Go belong here.
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: Possible # of legal positions.

Post by Bill Spight »

shapenaji wrote:
Dusk Eagle wrote:I think passing must be counted as legitimate to the question "How many board states can be reached by legal play?" You could however ask the question "How many board states can be reached from an empty board by legal play without either player passing?"
You could ask that question, I'm not sure it's useful. I don't see any reason why we would respect the inclusion of bad plays in our board states, but not include bad plays that are passes.
Who say that a pass is a play? Ing and Tromp and the AGA, to be sure. But traditionally I don't think that it was, by Chinese, Japanese, or Korean rules.
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
User avatar
leichtloeslich
Lives in gote
Posts: 314
Joined: Wed Feb 29, 2012 1:16 pm
Rank: KGS 4k
GD Posts: 0
Location: Germany
Has thanked: 10 times
Been thanked: 128 times

Re: Possible # of legal positions.

Post by leichtloeslich »

You're still missing connection information for stones without liberties:
Click Here To Show Diagram Code
[go]$$B
$$ +---------+
$$ | X X . . |
$$ | X O . . |
$$ | X X . . |
$$ +---------+[/go]
The two black stones in the second strip are actually connected, so to make a legal position only one of them needs to get a liberty in one of the following strips.

Anyway, all of this sounds very much like the beginning of that "Combinatorics of Go" paper. Has anybody here read it?

They call it "border state" instead of strip and it's slightly more general. (I think what you call a strip, they call an "edge state".)

In that paper they use a bit of graph theory and linear algebra to derive linear recurrences for the counting function. Interesting stuff.

It can be downloaded from John Tromp's site directly here. (If you have trouble with the link provided earlier.)
xed_over
Oza
Posts: 2264
Joined: Mon Apr 19, 2010 11:51 am
Has thanked: 1179 times
Been thanked: 553 times

Re: Possible # of legal positions.

Post by xed_over »

Tryss wrote:
Be carefull, his "legitimate play" means alternate plays without passing.
actually, that thought hadn't crossed my mind yet, but now that you mention it...
User avatar
shapenaji
Lives in sente
Posts: 1103
Joined: Tue Apr 20, 2010 10:58 pm
Rank: EGF 4d
GD Posts: 952
Location: Netherlands
Has thanked: 407 times
Been thanked: 422 times

Re: Possible # of legal positions.

Post by shapenaji »

leichtloeslich wrote:You're still missing connection information for stones without liberties:
Click Here To Show Diagram Code
[go]$$B
$$ +---------+
$$ | X X . . |
$$ | X O . . |
$$ | X X . . |
$$ +---------+[/go]
The two black stones in the second strip are actually connected, so to make a legal position only one of them needs to get a liberty in one of the following strips.

Anyway, all of this sounds very much like the beginning of that "Combinatorics of Go" paper. Has anybody here read it?

They call it "border state" instead of strip and it's slightly more general. (I think what you call a strip, they call an "edge state".)

In that paper they use a bit of graph theory and linear algebra to derive linear recurrences for the counting function. Interesting stuff.

It can be downloaded from John Tromp's site directly here. (If you have trouble with the link provided earlier.)
Nice! I haven't read it, I'll dig in.

But off the top of my head, keeping track of cycles is going to add an additional storage multiplier of 19^19 (each one is connected to one of the other 18, or to none at all)
Tactics yes, Tact no...
User avatar
shapenaji
Lives in sente
Posts: 1103
Joined: Tue Apr 20, 2010 10:58 pm
Rank: EGF 4d
GD Posts: 952
Location: Netherlands
Has thanked: 407 times
Been thanked: 422 times

Re: Possible # of legal positions.

Post by shapenaji »

Bill Spight wrote: Who say that a pass is a play? Ing and Tromp and the AGA, to be sure. But traditionally I don't think that it was, by Chinese, Japanese, or Korean rules.
I dunno, Surely there were a few showboaters in Japan, China, or Korea that offered their opponent a handicap by repeatedly passing. Or simply passed to show that they were ahead, to induce their opponent to resign.
Last edited by shapenaji on Sat May 31, 2014 10:55 am, edited 1 time in total.
Tactics yes, Tact no...
User avatar
shapenaji
Lives in sente
Posts: 1103
Joined: Tue Apr 20, 2010 10:58 pm
Rank: EGF 4d
GD Posts: 952
Location: Netherlands
Has thanked: 407 times
Been thanked: 422 times

Re: Possible # of legal positions.

Post by shapenaji »

Summarizing:

In bits, to store a useful strip on boardsize "X"

we need 5*X bits for the cycle info,
we need 1*X bits for if the end of a row is open
we need 2*X bits for color info
(I realize that Herman pointed out that you can store the latter two together, but it's still 3 bits, the cycle info might also have a simplification)

so each "useful" strip will be X bytes

---------------------------------------

There are ~ (19^19)*(5^19) ~= 10^37.6 possible strips


---------------------------------------

Now my assumption here is that (with the updates) we have stored enough information that any two strips can be combined to form an existing strip in the database.

This means that we would need a relational database containing 10^75 entries. Let's call it small_matrix

Each strip is related to the strips it can become, with the entry being the number of ways it can reach each of these strips (branching factor)

Then the sum of the upper triangular portion in (smaller_matrix)^19 (a special routine would be required for the last row, but this is approximate), should give us the total number of board states.


However, seeing as this calculation requires me to store 19*10^75 bytes of data, I think I can safely say that this method won't be particularly useful.
Tactics yes, Tact no...
uPWarrior
Lives with ko
Posts: 199
Joined: Mon Jan 17, 2011 1:59 pm
Rank: KGS 3 kyu
GD Posts: 0
Has thanked: 6 times
Been thanked: 55 times

Re: Possible # of legal positions.

Post by uPWarrior »

Has anyone proven this problem to be NP-hard?
moboy78
Dies with sente
Posts: 72
Joined: Sun May 19, 2013 7:23 am
GD Posts: 0
KGS: moboy78
IGS: moboy78
Has thanked: 6 times
Been thanked: 9 times

Re: Possible # of legal positions.

Post by moboy78 »

DrStraw wrote:
moboy78 wrote:
I would imagine having a 1x1 board is impossible. The smallest board you could conceivably have is a 2x2 board.
If I'm looking at your attachment correctly, then wouldn't that just be a 2x2 with a stone in between intersections?
Post Reply