Skip to content

Conversation

@ItsQuinnMoore
Copy link
Contributor

No description provided.

rht and others added 15 commits December 5, 2022 06:23
requirements: Pin Mesa version to 1.x
"Fixed capitalization."
Fix Capitalization of File Names
…e_tutorial_boltzmann

Update outdated readme for Boltmann example + trim requirements.txt
* Use Pathlib

Code by Phil Robare (versilimidude2)

* Use pre-commit

* Dropped unused imports

* used pre-commit to run pyupgrade, trim whitespace

* Remove pathlib changes

These belong in a separate PR.

* remove redundant black, move comment

as per rht's suggestions

---------

Co-authored-by: Catherine Devlin <[email protected]>
* Use Pathlib

Code by Phil Robare (versilimidude2)

* Add .pre-commit

* ran black

---------

Co-authored-by: Catherine Devlin <[email protected]>
* fix bug where agent gives money to itself in the boltzmann model example
* [pre-commit.ci] auto fixes from pre-commit.com hooks

---------

Co-authored-by: Houssam Kherraz <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
y = self.random.randrange(self.height)
energy = self.red_starting_energy
ant = Ant(self.next_id(), (x, y), self, moore=True)
self.space.place_agent(ant, np.array((x, y)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be a tuple (x, y) instead of np.array, because the latter can't be cached.

self.red_starting_energy = red_starting_energy
self.blue_starting_energy = blue_starting_energy
self.pheromone_evaporation_rate = pheromone_evaporation_rate
self.space = mesa.space.ContinuousSpace(width, height, True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.grid instead of self.space.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Encountered AttributeError: 'ContinuousSpace' object has no attribute 'get_cell_list_contents'. As such, I switched this to MultiGrid.


return portrayal

canvas_element = SimpleCanvas(ant_colony_portrayal, 500, 500)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reduced the canvas size to 50, 50. And was able to run the simulation just fine.

@rht
Copy link
Contributor

rht commented Apr 28, 2023

2023-04-28-015156_578x548_scrot

@rht rht reopened this May 17, 2023
@rht
Copy link
Contributor

rht commented May 17, 2023

Reopening so that there is a reminder that there is a WIP on this model.

@ItsQuinnMoore ItsQuinnMoore reopened this May 18, 2023
@ItsQuinnMoore ItsQuinnMoore closed this by deleting the head repository Oct 12, 2023
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.

9 participants