diff --git a/paper/paper.md b/paper/paper.md index 8bd286b2eb0..f86a4dbdb6b 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -79,7 +79,7 @@ The central class in Mesa is the Model. To build a model, the user instantiates Central to ABMs are the autonomous heterogeneous agents. Mesa provides a variety of base agent classes which the user can subclass. In its most basic implementation, an agent subclass specifies the `__init__` and `step` method. Any subclass of the basic mesa agent subclass registers itself with the specified model instance, and via `agent.remove` it will remove itself from the model. It is strongly encouraged to rely on `remove`, and even extend it if needed to ensure agents are fully removed from the simulation. ### Agent management -One significant advancement of Mesa 3+ is expanded functionality around agent management. The new [`AgentSet`](https://mesa.readthedocs.io/latest/apis/agent.html#mesa.agent.AgentSet) class provides methods that allow users to filter, group, and analyze agents, making it easier to express complex model logic. +One significant advancement of Mesa 3 is expanded functionality around agent management. The new [`AgentSet`](https://mesa.readthedocs.io/latest/apis/agent.html#mesa.agent.AgentSet) class provides methods that allow users to filter, group, and analyze agents, making it easier to express complex model logic. ```python # Select wealthy agents and calculate average wealth @@ -102,7 +102,7 @@ Mesa 3 provides both discrete (cell-based) and continuous space implementations. Example grid creation: ```python - grid = OrthogonalVonNeumannGrid((width, height), torus=False, random=model.random) + grid = OrthogonalVonNeumannGrid((width, height), torus=False, random=model.random) ``` In Mesa 3, specialized agent classes for spatial interactions in discrete spaces were added: @@ -114,15 +114,15 @@ In Mesa 3, specialized agent classes for spatial interactions in discrete spaces All discrete spaces support PropertyLayers - efficient numpy-based arrays for storing cell-level properties. This newly added feature allows for agents to interact with spatial properties of the cell more easily: ```python - grid.create_property_layer("elevation", default_value=10) - high_ground = grid.elevation.select_cells(lambda x: x > 50) + grid.create_property_layer("elevation", default_value=10) + high_ground = grid.elevation.select_cells(lambda x: x > 50) ``` For models where agents need to move continuously through space rather than between discrete locations, `ContinuousSpace` allows agents to occupy any coordinate within defined boundaries: ```python - space = ContinuousSpace(x_max, y_max, torus=True) - space.move_agent(agent, (new_x, new_y)) + space = ContinuousSpace(x_max, y_max, torus=True) + space.move_agent(agent, (new_x, new_y)) ``` The space module is stable but under active development. The new cell-based spaces in Mesa 3 are currently being tested and considered feature-complete. The code snippets reflected in this paper are the future expected state of Mesa. Features not yet merged into core are imported from experimental: @@ -131,7 +131,7 @@ from mesa.experimental.cell_space ... ``` ### Time advancement -Typically, ABMs rely on incremental time progression or ticks. For each tick, the step method of the model is called. This activates the agents in some way. The most frequently implemented approach is shown below, which runs a model for 100 ticks. +Typically, ABMs represent time incrementally and call the units ticks. For each tick, the step method of the model is called, and the agents are activated to take their designated actions. The most frequently implemented approach is shown below, which runs a model for 100 ticks. ```python model = Model(seed=42) @@ -140,7 +140,7 @@ Typically, ABMs rely on incremental time progression or ticks. For each tick, th model.step() ``` -Generally, within the step method of the model, one activates all the agents. The newly added `AgentSet` class provides a more flexible way to activate agents replacing the fixed patterns previously available. +Before Mesa 3, all agents were activated within the step method of the model. However, the newly added `AgentSet` class provides a more flexible way to activate agents. These changes include the removal of the Scheduler API and its previously available fixed patterns. ```python model.agents.do("step") # Sequential activation @@ -156,7 +156,7 @@ Generally, within the step method of the model, one activates all the agents. Th model.agents_by_type[klass].do("step") ``` -Mesa also supports next-event time progression, currently in experimental state. In this approach, the simulation consists of time-stamped events that are executed chronologically, with the simulation clock advancing to each event's timestamp. This enables both pure discrete event-based models and hybrid approaches combining incremental time progression with event scheduling on the ticks as shown below.. This latter hybrid approach allows combining traditional ABM time steps with the flexibility and potential performance benefits of event scheduling. +Next-event time progression is an additional feature, which is currently in an experimental state with plans for support in the future. In this approach, the simulation consists of time-stamped events executed chronologically, with the simulation clock advancing to each event's timestamp. This enables both pure discrete event-based models and hybrid approaches combining incremental time progression with event scheduling on the ticks, as shown below. The latter hybrid approach combines traditional ABM time steps with the flexibility and potential performance benefits of event scheduling. ```python # Pure event-based scheduling @@ -170,7 +170,7 @@ Mesa also supports next-event time progression, currently in experimental state. ``` ## Visualization -Mesa's visualization system, [SolaraViz](https://mesa.readthedocs.io/latest/tutorials/visualization_tutorial.html), provides interactive browser-based model exploration: +Mesa’s visualization module, [SolaraViz](https://mesa.readthedocs.io/latest/tutorials/visualization_tutorial.html, allows for interactive browser-based model exploration. Advancements with Mesa 3 update the visualization from harder-to-maintain custom code to Solara, a standardized library. Usage of the visualization module can be seen below: ```python visualization = SolaraViz( @@ -191,7 +191,7 @@ Key features include: - Interactive model controls - Real-time data visualization - Customizable agent and space portrayal -- Support for multiple visualization types including grids, networks, and charts +- Support for multiple visualization types, including grids, networks, and charts ## Experimentation and analysis