mesa icon indicating copy to clipboard operation
mesa copied to clipboard

Visualization changes

Open GaelLucero opened this issue 2 years ago • 9 comments

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)

GaelLucero avatar Apr 12 '22 19:04 GaelLucero

Thank you for the PR! I have seen @aiwhoo's presentation on your behalf from last month, and has been waiting for this.

rht avatar Apr 13 '22 00:04 rht

Codecov Report

Merging #1278 (0858679) into main (04aca59) will decrease coverage by 1.87%. The diff coverage is 31.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.

codecov[bot] avatar Apr 14 '22 10:04 codecov[bot]

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.

rht avatar Apr 16 '22 02:04 rht

+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)

Corvince avatar Apr 16 '22 06:04 Corvince

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 avatar May 25 '22 04:05 aiwhoo

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!

tpike3 avatar May 25 '22 09:05 tpike3

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.

rht avatar May 25 '22 10:05 rht

For context, hash.ai's hEngine is a performant ABM library written in Rust, with interfaces to Javascript, Python, and other languages.

rht avatar May 25 '22 10:05 rht

Should we close this in lieu of two PRs or will this be one of the PRs?

jackiekazil avatar May 29 '22 20:05 jackiekazil