Skip to content

Commit 93e1114

Browse files
committed
updating changes
2 parents b5d57b6 + 298ff71 commit 93e1114

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
For the simulation,you will have the
2+
prey be some number(​r​)of road runner(s) and
3+
the predators are some number of coyote(s) (​c​).
4+
The agents (both prey and predator) exist in a bound [n​X​m​] uniformly space grid environment.
5+
Only one agent may occupy a cell of the grid at any given time.
6+
The environment is bounded, thus agents cannot move outside of the grid area.
7+
For every time step in the simulation, every agent will make an action based on its current state,
8+
and the states of various cells near the agent.
9+
10+
Roadrunners
11+
● Move​ If no coyote is in an adjacent cell, move in a random direction by 1 cell. If there is at least one adjacent coyote, move in a direction (1 to 2 cells) that will minimize the number of coyotes adjacent to the agent in the next time step.
12+
● Breed​ If at the end of a 3rd consecutive time step, there is a free adjacent cell, a new roadrunner is created.
13+
● Die​ If at any time a coyote occupies the same cell as a roadrunner, the roadrunner dies.
14+
Coyotees
15+
● Move​ Every time step, if there is an adjacent roadrunner, then move to that cell. If that cell is still occupied after the move, then eat the roadrunner. If no roadrunner is in an adjacent cell, move in a random direction by 1 cell.
16+
● Breed​ After the 8th time step, spawn a new coyote as we do roadrunners.
17+
● Die​ If a coyote goes 4 steps without eating a roadrunner, it dies before the start of
18+
the next step.
19+
During the execution of a simulation, the agents move in a random order each time.
20+
Thus, a roadrunner may move to a cell and then get eaten by a coyote it did not sense.
21+
Your program should take in various configurations for the simulations.

0 commit comments

Comments
 (0)