Skip to content

Commit 27e320b

Browse files
quaquelpre-commit-ci[bot]EwoutH
authored
Update Readme.md of Boid flockers (#2404)
Co-authored-by: Ewout ter Hoeven <[email protected]> --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ewout ter Hoeven <[email protected]>
1 parent 6778a2d commit 27e320b

File tree

1 file changed

+5
-26
lines changed

1 file changed

+5
-26
lines changed

mesa/examples/basic/boid_flockers/Readme.md

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,17 @@
44

55
An implementation of Craig Reynolds's Boids flocker model. Agents (simulated birds) try to fly towards the average position of their neighbors and in the same direction as them, while maintaining a minimum distance. This produces flocking behavior.
66

7-
This model tests Mesa's continuous space feature, and uses numpy arrays to represent vectors. It also demonstrates how to create custom visualization components.
8-
9-
## Installation
10-
11-
To install the dependencies use pip and the requirements.txt in this directory. e.g.
12-
13-
```
14-
$ pip install -r requirements.txt
15-
```
7+
This model tests Mesa's continuous space feature, and uses numpy arrays to represent vectors.
168

179
## How to Run
1810

19-
* To launch the visualization interactively, run ``mesa runserver`` in this directory. e.g.
20-
21-
```
22-
$ mesa runserver
23-
```
24-
25-
or
26-
27-
Directly run the file ``run.py`` in the terminal. e.g.
28-
29-
```
30-
$ python run.py
31-
```
32-
33-
* Then open your browser to [http://127.0.0.1:8521/](http://127.0.0.1:8521/) and press Reset, then Run.
11+
* To launch the visualization interactively, run ``solara run app.py`` in this directory.It will automatically open a browser page.
3412

3513
## Files
3614

37-
* [model.py](model.py): Core model file; contains the Boid Model and Boid Agent class.
38-
* [app.py](app.py): Visualization code.
15+
* [model.py](model.py): Ccntains the Boid Model
16+
* [agents.py](agents.py): Contains the Boid agent
17+
* [app.py](app.py): Solara based Visualization code.
3918

4019
## Further Reading
4120

0 commit comments

Comments
 (0)