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

Pass through model.rgn in agent analogous to model.random #2400

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

quaquel
Copy link
Member

@quaquel quaquel commented Oct 23, 2024

This is a follow up PR from #2352. It adds a new property to Agent: Agent.rng. Implementation wise it is identical to Agent.random. This PR also explicitly adds tests for both properties.

@quaquel quaquel added the feature Release notes label label Oct 23, 2024
@quaquel quaquel requested a review from EwoutH October 23, 2024 06:41
Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 +1.6% [+0.8%, +2.3%] 🔵 -0.1% [-0.3%, +0.2%]
BoltzmannWealth large 🔵 +0.2% [-0.4%, +0.7%] 🔵 -0.3% [-0.8%, +0.2%]
Schelling small 🔵 +0.0% [-0.3%, +0.4%] 🔵 +0.0% [-0.4%, +0.4%]
Schelling large 🔵 +0.1% [-0.3%, +0.6%] 🔵 +0.8% [-0.3%, +1.9%]
WolfSheep small 🔵 +0.5% [+0.3%, +0.6%] 🔵 -0.0% [-0.2%, +0.2%]
WolfSheep large 🔵 +1.0% [+0.3%, +1.7%] 🔵 +0.5% [-0.1%, +1.1%]
BoidFlockers small 🔵 -1.0% [-1.7%, -0.2%] 🔵 -1.8% [-2.5%, -1.1%]
BoidFlockers large 🔵 -0.2% [-0.5%, +0.2%] 🔵 -2.0% [-2.6%, -1.4%]

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.

Very clean and consistent with the Model implementation

@quaquel quaquel merged commit 44276fb into projectmesa:main Oct 23, 2024
11 of 12 checks passed
@quaquel quaquel deleted the agent_rng branch October 23, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants