• Member Since 24th Jun, 2012
  • offline last seen Oct 14th, 2023

KrisSnow


More Blog Posts70

Aug
12th
2014

Idea: More Lively LoE NPCs · 12:31am Aug 12th, 2014

Over the weekend I tried the MMO "Legends of Equestria", in early development. It struck me that the NPCs just stand there and typically have only one line to say, except for a few with a multi-line conversation with the possibility of branching.

I was thinking about the possibility of more lively NPCs. Here's one of several ideas that could be combined. Create a database-like structure of lines about various topics. Let each line have an associated skill and a difficulty/obscurity number (DC). Give each NPC a list of skills. Now, as a player, let me see a menu of topics. When I pick one, make a die roll which is "seeded" by the NPC's unique ID and the topic, so that it's always the same. Return a list of lines about the given topic, filtered by those lines whose difficulty is <= the die roll + skill.

Eg. I ask Professor Plum, botanist, about "fruit". Plum scans the list of lines that can be said about fruit, of which most have "botany" as their skill and a few have "geography". Plum rolls his 10 Botany + random 6 for one line, beating the DC of 15, but rolls 10 Botany + random 3 for another, failing DC 15. (His rolls will always be the same for a given topic.) By chance, he gets 0 Geography + random 10 on a third line. So now he has two lines he might choose from: "Fruit cultivation requires careful attention to soil quality," and "The best apples are said to come from Ponydale." The result is that I've asked about a topic, and he's answered with one of several answers which are randomly chosen, and drawn from a central knowledge base, yet different from the set of answers that another NPC with different skills (or even the same skills!) would give me. For comparison, the game "Morrowind" had a similar wiki-like system where the main factors in choosing a line were the NPC's faction, race, class and location, with no notion of skills and interests.

Though this system would be wiki-like (and I don't consider it real AI), it'd still give every NPC different knowledge reflecting their own interests and background, making them more than one-liner signposts. Further improvement of the idea would involve tracking which lines a character has spoken to a given NPC, recognition of which skills the NPC has, and some other basic memory of past interaction. Example:

(PC 1, Brass Lamp, approaches feathered pirate Captain Lexington.)
Brass: "Hello!"
Lex: "Hey, newcomer. What can I help you with?"
Brass: "You?"
Lex: [Unique personal line:] "I'm a pirate from the Corsair Isles, yaar! *giggle*" [Script-generated:] "I'm an expert on Oceans, Ships and Fighting. I also know a little about History."
Brass: "Corsair Isles?"
Lex: "They're an island chain to the north."
Brass: "Corsair Isles?"
Lex: "The Isles are tropical and full of pirates and buried treasure."
Brass: "Bye!"
(PC 1 runs off, using a teleport spell repeatedly. PC 2, Fugue, walks up to Lex.)
Lex: "Hello again! Haven't seen you since last weekend. Is that a new saddlebag? You asked me about Magic, but I didn't know anything; have you found anyone to explain that? Or are you here to ask me about the Corsair Isles like Brass Lamp a minute ago?"
Fugue: "Brass Lamp?"
Lex: "Tan unicorn with a lamp for a talent mark. Just met him a minute ago. He was teleport-spamming all over the place. I think he went north."

I believe that conversations like the above would be more interesting than what's there now, and fairly easy to program. Here, I'll put up some sample Python code I wrote while bored today.

Report KrisSnow · 345 views ·
Comments ( 16 )

Ooh, sounds neat. Have you mentioned it to the devs?

That sounds awesome!

You know, they're looking for system designers/programmers. You might want to try getting in on that action.

2363251
2363198
Thanks to your encouragement, I've sent them an application. I'd be interested in writing for them, too, not just trying to improve the AI of a pony MMO.

:trollestia: "Nothing can go wrong with this plan!"

2363443
Nice! Good luck! I look forward to seeing the results.

2363443 It actually sounds like you have a very good handle on how Good Old Fashioned AI (the non-dangerous kind used in games) actually works.
mylittlefacewhen.com/media/f/rsz/mlfw4256_small.jpg
:trollestia:The password is "swordfish".:trollestia:

2363443

Awesome! Let us know how it goes, eh? :pinkiehappy:

(And maybe design in a FAI while you're at it... :trollestia:)

Works for me. A pony-oriented game should be about making friendships.

Also, I don't know why, but after reading the proposed dialogue, my mind went to a silly achievement:
Shepherd Commander: End 100 conversations by saying "I should go."

2363687
I read a book specifically about game AI, and was frustrated at its premise: "Make it as fake and dumb as possible because your players won't notice or care." It's a self-fulfilling prophecy, since players then go "all NPCs can be is signposts and quest-givers." But even a little attention to learning and memory could potentially make game characters do things they don't do today, without having to delve into anything resembling FAI. Partly it's because of the disconnect between story and gameplay. Ulfric Stormcloak (true high king of Skyrim) has a long backstory, but zero knowledge as a game character other than some variables like "faction:Stormcloak". To get past that disconnect you'd need a game that allows for weird, robotic characters with no history beyond what their AI can "understand", so that everything they do is unscripted. But then you lose control of a human-written plotline too.

Right now I've got two different code files open: the dialog system mentioned above, and a slightly cooler experiment that goes from "sense a list of objects/people" to "notice this one's new" to "propose a 'greet' action because a stimulus/response rule" to "pick this proposed action". But, blah, those are like the second and first derivatives of what I'd really like to do.

2363737 But that's my job :trollestia:!

2364682

Throw all the programmers at the wall! :pinkiehappy:

Maybe one of them will stick.

2364581

Ugh, that sounds terrible. Good AI and NPC interaction is arguably the most important aspect that game devs need to shore up at this point.

Well, that (first derivative?) sounds pretty cool as is. Head and shoulders above a lot of other things, and at least on par with a more developed game. What is the integral you'd actually like to be going for, though?

Actually, I'd be down for a game that opened AI so wide that you couldn't have more than a very rough story down. You'd want a rougelike basis, so that you could emphasis width over length, at least to start with. Actually, thinking about it, you might want something built along the same idea as Star Citizen's economy system, which operates on actual supply and demand to create semi-random missions (shipping, guarding, pirating, etc.) that take on story aspects through necessity and let the player fill in the rest if they want.

A similar 'node' system, with initially randomized setups that then interact with each other outside of the player's scope to provide realistic front-end needs (and thus plot hooks), could potentially have mesh-like expanding replayability, actually creating a positive effort to enjoyment ratio gradient as more content is added.

Nom, new idea for a game. I'll put it in line. I'm thinking Visual Novel or simple RPG.

2366152

Good AI and NPC interaction is arguably the most important aspect that game devs need to shore up at this point.

I just feel like the fact we're saying this about a My Little Pony MMO means the world is very definitely doomed :rainbowlaugh:.

Also, let me go spend some time on attacking logical probability during my workday today...

2366152
I like the idea of an expanding world with NPCs interacting. For a while I did several related projects on the vague desire to sail around a world of tropical islands, trading with procedurally generated tribes. (My friends and I played a years-long fantasy RPG in a setting called Rym, with a race of Mary Sue otter-people.) "X3: Terran Conflict" has a neat free-market trader system, and I hear "S.T.A.L.K.E.R." has some AI where NPCs can complete quests. I could see doing a trade/exploration game like that, or even trying to make a "Phoenix Wright" game involving actually building a logical argument instead of following a script.

The original post would be the "second derivative". Basically just a signpost with a bit of memory. It's there for the player. The first would be an AI that wanders around taking self-maintenance actions (like maintaining a ship and eating) plus instead of having a fake backstory, being able to talk about what it's done and having a sort of mental state. "I've been at this for hours. Want to go eat?" As a pony you'd see this one at the cafe at night not because it's got a canned schedule, but because it randomly picks a place to eat when hungry and it has the owner listed as a friend.

The real "integral"? Something that can pass my old tests, especially 3.4 rather than fiddly ones like "line up the rocks". Beat those, and you have something humble that's more advanced than any AI I'm aware of. I proposed some other challenges for a more complex world, culminating in having a team of AIs cooperating to run a business to buy food and gear. What I actually have is some mostly years-old, dusty Python for experiments in semantic nets and decision-making, that kept banging up against basic design questions and never got far in the tests. (Especially with me constantly fiddling with the world-sim code, which is at least usable.) One big problem was, "Where's the balance between insanely complicated, and fake?"

Even the "derivatives" above would be cool to do. Needs a game to exist in, to be more than a tech demo.

2366509

Hmm, the first derivative sounds very interesting, though of course, a tremendous amount of work to adequately portray several cities worth of NPCs in distinct and interesting ways, without being wrong-context-sensitive. That's almost worse than blandness.

Hmm, those challenges look very interesting. I probably won't have time to try for a little while, at least, but I'll certainly give them a shot when I can.

Certainly, an AI that has the full functionality of those tests would be pretty interesting to interact with, but still may not provide the sort of interactions players are looking for.

A FAI would require an entirely different approach from the ground up, I daresay, while a game AI, as nice as being intelligent is, need only be as intelligent as is necessary to be an efficiently positive gameplay experience.

People like random generation and implied 'emergence', and that is fully attainable. However, creating subsections of vocalizable commands is a very deep rabbit hole, as the potential dissatisfaction at finding too many non-commands may outweigh the benefits of being able to pull off a slight conversation.

At this point, and without a full team of writers (and programmers, or a good programmed tool), highly varied and contextual multiple choice is likely the way to go. This would likely need to be underpinned by a very complex contextual choice generator to keep ongoing writing workload down to merely severe.

I would err on the side of keeping AI interaction down to the point where a direct line can be drawn between any given action, and the potential of a player enjoying that action, or the result thereof. Only interact behind the scenes if the player will see the result. Otherwise, fudge it. This will vary wildly from game to game, of course. In a 3D game, far more need be shown, while more can be abstracted in a lower fidelity medium.

The line between tech demo and game can be thin, if you do it right. I'm currently planning a string of small games which only focus on one particular aspect of game design, as much as possible. This allows for maximum focus, and makes sure the game stands or falls on the chosen aspect alone. That said, plenty of arcade games are really only combat/gameplay/mechanic oriented, while visual novels fall at the other end of the spectrum with narrative and writing, so it's nothing that new.

2366574
I agree that making a "thin" game built around one cool mechanic could work well. "Facade" was not much of a game but did show off one interesting storytelling concept. "Shadow of the Colossus" is missing some of what you'd expect in a normal game, but does one thing really well. Daniel Cook of Lost Garden has argued for building "the dumbest possible prototype" of a game idea to see if there's a fun mechanic, and that's worked well for me.

I don't quite agree about FAI needing a completely different approach than the challenges I talked about, though. The "derivatives" are just game ideas, yeah, but I really think the challenges are part of the real direction AI ought to go. CelestAI is presented as some kind of disembodied reasoning engine. I don't think you're likely to build something with a human-like mind unless it's embodied in at least a virtual world, to draw a connection between actions, speech, and perception. Also, where's the motivation? AI today is built around the assumption that it just sits there awaiting orders instead of having a vague standing task like "survive" that can drive countless, constant subgoals.

About "wrong context awareness", yeah. Doing better AI in a game like Skyrim could actually be jarring because it'd clash with the backstory. So, I say, make a game where the characters are supposed to be history-less robots, so there's no story to clash with and you're not in the Uncanny Valley.

2367761

Hmm, thanks for that link. Very interesting.
'Thin' is certainly a good starting point, I think. If it does well, then you can consider expanding with some assurance that at least the core is solid.

Well, it's not that FAI don't need to do those things, it's true. However, I can think of ~50 simple lines of code that would simulate hugely complex mental processes were they in a generalized model. You can make an increasingly realistic model, but if the back end is created overly artificially, it hardly gets any closer to an AGI. Consider it one integral up from your rule against memorized item places.

To me, it seems like making an AGI requires an extremely complex core that can then apply itself to any other area. I don't think it's on the same tech path as a Game AI.

To meet you halfway, imagine an AI that with code that doesn't branch at the game level, yet capable of playing multiple games, simply by applying the same code in different contexts, the way we do.

I'm not sure that the approach your challenges encourage would be directly useful in that context. Certainly some of the most basic in-game I/O interactions, like pathfinding and such, would be important, but most of the individual elements seem too specific to be generalizable.

Yep, agreed on the backstory business. That said, no reason you can't generate that too. Create a backlog a generation back or so before the player starts, and keep track of it. Fun.

Login or register to comment