Will_Sawin comments on Rationalist horoscopes: A low-hanging utility generator. - Less Wrong
You are viewing a comment permalink. View the original post to see all comments and the full post content.
You are viewing a comment permalink. View the original post to see all comments and the full post content.
Comments (77)
(3) only says what you know about the next one, given the last P-1. The actual algorithm can know the entire previous history. So if object X has just been passed over Q-1 times, it must be chosen next by (2), but that doesn't violate (3), because that information isn't available from the last P-1 drawings.
ETA: A simple algorithm that I think works is this:
1. Generate the first P-1 items at random, all distinct.
At each subsequent step:
2. If there is an item that has not appeared in the last Q-1 drawings, choose it.
3. Otherwise, choose uniformly from among those that have not appeared in the last P-1 drawings.
This isn't the only possible algorithm. Instead of a uniform distribution in part (3), one might weight it towards those that were last chosen longer ago, with (2) being a special case of that.
I second the claim that it works.