Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample with replacment for particles to copy in the dungeon #109

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

Mikolaj-A-Kowalski
Copy link
Collaborator

Until now, in case where the population was too little and some of the particles had to be copied, we sampled duplicates with replacement. This changes the algorithm to sample without replacement in that case as well.

A reservoir sampling is used to select sample of particle indices that will be duplicated at the end of the list.

For a case when to little particles were generated, ones for
duplication were selected using sampling with replacement. We change it
to use sampling without replacement instead.
Copy link
Member

@valeriaRaffuzzi valeriaRaffuzzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this great contribution, Mikolaj!

It looks much more rigorous than before.

@Mikolaj-A-Kowalski Mikolaj-A-Kowalski merged commit 6c2ba03 into main Jan 25, 2024
5 checks passed
@Mikolaj-A-Kowalski Mikolaj-A-Kowalski deleted the dungeon-no-replacement branch January 27, 2024 13:45
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.

2 participants