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

meta_agents #2574

Closed
wants to merge 1 commit into from
Closed

meta_agents #2574

wants to merge 1 commit into from

Conversation

tpike3
Copy link
Member

@tpike3 tpike3 commented Dec 28, 2024

Summary

This PR is useful for creating meta-agents that represent groups of agents with interdependent characteristics.

New meta-agent classes are created dynamically using the provided name, attributes and functions of sub agents, and unique attributes and functions.

Motive

To allow for more complex models of multiple levels

Implementation

Method has three paths of execution:

  1. Add agents to existing metaagent
  2. Create new meta-agent instance of existing metaagent class
  3. Create new meta-agent class

Usage Examples

I added a basic example of alliance formation using the bilateral shapley value

Step 0- 50 Agents:
image

Step 8 - 17 Agents of increasing hierarchy added dynamically during code execution:
image

Additional Notes

Currently restricted to one parent agent and one meta-agent per agent. Goal is to assess usage and expand functionality.

- Add create meta-agents to experimental
- Add tests of meta-agents
- Add example with an alliance formation model in basic examples
@tpike3 tpike3 closed this Dec 28, 2024
@tpike3
Copy link
Member Author

tpike3 commented Dec 28, 2024

Forgot to save when I ran tests so build failing

Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 -0.1% [-1.2%, +1.0%] 🔵 +0.5% [+0.3%, +0.6%]
BoltzmannWealth large 🔵 +0.5% [-0.5%, +2.1%] 🔵 -1.0% [-1.8%, +0.0%]
Schelling small 🔵 +1.5% [+1.1%, +1.9%] 🔴 +104.3% [+103.7%, +105.0%]
Schelling large 🔵 +0.7% [+0.4%, +1.1%] 🔵 -0.7% [-1.3%, -0.2%]
WolfSheep small 🔵 +0.5% [+0.1%, +0.9%] 🔵 +5.5% [+0.5%, +10.2%]
WolfSheep large 🔵 +0.1% [-0.3%, +0.6%] 🔵 -0.6% [-1.3%, -0.0%]
BoidFlockers small 🔵 +2.1% [+1.4%, +2.7%] 🔵 +1.6% [+0.8%, +2.5%]
BoidFlockers large 🔵 +1.9% [+1.3%, +2.6%] 🔵 +0.6% [+0.0%, +1.1%]

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.

1 participant