Newsgroups: comp.ai,comp.lang.scheme,comp.ai.games,rec.games.chess.misc,rec.games.abstract
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!goldenapple.srv.cs.cmu.edu!das-news2.harvard.edu!fas-news.harvard.edu!oitnews.harvard.edu!news.dfci.harvard.edu!camelot.ccs.neu.edu!nntprelay.mathworks.com!howland.erols.net!cs.utexas.edu!utnut!nott!cu23.crl.aecl.ca!cc5.crl.aecl.ca!edwardsg
From: edwardsg@cc5.crl.aecl.ca
Subject: RE: How many bits are needed?  No more than 189.
X-Nntp-Posting-Host: cc5.crl.aecl.ca
Message-ID: <24JUN97.13165835@cc5.crl.aecl.ca>
Sender: usenet@cu23.crl.aecl.ca (USENET News System)
Organization: AECL Research
References: <01bc6b <5mlqbe$hki@nala.devnet.lejonet.se> <5mm8g0$q1n@news.ox.ac.uk> <y5apvu6bff4.fsf@graphics.cat.nyu.edu> <5mtnmq$jjb@nala.devnet.lejonet.se> <Pine.SUN.3.95.970602155612.5356A-100000@scfn> <339CA52C.6231@msi.com> <339CBA7A.22C5@geocities.c <33A9C49E.36
Date: Tue, 24 Jun 1997 13:16:58 GMT
Lines: 82
Xref: glinda.oz.cs.cmu.edu comp.ai:47415 comp.lang.scheme:21323 comp.ai.games:9973

If we can encode a chess position in 178 bits, then there must be less
than 2^178 possible chess positions.  2^178 is about 1.7x10^38, so this
settles *that* question.

However, I think you need another bit or two to encode whether this is
the first, second or third repetition of the position.

Geoff

In a previous article, John Christensen <jc1089@worldnet.att.net> wrote:
->Here is a solution requiring 178 bits to recoed a chess positon,
->including castling options available and pawn vulnerability.
-> 
->First construct the number Y, which indicates king positions and 
->castling options.
->Y=
->	0-8 both kings have castling options. Positions
->		automatically known. 3 options each
->		color;Left,Right, and Either 3*3=9
->	9-356 one king has castling options. 6 
->		possibilities for castlable king
->		(White or Black;Left Right,Either)
->		castlable king's position known.
->		Uncastlable king has 58 possible
->		positions. 58*6=348
->	357-596 Neither king castlable.
->		White king is in corner. 
->		4 possible positions for white king.
->		60 possible positions for black king.
->		4*60=240  
->	597-1988 Neither king castlable.
->		White king on edge.
->		White king has 24 possible positions.
->		Black king has 58 possible positions.
->		24*58=1392
->	1989-3968 Neither king casltlable.
->		White king not on edge or in corner.
->		White king has 36 possible positions.
->		Black king has 55 possible positons.
->		36*55=1980
->The number Y can be expressed in 12 bits.
->To express the positions and identities of the other 30 non-king pieces
->or pawns (I will just call them pieces if you don't mind):
->62 bits to indicate which squares are occupied ( already know 
->where kings are), and 100 bits to express their identities.
->To find their identities, construct the 30 digit (yes, 10-based digit)
->number with each digit coding for a piece (there are now only 10
->possibilities:QBNRP,white or black),next convert this 30 digit 
->number into a 100 bit number.
->	We also need 3 bits to express pawn vulnerability and 1 bit
->to express whose move it is. This makes 12+62+100+3+1=178 bits.
->3 bits are sufficient to express pawmn vulnerability since A:
->the color of the vulnerable pawn is known, and B: if no pawns are 
->vulnerable, then just code for a pawn not on its own 6th rank,
->indicating that no pawns vulnerable. If all pawns are on their own
->6th rank, then obviously none are vulnerable!!! (think about it)
-> 
->Now, considering all that work, and the very small benefit to be
->obtained, don't you think the 192+3+1 bit solution a relative bargain?
-> 
->	John   Christensen
-> 
->Wayne M. VanWeerthuizen wrote:
->> 
->> On Wed, 18 Jun 1997 00:43:22 +0200, Peter Schaefer
->> <schaefer@malaga.math.uni-augsburg.de> wrote:
->> 
->> >So how many bits do you need to encode a chess position ?
->> 
->> My best is 189.  (I've seen other claim fewer bits, but have a couple
->> were definitely mistaken, and the others I could not follow.)
->> 
->> One problem I saw: People using 3 bits to say which pawn can be
->> captured en passant.  Fact is, you can have up to TEN pawns each on
->> their own 4th rank with an enemy pawn next to it.  So four bits are
->> required, not three.  Imagine b=black pawn, w=white pawn.
-> 
->(big snip)
->> 
->> P.S. If I've overlooked anyone else proposing a valid solution using
->> less than 189 bits, please post and email the details of it to me.
->> (Email because my news server is not all that reliable.)
