AI: Actually Intelligent? Also, OOO Monday

Hey Folks! I think we're getting somewhere with the AI code. After another productive day of tweaking, fixing, and cleaning, I think the AI is starting to be both intelligent and predictable.

I had to revert a change I made yesterday, and make the AI start considering random new interactions only after all known options were exhausted. Trying to do both at once was causing the AI to do harmful things to itself. But once I did that, I was starting to see progress. I could spawn a lone AI, with no experience, and watch it start trying options out. Then, as it found random interactions that made a difference, it started using them deliberately to address needs it had. Neat!

However, once a second AI entered the picture, I started seeing some bugs. First, AIs were using "self" interactions, such as seeking privacy, on others. That didn't make any sense. Also, AIs were seemingly having conversations with others that were already busy doing something else, resulting in a confusing jumble of interactions for the player to follow.

I made some changes and added some checks, and by the end of the day, even multiple AIs were starting to make sense. I could spawn a lone AI, let it start experimenting with a "self" interaction, then spawn a new AI, and it would avoid bothering the busy other AI when trying interactions. And later, when both were free at the same time, they could use each other to try interactions.


Edison randomly tries SeekFamily, sees that it helps her StatFamily, so then "Plans" on using SeekFamily again to help StatFamily before trying out SeekAutonomy on Bedford.

So, as mentioned above, I think we're where we want to be with AI code. The next step will be to start updating the rest of the interaction data to make use of this new code (only about half of them were upgraded for this testing phase).

After the above was finally working, I was able to rip out the old decision logic, buggy relationships system, and other redundant code/data. I'm pretty excited to get cracking on it next week!

Speaking of next week, Monday is a stat holiday in the US (Memorial Day), so I'll be taking the day off to be with my family. So enjoy the weekend, all, and see you Tuesday!


Anase Skyrider's picture
Anase Skyrider

Do NPCs have an omniscient knowledge of what other crew members are doing? Do they walk up to NPCs in order to find out if that person is busy? I also imagine that a lot of chat interactions should start with a hello of some kind. And if someone's irritable, they'd flip out before they actually find out what the other person wants.

dcfedor's picture

Technically, everything is still subject to change. A lot will depend on how it feels once the game is stable enough to playtest instead of just debugging.

That said, I can tell you where things lie now.

AIs are not omniscient. Each condition on an AI/Object has a "display" property, to control which are visible to strangers. So conditions like "Male" and "Preoccupied" are visible, while "Thirsty" and "Diligent" are not.

"Busy" is a special case, since it's used to avoid buggy behavior right now. An AI in the middle of something isn't allowed to start a new interaction until it finishes or else the game gets confused. So all AIs can see if their target is busy before approaching them.

I may change this some day so AIs can be interrupted, but that's a more advanced feature. It'll also be interesting to consider line of sight and how that affects this.

"Hello" and other greetings may be included, but may not be the way all interactions begin. Probably it makes sense the first time AIs see each other in a while (e.g. after waking up, after shore leave, etc.), but it wouldn't be natural to keep greeting the same person throughout a day (especially if stuck on the same crowded ship for weeks).

But again, a lot of this is in flux until paytest is possible and can reveal which is more fun.

Dan Fedor - Founder, Blue Bottle Games

Anase Skyrider's picture
Anase Skyrider

Thanks for replying.

So does a crew member not know that someone is busy until he/she walks up to the other person? Because that's what I was pretty much asking about. Like if a guy is looking for attention (like Simon), he might walk over to someone (Kaylee), and find that she's busy (tweaking the engine, maybe). Simon wouldn't know that Kaylee's busy until he walked over. That's what I wanted to know; if that was in the prototype. And this knowledge of whether or not someone is busy without walking over to them is what I was referring to about omniscience (I was using the word rather loosely).

The thinking behind them saying "Hello" to each other was less like a greeting, and more like an attention-getter. You don't walk up to someone and start a conversation just instantly (unless you're more rude, like Mal or Jayne). You'd be like "Hey" and then the person looks at you, and then you start talking. Or someone says "Hey" and then the other person might say "I can't right now. I'm busy." (or the generic equivalent), or if they're more grouchy, it'd be like "I'm busy. F**k off!". It'd be more interesting if this wasn't universally used 100% of the time, and how and when it's used be subject to personality traits or other conditions... But that's farther down the line.

Really, the only purpose in the 'Hello' is just to slow down some chat interactions by adding a step or two, and make it feel just ever-so-slightly like normal people are talking to each other.

I'm eager to see where you take the prototype, and where it takes you. The interaction interruptions sound cool, too. Would multi-tasking be possible as well? Like chatting while working on something? I'd imagine you'd wanna have it so that the thing being worked on progresses slower (like fixing an engine, or eating food), and would give the captain (the player) a reason to step in and tell people to get back to work (maybe you really want that engine fixed, or a short lunch break).

I hate to overload with my own input, though. It's your game (or I guess prototype), not everything will work, and I hope that wasn't too much reading. Have a good one.

dcfedor's picture

At the moment, Simon would magically know that Kaylee was busy while he was reviewing his list of potential options.

But that's just because it's still early in development. As the game gets more sophisticated, I'd like to explore things like what you're describing. AI might know of things on the ship that they cannot currently see, and would have to explore a bit to find out if that thing/person is available.

Ditto for things like interruptions and multi-tasking. I think they'd be doable with enough time, but it'll depend on what I can manage within my schedule. Like with NEO Scavenger, I have a huge (endless?) wishlist and I'll have to choose from it carefully :)

Dan Fedor - Founder, Blue Bottle Games