Skip to content

Implement Fisher-Yates shuffle#42

Merged
Absolucy merged 2 commits intoAbsolucy:mainfrom
jklott:main
Feb 6, 2023
Merged

Implement Fisher-Yates shuffle#42
Absolucy merged 2 commits intoAbsolucy:mainfrom
jklott:main

Conversation

@jklott
Copy link
Contributor

@jklott jklott commented Feb 4, 2023

Move from naive shuffle to Fisher-Yates shuffle as per #37

This implementation matches the expected distribution and removes bias: [99999, 100058, 100052, 100122, 100425, 99344]

Closes #37

Move from naive shuffle to Fisher-Yates shuffle as per #37
@Absolucy
Copy link
Owner

Absolucy commented Feb 4, 2023

Run cargo fmt.

Looks fine otherwise, I'll merge once all the tests pass (except for the Crush tests, I need to fix those)

@jklott
Copy link
Contributor Author

jklott commented Feb 4, 2023

Updated with cargo fmt.

@jklott
Copy link
Contributor Author

jklott commented Feb 6, 2023

@Absolucy Is this good to merge?

@Absolucy
Copy link
Owner

Absolucy commented Feb 6, 2023

Oh, yeah. Sorry, forgot.

@Absolucy Absolucy merged commit c6f3802 into Absolucy:main Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shuffle is biased

2 participants