Project Title: Mouse Trap
Link to sketch: https://editor.p5js.org/mld9095/sketches/-u6gqGiy5

Documentation & Reflection
For this project, I intended to mimic mice interactions with food, poison spray, and mousetraps. With functions like avoid() and seek() in mind, I aimed to have a mice object class seek out food, while avoiding the mouse trap objects, and having the user spray poison to get the mice to scurry away.
For my initial experiments, I first created a mouse (‘rats’) class that was attracted to food (‘cheese’); however, during this process I noticed that the mice would disappear when they reached the cheese. Additionally, on mousePressed I intended to have objects resemble poison spray, but when the mouse was pressed the steer force wasn’t strong enough to get the mice to move away from the food. Or, the mice would still continue to travel to the food, even if the steer force/mouse click moved the mouse object in some way. I had difficulty fixing this issue, so I changed my idea to having the food be presented on mouse clicked, attracting the mice, while having them avoid mouse traps.

While I intended to have the mice avoid the mousetraps, I faced challenges with using the avoid() function and having one object class avoid another object class. Following the NOC example codes, I believe there may have been issues with calling the avoid() function with an object class as opposed to a single object (ie. m = one new mouse vs. a for loop creating multiple mice). As shown in the process video below, I tried manipulating different variables to see if that had any impact on how the mice avoid the mousetraps; however, this seemed to not work and may need more exploration in the future. This project was an interesting exploration of autonomous creatures and their interactions with objects, each other, and environment. I found that combining different interactions (ie. seek, avoid, etc.) was the most challenging aspect of this assignment that created a lot of bugs, but I hope to continue learning about them as they created unique visuals and user interaction.
References:
- NOC example codes – seek(), avoid(), wander()



