Talk:Generate Chess960 starting position

clarifying wording

In the first rule, the wording states   ··· all eight pawns must be placed on the second rank.

There are sixteen pawns.

How about   A player's eight pawns must be ···   or something similar. -- Gerard Schildberger (talk) 04:53, 8 May 2014 (UTC)

I don't think that's necessary. There are also two queens, two kings, four rooks and so on. I think it's obvious enough that we're talking about the placing of the pieces for each camp.--Grondilu (talk) 05:52, 8 May 2014 (UTC)
It doesn't really matter for this task (since we only display pieces for the first rank, for one player). Hypothetically speaking, though, each player could be thought of as having a second rank, which would allow all 16 pawns to be placed. --Rdm (talk) 05:54, 8 May 2014 (UTC)
There are eight ranks on a chessboard, the 1st rank is where white's major and minor pieces are initially positioned, rank 8 is where black's major and minor pieces are initially positioned.   The 2nd rank is where (all 8) white's pawns are initially positioned, the 7th rank is where all the black's pawns are initially positioned.   The black player doesn't have a 1st or 2nd rank in that those ranks are occupied by white pieces.   Ranks aren't owned by either white or black, the ranks are numbered from the "bottom" of the chessboard, where the "bottom" is occupied by the white player's major and minor pieces.   As long as the Rosetta Code task is stating the placement of all the pawns, it should be accurate and conform to the notations and wording of the Fédération Internationale des Échecs (FIDE), aka, the World Chess Federation. -- Gerard Schildberger (talk) 20:28, 8 May 2014 (UTC)

random starting position

A trivial REXX program (of two statements): <lang rexx>if random(0,1) then say 'NBQRBKNR'

               else say 'QBNRBKNR'</lang>

would, in the strictest sense, fullfill a random Chess960 starting position   (albeit only two random positions).

However, I believe the spirit of the requirement of random be that the random position would produce any of the 960 possible starting positions. -- Gerard Schildberger (talk) 04:53, 8 May 2014 (UTC)

relevant :-) --Grondilu (talk) 05:49, 8 May 2014 (UTC)
Excellent!     :-)

To this end, I wrote a REXX program (2nd programming entry) that randomly generates all possible unique 960 Chess960 starting positions and it shows a log of the results (unique starting positions) after each one-thousand generations.

This would make a good extension to the requirements to verify that the programming examples being used to create a random Chess960 starting position do indeed produce all possible starting positions. -- Gerard Schildberger (talk) 05:42, 8 May 2014 (UTC)

Modified task description to force entries to be able to produce one of the 960. --Paddy3118 (talk) 05:52, 8 May 2014 (UTC)
Gerard, I did a similar test (for Ruby) and it usually generates all 960 poisitions in about 7500 tries. I suspect the REXX code is biased towards rooks on the right side, but I could very well be wrong...--Steenslag (talk) 14:20, 12 May 2014 (UTC)

unviewable symbols

When I view the task page, the Chess symbols in Unicode appear as small square boxes with numbers in them (on Firefox Aurora), or empty boxes in Microsoft Internet Explorer, both under Windows/XP.   Is there something special that needs to be done to make them viewable? -- Gerard Schildberger (talk) 06:21, 8 May 2014 (UTC)

I also find them hard to see. Maybe increase the font size. Anyway that's why I also allowed to use roman letters.--Grondilu (talk) 06:27, 8 May 2014 (UTC)
Er, no.   My screen is about two or three miles wide, and I can make the font ... well, ginormous.   The symbols (which are in a true square box) are as follows:
 ┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐
 │26││26││26││26││26││26││26││26│
 │58││57││56││54││57││55││56││58│
 └──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘
They are small in "normal" viewing mode and they occupy "one character", so you can image how small the glyphs are. -- Gerard Schildberger (talk) 06:44, 8 May 2014 (UTC)
The numbers are the Unicode code points in hex that have no glyph in your current font. For fonts that support these symbols see for example Test for Unicode support in Web browsers.
In Firefox you would need to change the Sans Serif font (Preferences - Content - Fonts&Colours/Advanced...). --Andreas Perstinger (talk) 09:36, 8 May 2014 (UTC)

As an aside, some languages don't support Unicode characters. -- Gerard Schildberger (talk) 06:44, 8 May 2014 (UTC)

As another aside, the chess symbols have been in Unicode for more than 20 years now. --TimToady (talk) 19:31, 8 May 2014 (UTC)

Return to "Generate Chess960 starting position" page.