Skip to content

Conversation

@pragam-m25
Copy link

Thanks for opening a PR! Please click the Preview tab and select a PR template:

Summary

This PR adds a new diagnostic example demonstrating adaptive risk-taking agents.

Each agent:

  • chooses between safe and risky actions,
  • maintains a short memory of past outcomes,
  • adapts its risk preference based on recent experience.

The example is intentionally minimal and uses only core Mesa primitives.


Motivation

Many adaptive agent models in Mesa end up concentrating:

  • decision-making,
  • action execution,
  • memory updates,
  • and learning logic

inside a single agent.step() method.

This example is designed to make that complexity explicit, rather than hide it,
and to serve as a concrete, example-first input for discussions around
richer behavioral abstractions in Mesa.


Scope

  • New example only (no API or behavior changes)
  • Uses current Mesa patterns (no deprecated schedulers, no DataCollector)
  • Relies on model.random for reproducibility
  • Includes minimal smoke tests to ensure the model initializes and steps

Testing

  • Added smoke tests verifying:
    • model initialization
    • stepping without errors
  • Tests intentionally do not assert outcomes or dynamics

Notes

This example is exploratory and educational by design.
It does not propose new abstractions or patterns,
but highlights current modeling constraints through a working example.

@pragam-m25
Copy link
Author

@quaquel Thanks for the guidance earlier — moved this example to mesa-examples as suggested.

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