Results 1 to 3 of 3

Thread: VB6 - Fisher–Yates shuffle

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    VB6 - Fisher–Yates shuffle

    Attached is a short demonstration of the Fisher–Yates shuffle. In this particular case we wanted to be able to restore the shuffle back to it's original format, so we had to ensure that the Random number generator produced predictable results depending on the key supplied. To truly randomize the shuffle, you would need to use a better random number generator.

    J.A. Coutts

    Updated: 08/29/2021
    Attached Files Attached Files
    Last edited by couttsj; Aug 29th, 2021 at 11:26 PM.

  2. #2
    Lively Member
    Join Date
    Mar 2015
    Posts
    104

    Re: VB6 - Fisher–Yates shuffle

    Never heard of this shuffle till now. Thanks John

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: VB6 - Fisher–Yates shuffle

    I found a shuffle routine implemented in JavaScript, but unfortunately it doesn't produce the same results as the Fisher-Yates routine. I find it much easier to implement the JS routine in VB6 than the other way around, so I put the two of them together in the same program for comparison (attached).

    Which one is better?

    J.A. Coutts

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width