News for hackers. Stuff that matters.
Re:I analyzed shuffling in a million games of MtG Arena by 6keZbCECT2uB on Sunday January 15, 2023 @09:29AM (#34389642)
I've wondered about the same thing of generating a permutation with a minimum number of samples. I'm not sure how Gray codes helps you here, and the multiplication sounds wrong since many outputs aren't reachable from any input.
Re:I analyzed shuffling in a million games of MtG Arena by seanhunter on Sunday January 15, 2023 @09:34AM (#34389674)
The idea is just a closed form solution that gets you from a number in 1...nPermutations to a single specific permutation. I was using Gray codes as an example of a sequence that exhausts all permutations with a closed form that gets you to a specific point in the sequence.

Might not work - as I say I never actually got around to implementing it.

Re:I analyzed shuffling in a million games of MtG Arena by erikstrand on Sunday January 15, 2023 @11:29AM (#34390605)
I think you're looking for a factorial number system [1] and/or Lehmer code [2].

[1] https://en.wikipedia.org/wiki/Factorial_number_system [2] https://en.wikipedia.org/wiki/Lehmer_code

Re:I analyzed shuffling in a million games of MtG Arena by seanhunter on Sunday January 15, 2023 @11:41AM (#34390708)
Thanks!