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

Change pd_grid example to use create_agents #2545

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

quaquel
Copy link
Member

@quaquel quaquel commented Dec 12, 2024

This modifies the prisoner dilemma example to use create_agents instead of a for loop.

Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 +0.6% [-0.4%, +1.6%] 🔵 +0.6% [+0.4%, +0.7%]
BoltzmannWealth large 🔵 +0.6% [-0.1%, +1.4%] 🔵 +1.3% [-0.2%, +2.8%]
Schelling small 🔵 +0.7% [+0.3%, +1.1%] 🔵 +0.8% [+0.5%, +1.1%]
Schelling large 🔵 +0.9% [+0.6%, +1.2%] 🔵 +0.5% [-0.3%, +1.5%]
WolfSheep small 🔵 +1.0% [+0.6%, +1.2%] 🔵 +3.5% [+2.2%, +4.7%]
WolfSheep large 🔵 -0.1% [-1.5%, +1.5%] 🔵 +0.3% [-4.0%, +5.2%]
BoidFlockers small 🔵 -1.6% [-2.1%, -1.2%] 🔵 -0.3% [-0.8%, +0.3%]
BoidFlockers large 🔵 -2.1% [-3.8%, +0.7%] 🔵 +0.1% [-0.6%, +1.0%]

Copy link
Member

@tpike3 tpike3 left a comment

Choose a reason for hiding this comment

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

LGTM

@tpike3 tpike3 merged commit e4e92f4 into projectmesa:main Dec 12, 2024
11 checks passed
@EwoutH EwoutH added the example Changes the examples or adds to them. label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example Changes the examples or adds to them.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants