|
Re: the name of a game of chess
|
Cliff Harris
|
May 24, 2001 14:56 PDT
|
Tom Ritchford wrote:
| | 0. names for every game of chess.
in order to be the canonical address for the game of chess,
we need names!!
|
Are you trying to find a single "best" naming scheme, or is it reasonable to
have different naming schemes for different situations? E.g., the key to look
up a game in the database may be different from the URL used by an HTTP client.
That seems perfectly reasonable to me.
| |
in my mind, there are three main ways to name a game of chess.
0.1. by the sequence of moves
0.2. by the board position
0.3. by a name, a nickname or an alias
1. naming by moves.
1.1. naming by move index
eg: chess/0/5/2/16/5
this is what's currently used in the servlet
(the servlet is down until I set it back up on the new machine!)
idea: there is specific set of legal moves from each legal position
in the game of chess. number these moves from top left to bottom right.
each legal move now has a move index.
advantages: canonical, unambiguous.
disadvantage: unintuitive,
requires partial computation of "all legal moves" sequence for
all intermediate positions.
|
As the game gets longer, the string gets longer. There are at least four
characters per move, so a 50-move game requires over 200 characters. Also, the
effort to compute the position increases with the number of moves: can we say
O(N), where N is the number of moves? Maybe it gets slightly easier to compute
legal positions as pieces are captured, but still, any technique that requires
significantly more CPU as the length of the game increases seems flawed.
One advantage, of course, is that the whole game is encapsulated, so the
50-move rule and the "three-repeats" rule (I'm not sure what the proper name of
this rule is) can be employed.
| |
1.2. naming by move name
1.2.1. algebraic: eg: chess/e4/e5
1.2.2. classical: eg: chess/P-K4/P-K4
1.2.3. plus and minus to move name
advantage: well-understood, intuitive
disadvantage: poorly specified,
ambiguous, not canonical
the last needs a little discussion.
basically, there are multiple ways to specify any move
with this system because you can say e2e4 or just e4.
and sometimes you require the first component to
disambiguate the move.
and MOST possible moves are illegal but can't be
validated easily without playing through the whole
board position.
whereas you can validate the move index with a
simple compare:
0 <= index < maxLegalMoves( position )
2. by board position
2.1. a naming convention.
p, r, n, b, k, q are black
P, R, N, B, K, Q are white
write from top left to bottom right
either the piece name, or the number of spaces.
so a game would look like:
rnbqkbnrpppppppp32PPPPPPPPRNBQKBNR
rnbqkbnrpppppppp20P11PPPP1PPPRNBQKBNR after one move
rnbqkbnrpp1ppppp10p10P11PPPP1PPPRNBQKBNR after two moves
rnbqkbnrpp1ppppp10p1P19PPPP1PPPRNBQKBNR
rnbqkbnrpp2pppp10ppP19PPPP1PPPRNBQKBNR
(can you do this without a board??)
to disambiguate positions, you'd also encode other data
about en passant and castling information some of the time.
c, C means black, white can castle king side
d, D means black, white can castle queen side
s,t,u,v,w,x,y,z are the 8 possible files for ep capture.
so the last position would be completely disambiguated with:
rnbqkbnrpp2pppp10ppP19PPPP1PPPRNBQKBNRcdCDv
whew!
2.2. plusses and minuses
it certainly is unambiguous about presenting board positions
but it's not clear how to distinguish legal board positions
from legal-seeming positions that in fact could never have
been arrived by making legal moves from the root position.
solution to this:
allow this naming of such elements
if they are in the database already.
otherwise, too bad.
|
Although in the example you give, the string looks quite ugly compared to 1.1
above, in fact the strings in this method are always the same size, roughly.
(You could make them always the same size, by using x for a blank square:
inserting the number of blank squares instead is just a simple compression
technique.)
This technique allows for transpositions; i.e., the same position arrived at by
different sequences of moves. If we want to ask, "Has anyone reached this
position before, and what did they do?", this method is the best one.
However, we also need to include history back to the last irreversible move, if
we want to account for the 50-move and three-repeats rules.
| |
3. other names for positions
3.1. global names: "The Evergreen", "The Immortal"
note that global names need to be internationalized.
what is "The Evergreen" in German?
3.2. groups of games.
eg: Marshall Club Blitz Competition, 1997
Moritz, 1937
3.3. player names.
joe/1546 -- the 1546th position marked by joe.
joe/last -- the most recent position marked by joe.
joe/first -- the first position marked by joe.
3.4. personal nicknames.
your personal games:
last -- what you last did
first -- what you first did.
1456 -- the 1456th position you marked
myBestGame -- game you named myBestGame
joe/myBestGame -- game that joe calls myBestGame
...electronic a cappella madness <http://volectrix.com>.........
...extreme internet radio <http://extremeNY.com/radio>...
|
|
|
 |
|