The system will need to be built around generic rules, such that certain types of behaviors emerge as a result. My current thoughts are:
Any given state in the system should be remembered along with the emotional context of that state each time it is encountered. This emotional context should influence the actions taken in future semantically similar states. Actions define the possible branches from a given context. Whatever the particular combination of emotions the creature is experiencing should bias some actions over others, allowing the creature to try a variety of different actions in reoccurrences of a state.
Each emotion would have a range, and would diminish via logarithmic decay.
The level of fear in the creature would be increased based on:
- Unexpected or wrongly predicted state
- Level of future punishment predicted by the current state (due to past memories)
- Actual punishment
When the level of fear is above a certain threshold, the system would narrow potential actions to those which are least flavored by previous fears, preferring those with the least predicted punishment. This should result in the creature seeking a safe, familiar, predictable state when it is scared (running for cover, for example). If there are no options remaining, actions which involve the greatest number of motor commands would be chosen (aggressively lashing out, for example)
The level of curiosity in the creature would be increased based on:
- Unexpected or wrongly predicted state
- Level of future reward predicted by the current state (due to past memories)
- Actual reward
When the level of curiosity compared to the level of fear reaches a certain threshold, the system would narrow down potential actions to those which have the least amount of emotional flavoring, preferring those with the highest predicted reward. This should result in the creature seeking out unfamiliar, new states, allowing it to form a better model of the environment, as well as to seek out rewards. This should also result in a back-and-forth with fear behaviors (cautiously investigating after a threat has passed, for example)
The level of boredom in the creature would be the inverse of a logarithmic decay (opposite of the other two emotions). Boredom would increase over time, and be decreased based on:
- Unexpected or wrongly predicted state
When the level of boredom compared to the level of fear and curiosity reaches a certain threshold, the system would narrow down potential actions to those which have least frequently been tried in the current state. This should result in a back-and-forth with curiosity behaviors, allowing the creature to seek out new stimuli (when it finds itself "stuck in a rut", for example). This should also prevent the creature from finding a safe, familiar place, stopping, and never moving from there (since there isn't anything else like hunger or thirst to motivate exploration).