Why not modals? – Toward Ron Newcomb

Ron Newcomb advocates using modals in his recent blog post.  And I agree, we should use modals in IF.  And I thing we would use them if we could easily.

So I think we should ask, what would be needed for us to use modals?

Ron uses the analogy of strategy games like chess to motivate his arguement.  Just as players in chess have plans and intentions, so NPC intentions could be queried in-game by the use of modal sentences.

My reply to Ron is that, I think that’s great, but it’s really not about modals.

In order for this kind of thing to even be an option, you *first* need to have a strategy game with well-defined rules.  That means the game must have a logical space which the NPCs can make moves in.  They must be able to sort for contingencies, in much the same way a chess program sorts for contingencies.

Really, that’s the challenge:  making that happen in a way that’s still story-like.  We will return to the “story-like” question in a moment.

As I currently see it, the programming end would require:

  • A sufficiently deeply-implemented simulator, to act as the “board” of the board game.
  • NPCs must be able to evaluate the board for value.  (This would be tied in to the NPCs goals.)
  • NPCs must have a menu of options which will change the board status.

–Now, I’ve said in the past that it would be fascinating to implement a minimal dungeon with a few locked doors and thorough attention to NPC verbs, that allows the NPCs to “play” the game ahead, in simulation, a few moves.  In other words, in this simple proof-0f-concept game, the NPCs would use the game engine itself to look into the future.

In other words, they would be omniscient and, for a move or two, prescient.

A year or so ago, Emily Short burst my bubble by pointing out that, to *really* get this to work, with every NPC having its own understanding of the game-board, you’d have to model the entire game once per NPC.  And, you’d have to model each NPC once for every other NPC…

However, I don’t see that as the real problem in creating deeper NPCs.  The real problem is simpler:

In general, we don’t understand human emotionality well enough to create NPCs that react to the simulator in emotionally salient ways.  So creating believable NPCs isn’t something we know how to tackle; and believable NPCs is a prerequisite to narrative.

But, we can probably fake it.  The Sims [TM] is a game that does not offer believable NPCs, but they are, apparently, “believable.” — People get sucked in.  In general, it seems a little bit of emotional salience goes a long way.  The lesson of the Sims ought to be that we don’t need to get a perfect portrayal of the human animal to make a good game.

(The reason the Sims is not a text game is that the graphics go a long way to sell the “humanity” of the NPCs:  another, less welcomed, lesson.)

I’m currently working on developing (in TADS 3) some interactive creatures.  Currently, I’m only to the point where they can find paths through an arbitrary map — provided the map has no one-way connectors.  Soon they’ll be able to wander on an invisible tether, respond to hunger, and chase and flee each other.

I’m thinking this could be useful in two ways:  one, to create a social backdrop against which the gameplay could happen; and two, to make the map more easily dynamic.  On this second point, for example, perhaps you couldn’t rummage through Lord Winston’s closet when the servant is around, but if you use a sausage to lure the hounds into the house, she’s too preoccupied to worry about you.

This is currently doable, of course, but having a set of general tools I think would make designing these dynamic, social puzzles easier.  You would no longer program a series of flags and state changes, but a set of behaviors.

Creating NPCs that strategically pursue emotionally salient goals is a long way off, but creating instinctively driven NPCs, that can learn where the food is, behave territorially, and dynamically make friends and enemies seems a first step.

Advertisements
Published in: on November 7, 2009 at 10:25 am  Comments (7)  
Tags: , , , ,

The URI to TrackBack this entry is: https://onewetsneaker.wordpress.com/2009/11/07/why-not-modals-toward-ron-newcomb/trackback/

RSS feed for comments on this post.

7 CommentsLeave a comment

  1. I could see modals working in a more straightforward way. The PC is in a room with Aunt Gertrude. At this point, the following commands might become sensible: ‘gertrude, should i trust janet’, ‘gertrude, should i kiss janet’, and so on. Or possibly, ‘gertrude, can i repair the jalopy’, gertrude, can i buy a diamond ring’, and so on. Trouble is, you need a way for the parser to grok that stuff. If we assume that the parser interprets it as a command (you’re asking Aunt Gertrude to perform the action should-i-trust, with janet as the direct object), it’s _barely_ within the grasp of the parser … but how do you alert the player that such commands will work, and how do you deal gracefully with commands that aren’t implemented? There may be ways….

  2. I just want to make the point that while most chess AI use a similar method, that isn’t to say it’s the only viable method. For example look at this paper (just the first hit on a google search):

    http://portal.acm.org/citation.cfm?id=1077960

  3. Jim – Yeah, the modals-just-as-another-command response came to my mind as I was reading Ron’s post. But, as Ron seems to be talking about writing non-hard-coded characters, who can respond to these new commands on the fly, it seemed to me that the fundamental question was how the machine would handle the data structures.

    George – Interesting point! I’ll read up on it.

    Meantime, a basic truth of human social strategy is that people differ not only in their goals, but also in their strategies and their understandings of the social space. More often than not, people are playing different games.

    Conrad.

  4. @Jim: I think the player-understanding issue you highlighted is key.

    When thinking about parser technology and input grammar in general, I usually go back when the Magnetic Scrolls people were (rightly) proud of their parser, because you could type ‘plant the pot plant in the plant pot’ and ‘put the sock with a bung in it into the hole in the boat’ or whatever it was. (Good puzzle, that one.)

    Twenty years later I don’t know if current IF parsers even cope (without author assistance) with the relative ‘with’ clause used in that second example. Certainly it’s possible to implement, but is that done for you? No idea, because I’ve not tried typing that in any recent game – actually, I and other people are perfectly happy to type ‘put sock in hole’. And game authors are perfectly happy to avoid creating situations where you need to distinguish between the sock with a bung in it and some other sock.

    So I think reducing things to basic commands with simple grammar is actually not really a problem.

    These commands are pretty expressive already. ‘ask gertrude about janet’ would do the trick for the example there, and that already features one ‘button’, one obvious noun, and one keyword. Making life more complicated for the player (and author) doesn’t sound like a great plan, especially given how few games have satisfactory responses to a high percentage of reasonable commands in the current limited formats.

    @Conrad: I agree the pseudo-simulation approaches have promise especially for background detail. (Like, if characters around a town tend to go toward their homes when it’s night-time, that sort of thing.)

    As for ‘should I save the princess’ I think if the player needs to ask that then the author didn’t write the story properly. And I don’t think we particularly need players to be able to get a response for ‘what would jesus do?’ (Or any other NPC.)

    Obviously I wasn’t particularly impressed with the original blog post – perhaps because it does seem to come from the mindset of ‘simulating a virtual world’. I think IF only pretends to do that at a thin surface layer. In reality it’s still, usually, about telling a story (possibly one with several variants) – not about building ever-more-detailed simulations. Details are generally simulated (like water models) only if they’re beneficial; the simulation is subservient to the story and puzzles.

    Just my opinions…

  5. OK, I’ve put off responding long enough, I suppose. First I’ll pick off the easy targets.

    “uses the analogy of strategy games like chess”

    I had in mind multi-player games like Catan or Axis & Allies, or even Diplomacy, because in a 2-player game there is no cooperation, and hence, no one to ask “what should i do?” or some such.

    “In order for this kind of thing to even be an option, you *first* need to have a strategy game with well-defined rules.”

    I’ve never met a strategy game without well-defined rules.

    “As I currently see it, the programming end would require:”

    Correct, the minimax algorithm is one way of doing so. But not the only way. The author can hard-code the appropriate responses to particular situations. Eric Eve’s Implicit Actions, Aaron Reed’s Intelligent Hinting, and Nate Cull’s Planner all do this via rules like, “when this situation occurs, first try this.” As for the situations themselves:

    “every NPC having its own understanding of the game-board, you’d have to model the entire game once per NPC. And, you’d have to model each NPC once for every other NPC…”

    While Montfort’s Curveship will do precisely that (at least at one level deep), we needn’t the whole world. Just as when it comes to identifying all possible actions, when remembering all possible states, prune prudently, especially by asking “is searching for lost items even fictionally relevant to begin with?” If not, drop the need to remember, and possibly drop the problem altogether (GO TO RUCKSACK).

    “we don’t understand human emotionality well enough to create NPCs that react to the simulator in emotionally salient ways.”

    Here I think you’re going off the rails — the original post is about querying the gameplay’s possible actions via in-game dialogue. While this could certainly be a tool in creating emotional salience for the player, it’s just a tool. Not a silver bullet.

    Re: Jim

    For those simple examples, whack off the modal & subject — not the verb — and set a global.

    After reading a command:
    if the player’s command includes “should i”:
    cut the matched text;
    now asking-should is true;
    otherwise […] false; […]

    George:

    Having now read the paper in its entirety, it indeed proposes an alternative to minimax: “chunking”, similar to the CopyCat project. But I-F doesn’t really need 18 move look-ahead or chunking IMHO. I-F isn’t complex enough [yet?]. The algorithm presented within doesn’t have saving CPU cycles or memory or complexity as its goal, it has simulating human cognitive perception as its goal. An informative read, but I found easier ways.

    Conrad again:
    Correct, I was, but sim and modals are separate concerns. “What should I do” is synonymous with HINT, for example.

    As for representing the information in a flexible, player-queryable way: planning trees, with options. Are you familiar with Reed’s Intelligent Hinting? He has the author hard-code a planning tree, with “winning the game” at top. That tree can auto-answer why, how, and if a node in the tree has more than one alternative for accomplishing something, the modals. Read http://www.skotos.net/articles/DAWNOF.shtml specifically articles #30 thru #32, then think about adding modals to it.

    Sam:
    ask gertrude about janet’s what? Her hair? Her reaction to the murder? Her current whereabouts? Etc. I disagree that that command was at all expressive. I also disagree that understanding more English makes life more complicated for the player, as most players are already quite familiar with it. For the author, sure. Not for the player.

    Re: “As for ’should I save the princess’ I think if the player needs to ask that then the author didn’t write the story properly”, you both bring up a good point and a common problem. Without granting player choice, the author is working in the wrong medium. But broadly, yes, understanding more English also lets in a lot of nonsensical commands. This is nothing new: EAT SWORD.

    As for sim elements, there’s a difference between simulation and gameplay. (And again a difference between simulation of physical phenomena versus cognitive phenomena.) The modals ask about gameplay possibilities, about choices of action. That requires more coding, sure, but whether it gets close to any kind of sim is a separate issue.

    (But it is true that certain kinds of “sim” I like. I.e., non-physical.)

  6. “I’ve never met a strategy game without well-defined rules.”

    It’s not the usual thing in IF, though. Not for NPCs to have winning and losing endpoints that they compete over.

    ““we don’t understand human emotionality well enough to create NPCs that react to the simulator in emotionally salient ways.”

    Here I think you’re going off the rails — the original post is about querying the gameplay’s possible actions via in-game dialogue. While this could certainly be a tool in creating emotional salience for the player, it’s just a tool. Not a silver bullet.”

    Querying the *gameplay’s* possible actions entails that the game *have* possible actions to query; that is, that the NPCs, presumably, have responses and opinions about what the PC could or ought to do.

    To have responses and opinions about what the PC does, they must have some ‘sense’ of how it affects them. If you’re talking about putting a hint system into the NPCs, then you’re right; that’s much simpler. But if you’re talking about NPCs having uniquely different biases, then that requires NPCs (for example) be able to get angry at the PC when he sets them back.

    Unless you’re talking about just rolling the hint file into conversation (which can be done easily enough), you’re talking about something that must be built on a great deal of other technology.

    “As for sim elements, there’s a difference between simulation and gameplay. (And again a difference between simulation of physical phenomena versus cognitive phenomena.) The modals ask about gameplay possibilities, about choices of action.”

    As I read you, Ron, you’re talking about simulation of cognition — just at a basic level. But what I’m saying is, that’s simishness.

  7. Ah, I think you understood me better than I understood you, then. Backing up,

    “In general, we don’t understand human emotionality well enough to create NPCs that react to the simulator in emotionally salient ways.”

    We can simplify that to a 3-way question: whether or not the outcome of the PC’s agency helps or hinders a given NPC. It’s not very deep of course — Blue Lacuna’s Progue is deeper, being 3 x 3 x 3 if I recall — but I think it’s enough for now.

    “As I read you, Ron, you’re talking about simulation of cognition — just at a basic level. But what I’m saying is, that’s simishness.”

    My comment was directed at Sam. It bothers me that many, many people equate “sim” or “simulation” with physics or setting only. So when I speak of complex AI, they think “complexity = sim”, “sim = physics”, and “physics = boring”.

    Which, in I-F, I agree: physics is pretty darn boring.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s