Natural Selection

This year, I am taking AP Biology at LASA High School. Our first unit was Evolution and Natural Selection, which I find very intuitive; things that are able to survive can produce offspring, which inherit the traits of their successful parents. Mutations allow for new traits to appear in populations, and if these traits are advantageous, then they are likely to spread throughout the population. In an attempt to illustrate the simplicity behind this concept, after taking a test over the unit, I started coming up with the idea of a simulator. By this point, I had already created a charged particle simulator, as well as one for gravity. I began to come up with ideas, but other projects got in the way, and this project was placed on a back burner. Right before thanksgiving break, I decided to set aside my other projects and give this one a try. Over the break, I implemented producers, and created the framework for herbivores and carnivores. The next week, I noticed that my collision detection was not very efficient, so I implemented a grid system to optimize it. After this, I began to implement herbivores; however, the collision detection started to break down when herbivores started eating plants. Implementing concepts like those I discussed in my last post, I was able to discover that my issue was the result of using ids to label plant positions that I did not update after deleting a plant in the middle of my list. After fixing this mistake, I was fairly quickly able to finish herbivores and add carnivores.

Now that I have the basics of this simulator done, I plan to work on balancing the three organism types so that an equilibrium can be reached. I also still have a few bugs in collision detection that I need to sort out, and I need to do a lot of work on optimization. Overall, I have done a lot on this project over a short period of time, but there is still a lot left to do. I am aiming to have this project nearly completed (I would be lying if I said any of my projects are complete) by January, but I will see how things go.