Re: Chess boards & connections.
- From: klewis@xxxxxxxxxxxxxxxx (Keith A. Lewis)
- Date: Fri, 21 Apr 2006 17:37:42 +0000 (UTC)
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.
.
- References:
- Chess boards & connections.
- From: dynamics
- Re: Chess boards & connections.
- From: dynamics
- Chess boards & connections.
- Prev by Date: Re: Maclaurin series question
- Next by Date: Re: Chess boards & connections.
- Previous by thread: Re: Chess boards & connections.
- Next by thread: Re: Chess boards & connections.
- Index(es):
Relevant Pages
|