Jump to content

Generate random chess position: Difference between revisions

Adding precisions about what we mean by "random"
(Adding precisions about what we mean by "random")
Line 1:
{{draft task}}
 
The purpose of this task is to generate a random chess position in [[wp:FEN|FEN format]]. The position does not have to be realistic or even balanced, but it must comply to the following rules and guidelines :
 
* there is one and only one king of each color (one black king and one white king);
Line 8:
* in addition to the kings, 0 up to 32 pieces of either color can be added. There is no requirement for material balance between sides;
* it is white's turn, it is assumed that both sides have lost castling rights and that there is no possibility for *en passant* (the FEN should thus end in <tt>w - - 0 1</tt>);
 
No requirement is made regarding the probability distribution of your method, but it should be able to span a reasonably representative sample of all possible positions. For instance, a program that would always generate positions with say five pieces on the board would not be considered truly random.
1,934

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.