Emotionally Charged!


Hey it's been some time, I did not quit or give up, just been busy with other projects.

I finished the library some time ago, but did I really? I wanted to include some Ai decision making in the library and having some simple emotional simulation, but it is a pretty complex area. In my research I found an interesting article on an emotional model based on change in utility. This sounded like exactly the thing I was looking for! I had been considering a utility based Ai already and so this seemed like the perfect way to combine both those things into one solution.

I have been using ChatGPT in this project and outside with a lot of success, and I decided to try out Claude. I used Claude recently to write some HTML and it was far superior than ChatGPT in this, so then I thought how is it at C#.

I decided to pit each LLM against each other. I got both of them to write an implementation of the article I read and then compare each others. Claude seems to be able to to grasp the aim of the article much better, it said ChatGPT missed the point, although admitting ChatGPT's code was cleaner and better structured. So I decided to have Claude work off the ChatGPT code and correct the flaws in the implementation.

I didn't think this was enough to make good choices, I knew I needed a relationship system, but I also thought there needed to be more individuality, like different people make different choices in different situations, there are lots of different personality theories and desires and motivations and just so many different reasons.. So I thought what do I want to show in my games?  And I thought values is a great way to separate different behaviours, For values I used Schwartz's Theory of Basic Values , it seemed to have everything I need for defining different characters.

Another aspect I knew I wanted that would shape  decisions and interactions, is relationships! I have been working on different ideas how to express different relationships.  I started with the idea of love and trust, then Claude suggested respect and emotional debt. So then I decided a serie3s of spectrums seemed the best way and I continued from where Claude left off and kept adding more to define different types or relationships until I felt like I had everything considered, leading to the following list:

float Kinship -100: Unrelated → +100: Close family
float Attraction -100: Platonic → +100: Romantic/Sexual
float Affection -100: Hatred → +100: Love
float Hierarchy -100: Subordinate → +100: Superior
float Familiarity -100: Stranger → +100: Intimate
float Trust -100: Distrust → +100: Full trust
float Respect -100: Contempt → +100: Admiration
float EmotionalDebt -100: Resentment → +100: Gratitude
float Allegiance -100: Enemy → +100: Ally

I then made a brain class that would do all the decision making, it weighs the options, has the emotions and values and makes all the decisions. I went through quite a lot of different iterations until I finally got something that I felt represented the paper and was clean and simple implementation.

With this the library was now finished, again, and I got Claude to generate some documentation for it. I added the documentation and  pushed all my work.

My next task will be finishing my remake of Epic Prose, with a full tutorial on how to make the game using my library. Then I will finally be back to working on Endless Prose! My goal is still to finish it and enter it into IFCOMP and I hope you will come on the journey with me!

Leave a comment

Log in with itch.io to leave a comment.