Talk:Generate Chess960 starting position: Difference between revisions

Content added Content deleted
(→‎random starting position: noted the un-randomness of rook placement for the REXX code.)
(→‎random starting position: removed some blank lines, re-labeled histograms.)
Line 33: Line 33:
:: Yes, the placement is biased to the right because of the requirement (rule) that the king has to be placed between the two rooks, which necessitated (in the REXX code) the shifting of the placement of the 2<sup>nd</sup> rook to be placed at least two positions to the right. &nbsp; I don't know if the addition of more code which would allow the placement of the 2<sup>nd</sup> rook to be also placed two positions the left of the 1<sup>st</sup> rook would provide better randomness of rook placement. I'll be looking into that possibility. &nbsp; Here is a histogram of one million random placements (of both rooks):
:: Yes, the placement is biased to the right because of the requirement (rule) that the king has to be placed between the two rooks, which necessitated (in the REXX code) the shifting of the placement of the 2<sup>nd</sup> rook to be placed at least two positions to the right. &nbsp; I don't know if the addition of more code which would allow the placement of the 2<sup>nd</sup> rook to be also placed two positions the left of the 1<sup>st</sup> rook would provide better randomness of rook placement. I'll be looking into that possibility. &nbsp; Here is a histogram of one million random placements (of both rooks):
<pre>
<pre>
(1st trial)
(1st one-million trial)
file 1=166381 ========================
file 1=166381 ========================
file 2=166437 ========================
file 2=166437 ========================
Line 43: Line 43:
file 8=407312 ============================================================
file 8=407312 ============================================================


(2nd trial)
(2nd one-million trial)

file 1=166404 ========================
file 1=166404 ========================
file 2=166747 ========================
file 2=166747 ========================
Line 54: Line 53:
file 8=409359 ============================================================
file 8=409359 ============================================================
</pre>
</pre>
{''file'' &nbsp; as in &nbsp; ''rank'' &nbsp; and &nbsp; ''file'' &nbsp; on a chessboard.}


(Follow-up on the random placement of the two rooks.) &nbsp; I re-worked the REXX code and it now has a much more randomness in the (proper) placement of the two rooks. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 15:19, 12 May 2014 (UTC)
(Follow-up on the random placement of the two rooks.) &nbsp; I re-worked the REXX code and it now has a much more randomness in the (proper) placement of the two rooks. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 15:19, 12 May 2014 (UTC)
<pre>
<pre>
(1st trial, new code)
(1st one-million trial, new code)

file 1=269306 ===========================================================
file 1=269306 ===========================================================
file 2=246706 ======================================================
file 2=246706 ======================================================
Line 68: Line 67:
file 8=270847 ============================================================
file 8=270847 ============================================================


(2nd trial, new code)
(2nd one-million trial, new code)

file 1=269306 ===========================================================
file 1=269306 ===========================================================
file 2=246706 ======================================================
file 2=246706 ======================================================
Line 79: Line 77:
file 8=270847 ============================================================
file 8=270847 ============================================================
</pre>
</pre>

Many thanks to (user) Steenslag for pointing out the un-randomness of the rook placement in the REXX code.
Many thanks to (user) Steenslag for pointing out the un-randomness of the rook placement in the REXX code.


I've updated the REXX programs.-- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 15:19, 12 May 2014 (UTC)
I've updated the REXX programs.-- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 15:19, 12 May 2014 (UTC)

Even with the new REXX code (of better rook placement), it still takes the same amount of generations to produce all 960 variations. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 15:52, 12 May 2014 (UTC)


-----
-----