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

bug fix and code simplification in hotelling #223

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

quaquel
Copy link
Member

@quaquel quaquel commented Oct 15, 2024

follow up from #198

@quaquel quaquel requested a review from EwoutH October 15, 2024 08:49
Copy link
Member

@EwoutH EwoutH left a comment

Choose a reason for hiding this comment

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

Awesome, appreciated, and really clean!

That all_cells.select_random_cell() is just such a handy construct to have!

Maybe we can even add random_cell and random_empty_cell properties to the spaces, so that you don't have to go via all_cells (just an idea, other PR of course).

@quaquel
Copy link
Member Author

quaquel commented Oct 15, 2024

Maybe we can even add random_cell and random_empty_cell properties to the spaces, so that you don't have to go via all_cells (just an idea, other PR of course).

Yes having it on the grid would be easy (as would be a method for drawing 1 cells with replacement and without replacement - Both can probably be added to `CellCollection first).

@quaquel quaquel merged commit 067acc1 into projectmesa:main Oct 15, 2024
2 of 3 checks passed
@quaquel quaquel deleted the hotelling branch November 11, 2024 18:48
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