Skip to content

Fix hex_ant and hex_snowflake: migrate to Mesa 3.x visualization API#377

Open
Harshini2411 wants to merge 4 commits intomesa:mainfrom
Harshini2411:main
Open

Fix hex_ant and hex_snowflake: migrate to Mesa 3.x visualization API#377
Harshini2411 wants to merge 4 commits intomesa:mainfrom
Harshini2411:main

Conversation

@Harshini2411
Copy link

@Harshini2411 Harshini2411 commented Mar 12, 2026

Fixes #357

Partially addresses #358 (hex_snowflake only)

  • shape_example and charts will be fixed in a separate PR

Changes

hex_ant (Fixes #357)

  • Changed relative import from .agent import Ant to absolute
    import from agent import Ant in model.py

hex_snowflake (Partially addresses #358)

  • Deleted server.py (old ModularServer approach)
  • Created app.py using SolaraViz + make_space_component
  • Updated run.py to import from app.py
  • Deleted portrayal.py (replaced by agent_portrayal in app.py)

Testing

  • Mesa version: 3.5.0
  • Python: 3.x
  • OS: Windows

Harshini2411 and others added 4 commits March 11, 2026 21:31
- Renamed server.py to app.py with SolaraViz implementation
- Updated run.py to import from app.py
- Deleted portrayal.py (replaced by agent_portrayal in app.py)

Fixes mesa#358
@Harshini2411 Harshini2411 changed the title Fix hex_ant: replace relative import with absolute import in model.py Fix hex_ant and hex_snowflake: migrate to Mesa 3.x visualization API Mar 12, 2026
@Harshini2411
Copy link
Author

@quaquel ready for review! This fixes hex_ant (relative import error) and hex_snowflake (migrates to SolaraViz). Fixes #357 and partially addresses #358.

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.

Fix hex_ant: relative import error prevents example from running

1 participant