Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Parsing Chess Algebra Notation

by EdwardG (Vicar)
on May 04, 2004 at 16:35 UTC ( [id://350416]=note: print w/replies, xml ) Need Help??


in reply to Re: Parsing Chess Algebra Notation
in thread Parsing Chess Algebra Notation

Remember, Qa2b3 means that there are three queens, potentially at a2, a4, and b4. All of them can move to b3.

??

I would interpret Qa2b3 to only mean that a Queen at a2 is moving to b3 - I don't know how you could derive the existence and position of two other Queens from this.

And from my playing experience I had thought that when two or more of the same piece could move to a given square, you added the minimal extra information to disambiguate, either the rank number or file letter. For example in the following position there are two rooks that can move Ra4, so to disambiguate I add the rank, thus R8a4.

+---+---+---+---+---+---+---+---+ 8 | R | | | | | | | | +---+---+---+---+---+---+---+---+ 7 | | | | | | | | | +---+---+---+---+---+---+---+---+ 6 | | | | | | | | | +---+---+---+---+---+---+---+---+ 5 | | | | | | | | | +---+---+---+---+---+---+---+---+ 4 | | | | | | | | | +---+---+---+---+---+---+---+---+ 3 | | | | | | | | | +---+---+---+---+---+---+---+---+ 2 | | | | | | | | | +---+---+---+---+---+---+---+---+ 1 | R | | | | | | | | +---+---+---+---+---+---+---+---+ a b c d e f g h

There is an excellent description of this notation at wikipedia

 

Replies are listed 'Best First'.
Re: Re: Re: Parsing Chess Algebra Notation
by halley (Prior) on May 04, 2004 at 16:55 UTC
    I think he meant that with Qa2b3 that there could potentially be up to three other queens, precisely because you should only provide the minimal disambiguation.
    • If Qb3 is insufficient,
      there must be another queen that can move on b3.
    • If Qab3 is insufficient,
      there must be another queen in column a that can move on b3.
    • If Q2b3 is insufficient,
      there must be another queen in rank 2 that can move on b3.
    • Since both Qab3 and Q2b3 are insufficient, the board must be crawling with queens poised to attack b3.

    --
    [ e d @ h a l l e y . c c ]

      As a side note:

      Qb3 should give an error if

      There are more than one Q on the board and they can move to b3.

      That will be an interesting check!

        I said what I meant and meant what I said. I even gave an example.
        +---+---+---+---+---+---+---+---+ 8 | | | | | | | | | +---+---+---+---+---+---+---+---+ 7 | | | | | | | | | +---+---+---+---+---+---+---+---+ 6 | | | | | | | | | +---+---+---+---+---+---+---+---+ 5 | | | | | | | | | +---+---+---+---+---+---+---+---+ 4 | | | | | | | | | +---+---+---+---+---+---+---+---+ 3 | Q | x | | | | | | | +---+---+---+---+---+---+---+---+ 2 | Q | | Q | | | | | | +---+---+---+---+---+---+---+---+ 1 | | | | | | | | | +---+---+---+---+---+---+---+---+ a b c d e f g h

        How would you indicate that the queen at a2 moves to b3? Q2b3 doesn't work, and Qab3 doesn't work. You have to say Qa2b3. And, before you say this is far-fetched, the notation isn't for normal games. It has to describe every single possible game.

        Update: It seems that your link to wikipedia even describes this situation, and I quote:

        It may be necessary to identify a departing piece with both its file and its rank in unusual configurations (e.g. the player has 3 queens or 3 knights on the board).

        ------
        We are the carpenters and bricklayers of the Information Age.

        Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

        I shouldn't have to say this, but any code, unless otherwise stated, is untested

(Re:)+ Parsing Chess Algebra Notation
by rir (Vicar) on May 04, 2004 at 20:01 UTC
    This discussion seems to assume English Short Algebraic Notation. For a parser this seems unwise.

    People use and generate chess notation and they will enjoy being able to follow their usual habits, especially if they are the sort to fall into english descriptive or long algebraic under stress.

    Any good chess notation parser will need to maintain or reference a board image.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://350416]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-26 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found