Can Some one Help me with this :(** In C++ write your create your hierarchy(ies) in a library for easy re-use. Make a sample simulation application which allows the user to choose names for the predators and prey, give them ranges of values for speed, birth rate, hunger, and food worth -- all wolves are equally fast or hungry and all rabbits aren't equally fast and food-worthy. Randomly create creatures to fill your population. Then simulate their interaction: do each creature gets a chance to 'spawn' then predators attack (a random prey) and prey flees (when attacked) if the attack succeeds, the predator 'eats' the prey remove those who have died of starvation and/or being eaten report the counts of predators and prey left repeat until _______? Common stopping conditions are the user tells you how many 'generations' to do, everything is dead, everything from either predator or prey is dead, or the system seems to be stable (the count of both populations over the past n generations is the same or oscillating -- this can be checked by keeping track of the recent maxes/mins of the population counts -- last 5-10 generations or so -- and seeing if the difference between them is converging). I'd implement the first three -- they aren't too hard to c
**Can Some one Help me with this :(**
In C++ write your create your hierarchy(ies) in a library for easy re-use.
Make a sample simulation application which allows the user to choose names for the predators and prey, give them ranges of values for speed, birth rate, hunger, and food worth -- all wolves are equally fast or hungry and all rabbits aren't equally fast and food-worthy. Randomly create creatures to fill your population. Then simulate their interaction:
do each creature gets a chance to 'spawn' then predators attack (a random prey) and prey flees (when attacked) if the attack succeeds, the predator 'eats' the prey remove those who have died of starvation and/or being eaten report the counts of predators and prey left repeat until _______?
Common stopping conditions are the user tells you how many 'generations' to do, everything is dead, everything from either predator or prey is dead, or the system seems to be stable (the count of both populations over the past n generations is the same or oscillating -- this can be checked by keeping track of the recent maxes/mins of the population counts -- last 5-10 generations or so -- and seeing if the difference between them is converging). I'd implement the first three -- they aren't too hard to combine or code.
Step by step
Solved in 2 steps