Queens are randomly placed in different rows and columns in succession, until the position is obviously wrong: In that case the last option taken is revoked, and a different decision made. The code for this section is given: Only four initial squares need to filled in the top row, symmetry takes care of the remaining cases. For every initially filled square, there are several solutions.
However, most of those are not really different, when all sorts of symmetries are taken in account. The program does not presently bother to filter out the extraneous solutions.
Although the standard chessboard is certainly a starting point, boards from 5x5 to 9x9 have been actually tested successfully.
A bug has been removed from the variations.htm section. The second version of the mastermind playing program has a hit rate of about 94%.