In reply to megamind:
Sorry, I had a typo in my example, recent_numbers was meant to be declared as a queue with [$].
But even though you added the rand keyword, the size of the recent_numbers queue is not random unless there is a constraint on its size. Only post_randomize is changing the size of the queue, and after pushing 4 elements the size remains the same.
As far as each solution looking unique, that is governed by statistics. Since you have 4 3-bit numbers, there is only a 1/4096=0.0002= 0.02% chance that two consecutive solutions would be the same. And that will happen if you change the repeat loop to a larger value.