Skip to content

Google Summer of Code 2025

Tom Pike edited this page Feb 9, 2025 · 8 revisions

GSoC with Mesa

Mentoring, Community, and Open Source Collaboration

Top 3 Ideas
Additional Ideas

Philosophy

Based on the dynamics of complex adaptive systems, Mesa assesses the open source community is the most powerful problem solving network in history. By connecting passionate people from across the world to explore potential solutions through computationally stored knowledge (i.e. code), humanity can solve problems faster and more effectively than ever.

Values

  • Be polite, we are all volunteers
  • Everyone has something to learn
  • Be curious, not judgmental
  • Every contributor's contributions ebbs and flows, its fine, contribute as you can

What to Expect

First, if you don't get selected it does not mean your proposal was not awesome and if you want you can absolutely still contribute. We welcome everyone who wants to participate. If Mesa gets selected this will be our second year, from our first year we were incredibly humbled by the number of proposals and the passion of the people who submitted. It truly hurts to say no to so many exceptional people.

Second, if you are selected, the typical rhythm is a weekly meetings that alternate between a discussion about what you are specifically working on for your project and the broader Mesa dev meeting (usually scheduled for 12:30 GMT on Tuesdays). We understand that this time might not work for everyone, so please don’t worry — if you have scheduling conflicts, we are more than happy to work with you to find an alternative that fits your availability. For your project you will be assigned a mentor with backups who will be available for one-on-one meetings, and you can also connect with us via chat and GitHub.

Always remember, the goal primary goal is not to complete the expected outcomes (although we will be ecstatic if that happens). The primary goal, in line with GSoC, is to give you development experience and help you gain an understanding of open source coding and community.

Explore the projects below to see where your skills and interests might fit in. Please feel free to reach out via Mesa's Matrix chat or via email to [email protected] with any questions.

Ideas List

  • Front End Upgrade - Enhance and stabilize Mesa's new Solara-based visualization system to improve robustness, performance, and user experience.

  • Mesa-LLM - Create an extension for integrating large language models as decision-making agents in Mesa simulations.

  • Mesa-Frames Upgrade - Stabilize and enhance Mesa-frames to provide production-ready support for large-scale agent-based modeling.


Front End Upgrade

Summary

Mesa recently transitioned to a new Solara-based visualization system that enables interactive, browser-based model exploration. While the core functionality is in place, there are several opportunities to enhance its robustness, performance, and user experience. This project aims to stabilize and extend Mesa's visualization capabilities, making them more powerful and user-friendly.

Motivation

The visualization system is one of Mesa's most important features - it allows modelers to see complex emergent behaviors and share their models with others. The recent transition from a Tornado-based system to Solara (PR #2263) brought modern web technologies and improved interactivity, but also revealed areas needing refinement. A well-functioning visualization system is crucial for Mesa's adoption and usability.

Historical Context

Mesa's visualization evolved significantly:

  • Initially used a Tornado-based server system
  • In Mesa 2.x, added experimental Jupyter support using Solara
  • Mesa 3.0 fully transitioned to Solara-based visualization
  • Recent major improvements include unified plotting backends (PR #2430) and API refinements (PR #2299)

Overall Goal

Create a visualization system that is:

  • Robust and performant
  • Easy to use for basic cases
  • Flexible for advanced customization
  • Well-documented with clear examples
  • Consistent across different spaces (grid, network, continuous)

Expected GSoC Outcomes

Core Improvements:

  • Add support for rotating markers to visualize agent orientation/heading (#2342)
  • Enable configurable visualization update intervals for performance (#2579)
  • Create an AgentPortrayalStyle class to replace the current dictionary system (#2436)
  • Allow direct model access and control from visualization (#2176)
  • Update Mesa Examples to use the new visualization approach

Visual Enhancements:

  • Improve grid drawing aesthetics and styling options (#2438)
  • Refactor Altair plotting backend to match Matplotlib's clean architecture (#2435)
  • Add support for all space types and property layers
  • Enable customizable color schemes and visual themes

Documentation:

  • Extend and improve the visualization tutorial
  • Document all visualization components and their customization options
  • Provide example implementations for common visualization patterns

Testing:

  • Add automated tests for visualization components
  • Create benchmarks for visualization performance
  • Set up CI testing for example visualizations (mesa-examples#137)

Skills Required

  • Required:
    • Python programming
    • Experience with data visualization libraries (Matplotlib, Altair)
    • Understanding of software design patterns
    • Basic knowledge of frontend development
  • Preferred:
    • Familiarity with Solara or similar frameworks
    • Experience with interactive visualizations
    • Understanding of agent-based modeling concepts
  • Level: Medium/Hard

Size 350 hours

Mentors

  • Primary: Tom
  • Backup: Jackie, Ewout

Getting Started

Mesa-LLM: Generative Agent-Based Modeling with Large Language Models Empowered Agents

Summary

This project aims to integrate large language models (LLMs) as decision-making agents into the Mesa agent-based modeling (ABM) framework. This project will enable more sophisticated, language-driven agent behaviors, allowing researchers to model scenarios involving communication, negotiation, and decision-making influenced by natural language.

Motivation

Current implementations of LLM-based agents often require significant manual coding effort and lack a streamlined interface for designing modular agent architectures. By providing an accessible and flexible API, this project will make it easier for researchers and practitioners to develop, test, and iterate on complex LLM-based agents for applications in areas such as collaborative problem-solving, simulation of human-like reasoning, and dynamic decision-making.

Overall Goal

To design and implement an extension for Mesa that allows users to create LLM-powered agents using a modular and user-friendly approach, by assembling reusable components like planning, memory, and reasoning modules. The extension will enable agents to interact using natural language, process textual data, and make decisions informed by LLM capabilities. The project will design and implement robust APIs, integration tools, and documentation to enable rapid prototyping of agents (e.g., Chain-of-Thought, ReWOO, Tree-of-Thought, etc) using different paradigms (e.g., sequential, class-based, functional approach, etc), facilitating research and experimentation in agent-based modeling and natural language reasoning.

Expected Outcomes

Core Features:

  • Develop modular components for defining and configuring LLM-based agents (e.g., interaction modules, memory systems, decision-making units).
  • Create built-in templates and presets for common use cases (e.g., ReACT agent).
  • These components will seamlessly integrate with existing Mesa functionality, leveraging the established framework for agent behaviors and environment interactions.
  • Users will be able to plug these modules into their existing simulations with minimal adjustments.

Enhancement & Improvements:

  • Support for integrating various LLMs and frameworks (e.g., Hugging Face, LLama, OpenAI).
  • Tools for visualizing and debugging agent behavior at the module level.

Documentation:

  • Comprehensive user guides for building agents using the modular API.
  • Tutorials demonstrating step-by-step construction of popular LLM-based agents.
  • Developer documentation for extending and customizing the API.

Testing & Quality Assurance:

  • Unit tests for individual modules and their integration.
  • Benchmarking against standard agent-based tasks to ensure performance and usability.
  • CI/CD pipeline to maintain high code quality and reliability.

Scientific Contribution

  • This project is expected to produce at least one scientific publication, such as a submission to the Journal of Open Source Software (JOSS) or a relevant venue in computational social science or agent-based modeling (e.g., SIMULATION). Selected candidate will have the opportunity to contribute to the publication process. This will include help drafting, refining the paper, and being listed as one of the authors, depending on the level of contributions.

Skills Required

  • Required:
    • Strong Python programming skills.
    • Familiarity with agent-based modeling frameworks like Mesa.
    • Experience working with large language models and their APIs.
  • Preferred:
    • Knowledge of advanced LLM techniques.
    • Familiarity with modular library design principles.
    • Experience in designing intuitive APIs for scientific computing.
  • Knowledge areas:
    • Agent-based modeling
    • Modular system design
    • Natural language reasoning and planning with LLMs

Project Size: 175/350 hours

Mentors

  • Primary: Boyu
  • Backup: Tom, Jackie

Recommended Bibliography

  • Cheng, Y., Zhang, C., Zhang, Z., Meng, X., Hong, S., Li, W., ... & He, X. (2024). Exploring large language model based intelligent agents: Definitions, methods, and prospects. arXiv preprint arXiv:2401.03428. https://doi.org/10.48550/arXiv.2401.03428

  • Gao, C., Lan, X., Li, N., Yuan, Y., Ding, J., Zhou, Z., ... & Li, Y. (2024). Large language models empowered agent-based modeling and simulation: A survey and perspectives. Humanities and Social Sciences Communications, 11(1), 1-24. https://doi.org/10.1057/s41599-024-03611-3

  • Ghaffarzadegan, N., Majumdar, A., Williams, R., & Hosseinichimeh, N. (2024). Generative agent‐based modeling: an introduction and tutorial. System Dynamics Review, 40(1), e1761. https://doi.org/10.1002/sdr.1761

  • Guo, T., Chen, X., Wang, Y., Chang, R., Pei, S., Chawla, N. V., ... & Zhang, X. (2024). Large language model based multi-agents: A survey of progress and challenges. arXiv preprint arXiv:2402.01680. https://doi.org/10.48550/arXiv.2402.01680

  • Lu, Y., Aleta, A., Du, C., Shi, L., & Moreno, Y. (2024). LLMs and generative agent-based models for complex systems research. Physics of Life Reviews. https://doi.org/10.1016/j.plrev.2024.10.013

  • Ma, Q., Xue, X., Zhou, D., Yu, X., Liu, D., Zhang, X., ... & Ma, W. (2024). Computational experiments meet large language model based agents: A survey and perspective. arXiv preprint arXiv:2402.00262. https://doi.org/10.48550/arXiv.2402.00262

  • Wang, L., Ma, C., Feng, X., Zhang, Z., Yang, H., Zhang, J., ... & Wen, J. (2024). A survey on large language model based autonomous agents. Frontiers of Computer Science, 18(6), 186345. https://doi.org/10.1007/s11704-024-40231-1

Mesa-frames Upgrade

Summary

Mesa-frames has proven to be a powerful extension for Mesa, offering significant performance improvements through vectorized operations on dataframes. This project aims to stabilize Mesa-frames, improve its integration with Mesa's core functionality, and establish it as a production-ready solution for large-scale agent-based modeling.

Motivation

Mesa-frames has demonstrated impressive performance gains (up to 200x speedup) by leveraging pandas and polars for vectorized operations. While the initial implementation is promising, there are opportunities to improve stability, expand functionality, and better integrate with Mesa's core features. Making Mesa-frames production-ready would provide the Mesa community with a robust solution for scaling agent-based models to handle thousands or millions of agents efficiently.

Historical Context

Mesa-frames was developed in 2024 as a GSoC project to address Mesa's performance limitations with large numbers of agents. Key developments include:

  • Initial proof-of-concept showing significant performance gains (Discussion #1939)
  • Support for both pandas and polars backends
  • Integration with Mesa's AgentSet API
  • Basic implementation of core Mesa functionality

Overall Goal

Create a stable, well-tested, and fully-featured version of Mesa-frames that seamlessly integrates with Mesa while maintaining its performance advantages. This includes expanding documentation, improving test coverage, and implementing missing Mesa functionality.

Expected Outcomes

Core Features:

  • Address outstanding issues in the mesa-frames repo
  • Implement missing Mesa functionality (e.g., PropertyLayers, NetworkGrid support)
  • Create a stable release cadence aligned with Mesa's releases
  • Improve continuous integration and testing infrastructure

Enhancement & Improvements:

  • Add support for more of Mesa's spaces (mesa-frames#6)
  • Implement GPU support through cuDF (mesa-frames#10)
  • Optimize performance for common agent-based modeling patterns
  • Support for discrete event scheduling (mesa-frames#9)

Documentation:

  • Expand tutorials with advanced usage examples
  • Create migration guides from Mesa to Mesa-frames
  • Add performance optimization guidelines
  • Document integration patterns with other Mesa extensions

Testing & Quality Assurance:

  • Implement comprehensive test suite covering all features
  • Add performance regression tests
  • Create benchmarks comparing Mesa and Mesa-frames implementations
  • Set up continuous performance monitoring

Skills Required

  • Required:
    • Strong Python programming skills
    • Experience with pandas and/or polars
    • Understanding of vectorized operations
    • Familiarity with agent-based modeling concepts
  • Preferred:
    • Experience with Mesa or similar ABM frameworks
    • Knowledge of GPU computing (cuDF)
    • Background in performance optimization
    • Understanding of continuous integration practices
  • Level: Medium/Hard

Size: 175 / 350 hours

Mentors

  • Primary: Adam
  • Backup: Tom, Jackie, Jan

Getting Started


Additional Ideas

These are projects Mesa would also like to pursue. Based on discussions among the contributor community, we prioritized the top 3. However, exceptional proposals can result in the community selecting these proposals contingent upon if Mesa is selected for GSoC and the number of projects we are allowed to execute.

Behavioral Framework - Build a comprehensive framework for managing complex agent behaviors, states, and decision-making processes.
Unifying Geospatial Support - Integrate Mesa-geo's capabilities directly into Mesa as a unified spatial modeling framework.
Mesa Blocks - Build an extension to Mesa that provide a low code/ no code capability so users can rapidly build custom models.

Behavioral Framework

Summary

Create a comprehensive behavior and state management framework for Mesa that allows agents to have continuously changing states, perform time-consuming tasks, and make decisions based on established behavioral theories. This project aims to provide Mesa users with powerful tools for creating sophisticated agents that can realistically model both discrete and continuous behaviors while following established behavioral theories.

Motivation

Mesa currently lacks first-class support for modeling complex agent behaviors that involve continuous state changes, time-consuming actions, and sophisticated decision-making. This makes it difficult to implement realistic agent behaviors like continuous resource depletion, parallel activities, or adaptive decision-making. By providing a unified framework, we can make it easier for modelers to create more sophisticated and realistic agent behaviors.

Historical Context

Mesa has evolved from simple discrete-time steps to support more flexible timing through the DiscreteEventScheduler. Recent discussions (#2529, #2526, #2538) and work (PR #2547) have laid the groundwork for more sophisticated agent modeling capabilities. This project would unify and expand these efforts into a cohesive framework.

Overall Goal

Create a unified behavioral framework that integrates continuous states, task management, and behavioral decision-making, allowing modelers to create sophisticated agents that can realistically simulate complex real-world behaviors.

Expected Outcomes

Core Features:

  • State management system for both discrete and continuous states
  • Task system for handling time-consuming activities
  • Behavioral framework supporting multiple decision-making approaches
  • Integration between states, tasks and behaviors

Enhancement & Improvements:

  • Priority and scheduling system for tasks
  • Support for interrupting and resuming tasks
  • State history tracking and analysis tools
  • Event system for state changes and task completion

Documentation:

  • Comprehensive API documentation
  • Set of tutorials demonstrating common use cases
  • Example models showcasing framework capabilities
  • Integration guide with existing Mesa features

Testing & Quality Assurance:

  • Unit tests for all components
  • Integration tests for framework interactions
  • Performance benchmarks
  • Example model tests

Skills Required
Required:

  • Strong Python programming experience
  • Good understanding of OOP and design patterns
  • Familiarity with agent-based modeling concepts
  • Experience with automated testing

Preferred:

  • Knowledge of behavioral modeling theories
  • Experience with discrete event simulation
  • Familiarity with state machines
  • Background in social science or ecology

Difficulty: Hard

Project Size: 350 hours

Mentors

  • Primary: Jackie
  • Backup: Ewout

Getting Started
Key Documentation:

  • Review discussions #2529, #2526, #2538
  • Study implementation in PR #2547
  • Examine Mesa's time management and event scheduling systems

Initial Tasks:

  • Review and understand the state management PR
  • Set up a test environment with Mesa's development version
  • Try implementing a simple model using continuous states
  • Join discussions on behavioral framework design
  • Read up on relevant literature

Unifying Geospatial Support in Mesa

Summary

Integrate Mesa-geo's geospatial capabilities directly into Mesa as a mesa.geo module, leveraging Mesa's new cell and continuous spaces architecture while preserving GIS functionality. This will simplify dependency management, ensure API consistency, and make spatial modeling more accessible.

Motivation

Mesa and Mesa-geo have evolved separately, leading to duplicate implementations and compatibility challenges. As Mesa adopts new space abstractions like the experimental cell space and reimplements continuous space, there's an opportunity to unify spatial modeling in Mesa. This would simplify maintenance, ensure consistent APIs, and make GIS features a first-class citizen in Mesa.

Historical Context

Mesa's spatial modeling has evolved significantly. The current grid system is being replaced by the experimental cell space system, which provides more flexibility and better performance.

Mesa-geo was originally developed as a separate package to add GIS capabilities to Mesa. Recent discussions about moving to a monorepo and the development of Mesa's new conceptual model of Space suggest the time is right for integration.

Overall Goal

Create a unified spatial modeling framework in Mesa that handles both regular and geospatial spaces through a consistent API, while maintaining full GIS functionality.

Expected Outcomes

Core Features:

  • Integrate Mesa-geo's core functionality (GeoSpace, GeoAgent) into Mesa as mesa.geo module
  • Adapt Mesa-geo to use Mesa's new cell space system as its foundation
  • Integration of GIS coordinate systems and transformations into Mesa's space framework
  • Unified property layer system that works across all space types (addressing #2431)
  • Migration path for existing Mesa-geo users

Enhancement & Improvements:

  • Refactor RasterLayer to use Mesa's PropertyLayer (mesa-geo#201)
  • Extend Mesa's continuous space to handle geographic coordinates
  • Support for GIS file formats (GeoJSON, shapefiles) in Mesa's core I/O
  • Improved integration with visualization system

Documentation:

  • Updated space concepts documentation
  • Migration guide for Mesa-geo users
  • New tutorials demonstrating integrated GIS features
  • API reference for geospatial functionality

Testing & Quality Assurance:

  • Test suite covering GIS-specific functionality
  • Benchmark suite for spatial operations
  • Example models demonstrating migration
  • CI/CD integration for GIS dependencies

Skills Required

  • Required:
    • Python programming
    • Understanding of GIS concepts
    • Experience with Mesa and/or Mesa-geo
    • Familiarity with spatial data libraries (Shapely, GeoPandas)
  • Preferred:
    • Experience with coordinate reference systems
    • Understanding of Mesa's architecture
  • Knowledge areas: Medium/Hard difficulty

Project Size: 350 hours:

Mentors

  • Primary: Jackie
  • Backup: Boyu

Getting Started

Mesa Blocks

Summary

Build a low code/no code extension so users can rapidly assemble and run custom agent based models

Motivation

Agent Based Models have always been challenge by the reality of complex systems - every detail does matter. This does not however, mean that building blocks from models cannot be reused. Have easily reusable building blocks that can be connected together with other core model parts or even opened up and customized can help users more rapidly assemble and customize valid models, while also helping people get better models faster to aid in their decision making.

Historical Context

Developing ways to rapidly build models has always been a hard challenge for ABMs and reusable building blocks represents an proven way to help mitigate this challenge. Mesa tried to build the ecosystem first but could not maintain it and there are other efforts to find solutions, notably Reusable Building Blocks for ABMS

Overall Goal

To have a prototype of low code/ show code approach that allows users to rapidly build and explore models.

Expected Outcomes

Core Features:

  • Users can drag and drop blocks to rapidly assemble models
  • Easily build new blocks and share with the Mesa community
  • Allow users to go into and customize blocks

Skills Required

  • Required:
    • Python programming
    • Experience with Mesa and/or Mesa-geo
  • Preferred:
    • Knowledge of No code/low code tools
    • Understanding of Mesa's architecture
  • Knowledge areas: Hard difficulty

Project Size: 350 hours:

Mentors

  • Primary: Tom
  • Backup: Jackie

Getting Started

Some possible starting libraries. The below was created with the help of ChatGPT but there may be some better options.

Library Strength Integration with Mesa
NodeGraphQt Full Python drag & drop system Possible best for custom Mesa UI
NoFlo Flow-based programming Needs custom Python adaptation
Node-RED Web-based flow editor Requires Node.js but works with Python
Unreal Blueprints No-code game simulation Best for Wargame AI/Mesa in Unreal