Morpion solitaire: Difference between revisions

m
The task is to get the computer to play a game of
(→‎{{header|C}}: reinterpreted rules when one position can complete multiple lines)
m (The task is to get the computer to play a game of)
Line 1:
{{draft task|Games}}
 
PlayThe task is to get the computer to play a game of [[wp:Morpion solitaire|Morpion solitaire]]. For this task, it is acceptable for the computer to make randomly selected valid moves, rather than playing the strongest move each time. Use the standard version, with 5 point lines that allows parallel lines to touch at the endpoints.
 
Morpian solitaire is played on a (theoretically) infinite grid. It begins with 36 points marked in a Greek cross:
Line 17:
</pre>
 
A move is made by adding one point anywhere that creates a new line of 5 points (without spaces) and drawing a line through them. Moves are usually marked with the number of the move. No two lines can share more than a single point. For this task, playing randomly is acceptable. The rules to morpion solitaire are [http://www.morpionsolitaire.com/English/Rules.htm here].
 
Note: The longest know game under these rules is [http://www.morpionsolitaire.com/English/RecordsGrids5T.htm#177Rosin 177 moves]. (This isn't thought to be the longest game possible.) The shortest game possible is [http://www.morpionsolitaire.com/English/Limits.htm 20 moves].