AI Conditions and Interaction Standards
Today was all about the data.
The first part was spent reviewing conditions from NEO Scavenger for those that would apply to the new space game. Things like nausea, diarrhea, some diseases, headaches, and the various physiological stages such as hunger, hypothermia, etc. These were extremely handy in NS because I could have standardized symptoms and other effects used across multiple situations. Diseases and fumes could both apply the "headache" condition without worrying about double-penalizing or maintaining two sets of headache data.
I have a nice, long list of discomforts now :)
I also converted most of the NEO Scavenger stats and physiology rates (blood restore, healing, temperature, insulation, etc.) to IS units for use in the space prototype. This way, I've got a lot of the same simulation data and algorithms already done and can use it right away in the space game.
Plus, I did a little code-digging, and was able to verify that AI would remember secondary effects of an interaction. At least to a degree. Things which immediately affected an AI as the result of an interaction (e.g. a headache, or being winded) would be logged, but things which took place later (e.g. gastroenteritis, increased metabolic rate leading to hunger) wouldn't be logged. This actually makes sense, as we tend to disassociate results that are too far removed from the cause. (See: smoking, drinking, overeating, making babies.)
This discovery means that my idea yesterday might actually work. Namely, that I can make standardized emotional "payloads" for most interactions. I could have, for example, a standard "praise" payload, which makes an AI feel more self-assured and well-liked, more socially-fulfilled, and a bit closer to needing privacy and altruism. Then, any of the interactions that fall into that category could just point to "praise" instead of having to copy data from one to the next, and update them all in case of a data change.
This approach was further reinforced as I reviewed yesterday's work and started noticing patterns in "payloads." While not exactly the same, most of my interactions seemed to fit into a smaller number of categories with very similar benefit/drawback patterns. So far, this list consists of:
And probably some form of commiserate, surrender, and comfort, too. Probably still more as the list of interactions grows. And so far, most of these have one set of values for the subject, and another for the object. (I.e. "us" vs. "them" in an interaction) This will make the data a lot more manageable and consistent, and if I really need it, I can still tweak individual interactions with plus and minus extras.
Once I have this done for the emotional interactions, I can follow-up with the mixed social/physical ones such as push-ups and toilet use, and the complete socio-physiological picture will be in place.
Then, I think I need to look into the AI conditions system to see if I can get it to support floating-point value changes, instead of simple integers. Ints were sufficient before I started having things like blood and immune system restoration rates, which are fractional values. I could try multiplying those rates by 1000 to shift the decimal point, but even then, adding a RateBloodRestore modifier of +25%, is hard to do if the base rate is non-divisible by 4. We'll see how doable that is, though.
Anyway, I feel like data made some significant steps forward today, despite not having much to show for it. Hopefully, getting this into the game will prove pretty easy, and I can start testing the simulation again soon!