cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A048289 Number of Go games with exactly n moves.

Original entry on oeis.org

1, 361, 129960
Offset: 0

Views

Author

Keywords

Comments

The sequence seems based on the assumption that the game starts with an empty 19 X 19 board, which is not necessarily the case in an official Go tournament. After any of the 361 = 19^2 choices for the first move, the opponent has 19^2-1 choices for placing his stone, so the value a(2) = 361^2 = 361*(361-1 + 1) takes into account the possibility of not placing a stone. A detailed account of the precise rules used here would be useful to make the definition of this sequence complete. - M. F. Hasler, Nov 22 2016
This sequence counts distinct Go board positions after n moves, excluding terminated games. Positions are considered identical if stones and turn-to-play match, regardless of move history. (To be discussed!) Passing moves are omitted from non-terminal states, as early passes are exceptionally rare in practical play.

Crossrefs

Cf. A007565.

A096259 Longest period of an abstract version of the game of Go on a 1 X n board.

Original entry on oeis.org

1, 2, 6, 24, 70, 180, 294, 112, 270, 900, 330, 792
Offset: 1

Views

Author

Yasutoshi Kohmoto, Aug 01 2004; revised Apr 23 2008

Keywords

Comments

Rules: 1. If a set of a player's stones has no "open edge" then the other player get the set of stones.
2. If the sets of both player's stones has no "open edge" in a configuration, then a player who made this configuration get the set of the other player's stone.
3. A player never make a configuration in which his stones have no open edge and the other player's stones have an open edge.
A board is represented as follows.
+ + + +
+ o x +
+ + + +
"o" means a white stone, "x" means a black stone.
"Open edge" : An edge which has one node without a stone. Example:
+ x x +
x o o x
+ x x +
The center set of white stones has no "open edge", so black player gets them. Six black stones have "open edges" like this : "x +".
Note that the rules do not specify when a player wins, so the game never terminates.

Examples

			The case n=3:
  t 1 2 3 3 4 4 5 6 6 7 7
  + x x x x x + x x + x x
  + + + x x x + + o o o +
  + + o o + o o o o o o +
t=1 and t=7 are the same, so the period is 6.
a(12) = 12 * 2^0 * (12 + 6 + 3 + 10 + 5 + 9 + 7 + 8 + 4 + 2 + 1 - 1) = 792.
		

Crossrefs

Formula

For 4<=n, a(n) = n * 2^p * ( Sum_{0<=k<=m} ( Sum_{0<=i<=h_k} n_k/2^i ) - 1 ) where p = m Mod 2, n_0 = n, n_k = n - [n_{k-1}/2^(h_{k-1}+1)] - 1, 2^h_k is the highest power of two dividing n_k: n_m/2^h_m = 1.

A157851 Number of possible Fischer Random Chess games at the end of the n-th ply.

Original entry on oeis.org

960, 18882, 371766, 8224968, 181106056, 4433048830, 107637760217, 2854198413886, 75006431287937
Offset: 0

Views

Author

Johannes W. Meijer & Richard Pijl (richard.pijl(AT)telenet.be), Mar 07 2009, Feb 25 2010

Keywords

Comments

Fischer Random Chess is also called Chess960 because the number of different initial positions is 960.
The number of possible games at the end of the n-th ply is the sum of all possible games on all 960 boards with a different initial position.
The number of possible first moves for white depends on the following three factors:
a) The eight pawns.
b) The positions of the two knights. If they are on a1 and/or h1 the number of possible moves reduces from 20 to 18 or 19. On the 960 boards there are 240 boards with a knight on a1. Looking more closely at the positions of the second knight on these 240 boards reveals that 36 knights can be found on b1, d1, f1 and h1 and 32 knights can be found on c1, e1 and g1, something that can be proved with some simple combinatorics.
c) The possibility of castling. On the 960 boards there are 72 boards with a king on d1 and a rook on c1 and there are 90 boards with a king on f1 and a rook on g1. Both positions allow castling under the Fischer Random Chess rules.
These three factors lead to the following partition of the 960 boards (K = King; R = Rook; N = Knight; NoN = No Knight; NoC = No castling allowed): 454 (NoNa1+NoNh1+NoC), 162 (Na1+NoNh1+NoC), 160 (Nh1+NoNa1+NoC), 34 (NoNa1+NoNh1+Kf1+Rg1), 28 (NoNa1+NoNh1+Kd1+Rc1), 28 (Nh1+NoNa1+Kf1+Rg1), 22 (Na1+Nh1+NoC), 22 (Na1+NoNh1+Kd1+Rc1), 20 (Na1+NoNh1+Kf1+Rg1), 16 (Nh1+NoNa1+Kd1+Rc1), 8 (Na1+Nh1+Kf1+Rg1), 6 (Na1+Nh1+Kd1+Rc1).
The first three terms of the sequence can be calculated in a straightforward way, see the examples. The values of a(1) and a(2) were confirmed by Richard Pijl with his Fischer Random Chess playing chess engine The Baron, see the links. He also determined the values of a(3), a(4) and a(5).
The Baron 3.41 now gives different values for a(3)-a(6), confirmed by my own chess engine. - François Labelle, Dec 05 2017

Examples

			a(0) = 4 (Bishop) * 4 (Bishop) * 6 (Queen) * 10 (Knights) * 1 (King and Rooks) = 960.
a(1) = 36*18 + 204*19 + 204*19 + 516*20 + 90 + 72 = 18882.
a(2) = 22*18^2 + (162+160+8+6)*19^2 + (454+28+22+20+16)*20^2 + (34+28)*21^2 = 371766.
		

Crossrefs

Cf. Chess: A006494, A048987, A079485.
Cf. Go: A007565, A048289.
Cf. Checkers: A133046, A133047.

Programs

  • Python
    import chess
    def A157851(n, b = None): return (b.legal_moves.count() if b else 960) if not n else sum(b.push(m) or A157851(n-1, b)+(not b.pop()) for m in b.legal_moves) if b else sum(A157851(n-1, chess.Board.from_chess960_pos(s)) for s in range(960)) # (For illustration, slow for n > 3.) - M. F. Hasler, Apr 25 2023

Extensions

Corrected and edited by Johannes W. Meijer, Feb 25 2010, Mar 03 2010
a(6) added by Richard Pijl (richard.pijl(AT)telenet.be). - Johannes W. Meijer, May 29 2010
a(3)-a(6) corrected by François Labelle, Dec 05 2017
a(7)-a(8) from François Labelle, Jan 18 2018
Showing 1-3 of 3 results.