TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mfon uwa
NA
113
0
array please I need help
Oct 8 2009 2:37 AM
You are required to develop a prototype implementation of an Ecological Simulator using an object Oriented language of your choice. The implementation should use the object oriented features of your language appropriately. Initially the simulator must support two type of creature – predators and prey. The creatures live on a 2-dimensional grid of cells. An initial population of predator and prey are randomly distributed on the grid. The population evolves in discrete time steps. At each time-step creatures will move from one cell to another. If a predator creature finds a prey creature at its new cell it will "eat" it and its fitness will improve. If a cell contains two creatures of the same type they will "breed" by merging to produce a new creature of the original type but with fitness the average of the parent creatures. If a prey creature finds itself on a new unoccupied cell its fitness will increase (for having avoided being eaten). As it stands this will not produce a very realistic simulation of predators and prey! You implementation should allow for the extension of having some cells containing food to be eaten by the prey creatures, creatures being able to sense the contents of cells beyond their own and using this information as the basis for making a decision as to where to move at the next turn. You are not required at this time to produce a nice GUI base programme. The programme when run (for some number of generations) should print out a simple summary of the numbers of each type of creature in each generation.
Reply
Answers (
5
)
string to jagged array
Matrix addition array