mesa
mesa copied to clipboard
Visualization changes
Implemented additional core agent functionalities including adding a heading for rotational movements (forward, backwards, right, left, setxy). As well as, removal from scheduler and grid (die)
Thank you for the PR! I have seen @aiwhoo's presentation on your behalf from last month, and has been waiting for this.
Codecov Report
Merging #1278 (0858679) into main (04aca59) will decrease coverage by
1.87%
. The diff coverage is31.91%
.
:exclamation: Current head 0858679 differs from pull request most recent head 8a2b3fe. Consider uploading reports for the commit 8a2b3fe to get more accurate results
@@ Coverage Diff @@
## main #1278 +/- ##
==========================================
- Coverage 89.05% 87.18% -1.88%
==========================================
Files 19 19
Lines 1307 1280 -27
Branches 265 244 -21
==========================================
- Hits 1164 1116 -48
- Misses 104 131 +27
+ Partials 39 33 -6
Impacted Files | Coverage Δ | |
---|---|---|
mesa/agent.py | 43.75% <31.91%> (-32.73%) |
:arrow_down: |
mesa/visualization/ModularVisualization.py | 75.80% <0.00%> (+0.19%) |
:arrow_up: |
mesa/batchrunner.py | 93.72% <0.00%> (+1.44%) |
:arrow_up: |
mesa/visualization/modules/NetworkVisualization.py | 100.00% <0.00%> (+13.33%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 04aca59...8a2b3fe. Read the comment docs.
I think this PR is too big, and will take a while to be merged. It is better to make a separate PR that does only the Python part.
+1 for giving this a new name. From skimming the code this is primarily supposed to be for the continuous space, right? I think the name should be somewhat representative for that (don't know if it also works for grid, but I guess at least not for network)
We're working on breaking this PR into 2 pull requests: one for the ABM language (e.g. fd, bk, rotate, etc) in agents.py, the other for the visualization improvements (canvas, background images, shapes).
The ABM language would be for continous space, while the visualization improvements would be for all spaces.
We're working on breaking this PR into 2 pull requests: one for the ABM language (e.g. fd, bk, rotate, etc) in agents.py, the other for the visualization improvements (canvas, background images, shapes).
The ABM language would be for continous space, while the visualization improvements would be for all spaces.
@aiwhoo Thanks for the update!
Check out the reserved fields of hash.ai's hengine for inspiration for the names: https://hash.ai/docs/simulation/creating-simulations/anatomy-of-an-agent/state#Reserved-Fields.
// Can be used for custom movement logic. Will affect the agent's visualization
// Suggested values: 0 to 1 for each axis
"direction": [x, y, z],
// Can be used for custom movement logic. Will affect the agent's visualization
// Suggested values: 0 to 1 for each axis
"velocity": [x, y, z],
They most likely also have methods associated with those attributes. It's good to check their naming choice.
For context, hash.ai's hEngine is a performant ABM library written in Rust, with interfaces to Javascript, Python, and other languages.
Should we close this in lieu of two PRs or will this be one of the PRs?