A goal based dynamic action selection mechanism incorporating a model for emotions was developed for use with autonomous agents. An autonomous agent was developed to test the action selection mechanism by recreating the scenario of an animal foraging for food while avoiding predators. Four emotions of anger, fear, happiness, and surprise were modelled which were affected by events such as finding food, encountering a predator, encountering a boundary wall, finding a safe area, and being in a state of low health. The model incorporated a reward prediction module that altered the effect of an event based on the error between when an event occurred and when it was predicted to occur. The model also included a decay term that resulted in the emotions returning to their steady state values unless there was continual reinforcement through the occurrence of events. Four different temperaments referred to as irate, timid, cheerful, and anxious were used to study the effect of differing temperaments on the emotions.