Re: Chess boards & connections.



dynamics@xxxxxxxxxxxx writes in article <1145600495.849018.281690@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> dated 20 Apr 2006 23:21:35 -0700:
Ok, you might be right, I was thinking we
could go through all 64 Pieces (as defined
in the OP) and output a Location (0-64) like,

Location (P) = L

where P => 1 to 64 and L=>0 to 64,

to describe any possible chess board.

Is that true?

I'm not sure where "64 pieces" came from. There can never be more than 32
pieces. And if you count pawn-morphs as new pieces there are 96 potential
pieces at the beginning of the game, because a pawn can be promoted into any
of {queen, rook, bishop, knight}.

But knowing the location of each piece isn't the whole story. You also need
the following info:

* Which player is next to move? 1 bit.

* King-side castle possible? 1 bit per player, zeroed when king or king's
rook has moved.

* Queen-side castle possible? 1 bit per player, zeroed when king or queen's
rook has moved.

* En passent target file 0..8 -- 0 unless last move was a pawn moving 2
spaces, then it's the file of that pawn.

That's enough info to define the legal *physical* moves. If you want to
consider the procedural moves of claiming a draw due to the 50-move rule or
the third-time repeat, you should keep a 50-move history.

--Keith Lewis klewis {at} mitre.org
The above may not (yet) represent the opinions of my employer.
.



Relevant Pages

  • Re: How do I win from here?
    ... his King was foolishly allowed to advance. ... Rook simply can't do what a King can do ... by in turn winning his base pawn. ... the superior player -- the one trying to ...
    (rec.games.chess.misc)
  • Re: Castling - touching rook first
    ... I then let go of the rook and pull my hand back from ... >the king without touching it. ... but it doesn't say if the player can change his mind ... or only if he realizes that castling is illegal. ...
    (rec.games.chess.misc)
  • Plot Heavy Lunch Break RL
    ... It seems that absolute power has corrupted the king and his ... The player has started as ... create a society to protect the Unholy Crown, Quaenaans Sword, The ... The secret society have been protecting the secret of Whitecrow for ...
    (rec.games.roguelike.development)
  • Re: Maximum possible chess moves
    ... >> about the longest possible chess moves that can be done ... king and a rook. ... Then there are 7 positions for each rook not ... Herman Rubin, Department of Statistics, Purdue University ...
    (sci.math)
  • Re: How do I win from here?
    ... Or even manages to "advance his king" or ... that Black puts his rook en prise. ...   I disagree. ... victory was for White to advance his king. ...
    (rec.games.chess.misc)