Vitenka: 1460
I made this / Cat Games - Less lag, more 'thats bad'
[vitenkas.morat.net]
/ MORAT / freespace / Catnews / Editorial
There's nothing to see here except for shadows of the past - and these ones won't be returning.

I'd point you to my next project here - but I'm not that organised. My style is to act and then sort out the consequences, rather than the other way around. Oh, and lying. I do that a lot too. (i.e. if you look closely, you may have seen some links appearing roughly once a week)

Vitenka.com is registered to me for the forseeable future, so you might find something there.

Edited by Vitenka at 2003-04-09 08:22:54

 
Vitenka : Thu 31 10:33:46 2002  
So, given a world of near infinite variety and complexity, a player whose expectations are infinite and a creator whose capacity is also infinite - what happens next?

When They Come, You Can Build It

I can't believe that I can't find this written down by me anywhere. I'm sure I had a copy. This is, then, version two of a rant - rewritten from scratch. It's purpose is to try and get me started on the creation of something that many people have tried to make before.

The Story Engine

A computer program which can write passable stories.

The Setting

MMOG. We have a whole bunch of objects in a world, which have various properties and can be manipulated by the player in various ways. The player, crucially, has an avatar - which is also an object in this world.

The Call

I want an engine that, somehow, writes coherent plots. I want the player to have full freedom to attempt anything - and whatever they attempt to end up being a sensible and logical part of the story that ends up being told.

Whereas a current world can support a player who runs around slaughtering random monsters - I want to be able to handle a player who tries to find out why there are random monsters. I want the players random decision to go east rather than west to actually have an impact. I want the player to be able to go "Of COURSE! Why didn't I see that earlier!"

And, crucially - I want to fake it.

Refusing The Call

This is a hard thing to do. To do it properly requires solving not one but several AI-Hard tasks. Luckily this means only solving one :)

AI-Hard problem: A problem the solution to which requires the solution to all other AI-Hard problems and which would solve all other AI-Hard problems. Creating a machine which passes the turing test is one such problem.

Ok, yes. I have two answers to this, the optimistic one and the realistic one.

Optimistic

I am as well placed as anyone else to make a breakthrough :) I have been dabbling informally in adaptive algorithms since my university thesis was about them. I have kept myself abreast of the successes and failures of such systems as lingo. So, why not try it? At the very least further research into this area isn't a bad thing.

Realistic

I am actually attempting to avoid the core problems entirely. Much of the plot engine will have to be prewritten - all of the rules as to what makes a 'good' plot or a 'bad' one will have to be tuned by humans. Pretty much I want an engine which can combine templates to come up with something 'good enough' and rely on the tendency of humans to spot patterns where none are intended and to attribute malice and forethought to random hardships.

I've Forgotten The Name of This Step - Getting a Kick Up The Ass

The Beyond mailing list finally sparked back up. I've been mulling these ideas over since before I started the synd-cats thread. They just always seemed too difficult to make an actual project out of. Yet I didn't want to consign them to the dustbin of a catnews column. (Which, as you may have noticed, is populated mainly with one-shot ideas)

So anyway - beyond. From the advertising pitch for beyond2:

Beyond 2 establishes a foundation for four types of virtual world simulation: Physical, Logical, Cognitive, and Narrative.

So, what some may have taken as a single throwaway line, I took as hope that there was a community of people already working on this very problem and providing frameworks I could work within. Suddenly my little diagrams of 'dragon, has views of being enemy here, viewed as powerful here, attached to this motive here...' started to seem possible.

Bumps Along the Road

Sadly, I hit a snag. Turns out that although the beyond person has indeed been thinking along these very lines - that's as far as he's got too. That teaser line is the totality of the documentation about the narrative framework.

Gathering Friends

But - the beyond person IS thinking along the same lines. And all it means is that I get to have a paw in shaping the API and the names of the structures...

Preparing Your Forces

So - what, exactly, do we have so far?

I know that I have objects in the world. And I can happily give them drives. AI to select which activity to pursue based upon various desires and the ease at which each can be pursued at any given moment is well established.

My 'important step' is two totally seperate things.

  1. I do not need to generate the full extent of the drive up front. Motives can be shadowy until the player starts to look into them - and only then do I have to fill them out. A drive can be as simple as 'attack the player' and only when the player decides to disarm the situation and try and talk reason into the attacker do we have to decide WHY.
  2. If we have a well populated world, then we will almost never need to actually create new things to support our story. Any well designed story has several key elements - one of which is that any given item in the story will tend to appear more than once. We can have multiple views on an object - at the same time - and simply choose a view to fit when we need an explanation.

My problem right now is that I'm thinking procedurally. (My procedure follows) whereas to actually build this system, I need to think structurally.

Procedure

Teach by example, I always say. The game sees that the player is about due for something to happen. It might decide this using anything from a simple timer to an analysis of the players actions that suggest he isn't actively pursuing any existing bits of plot.

The computer looks at the players local environment, and sets something in it to interact with him. A classic 'random encounter' is generated - a fairly helpless traveller is beset by bandits.

The player, being the bloodthirsty gamer he is, leaps in, drives off the bandits (the computer logs 'bandits attacked by player' as a past event. The bandits now have a small revenge motive tagged to it) and saves the girl.

Now we hit a snag. I want the player to interact with the girl - but I have no idea what th eposisble plotlines are. One possibility is to provide a whole set of stock phrases that the player can use. Another is to solve AI. The third is to do the next step NOW - a 'just in time' plot generator. For simplicity I'm gonna assume the former and do the plot generation 'just after' it is needed. I really want to be doing JITP though.

So the player chooses 'what are you doing here?' - and we have a problem. Can't really say "Well, the computer thought you looked bored so it told me to wander over here juust in time to get ambushed" No, that's not the kind of plot I want to generate just now. So.

  1. Well - it is possible (probably even) in a long running system that she already had motives. We do have to be slightly careful to pick one with the correct term to it (ie. don't report "I'm hungry" just becuase that's the most recent motive - pick the one that explains the longer term situation.) Perhaps she had a delivery to make?
  2. To speed up the example, I'm going to decide that we need to generate a good excuse, on the fly. The computer looks at the template for this girl, and sees several holes that need filling.

For starters - why was she in the forest? Random matching to available templates gives 'lives here' and 'passing through on a mission'

Second hole - why attacked by those people? 'In a fight' and 'Bandits' matches up really well with the 'valuable treasure' template. Great. Generate a shiny thing. Computer looks at the list of shiny things available locally and discovers a gem owned by a wizard. It's about the right level of treasure for the player to be interested - choose that.

So - "I was taking the bauble through the forest, it's needed in the village"

And from here the player can question in a number of ways. Perhaps he is suspicious - why didn't the wizard take it himself? (The wizard is busy with... big enemy is introduced to the plot) How did the bandits know you were carrying something that valuable? (I guess the wizard must have told them - which leads on to why the wizard is her enemy - perhaps she stole the item?) And so on.

Perhaps the player is gallant - he'll help guard her on her journey. At which point th game decides to have the bandits come back, or generate a force hired by the same people, or have the girl need to get away from the hero because she was lying about the village.

Or whatever.

Behind the Scenes

Templates. These are the critical driving force. I don't know yet whether they should be intrinsic structures that contain lists of candidate elements, or whether they should be functions that are a part of each motive and interact with drives to create 'likelihood' values or where they should be - but at some level the system need to know that 'bad thing attacks something - player gets reward' is a good plot, while 'dragon eats a tree, village elder sells apple' isn't. At least not without more explanation.

Conjunctions. The system needs to remember (and create into the future) events which are the meeting of several elements. These interactions can then be used as either goals (if set in the future) or as motives (if set in the past) for actors drives.

Drives. Actors need to want to do things. Every actor should have intrinsic drives (eat, sleep, make money, act like a tree, whatever) - but additional drives can be loaded on by the plot. There is much work already done by other people on realistically choosing which drive to satisfy at a given time.

Motive, or View. An element of the world is not just it in and of itself. Actors have different views on an element. One mans shiny treasure is anothers deadly poison. The leader of a cult could be a rival, a mentor, an enemy (hunter or hunted) or a harmless bystander - depending solely upon their prior and future interrelations.

Plausibility measure. Since I'm not going to try and build the whole world (and every myriad branching plot) right at the start, I need to keep a count of how 'likely' something seems. Too many unlikely coincidences and you lose any sense of reality - too few and everything seems boring. I can implement this as a drive on the players avatar. Creating things and re-using things uses it up while 'not much happening' increases it. Similarly I need to keep a 'cost' of things. For example rescuing a dragon from bandits is very unlikely, wheras rescuring a girl from a dragon makes more sense.

And THAT is Where the Fun Begins

I need to define the following in more concrete terms.

Motives have keys, and templates use those keys to fit things together.

Rings associate similar keys - with some sort of distance metric to say how likely a fit it is. Importantly, this isn't commutative. An example: 'Dragon' is a low cost fit for 'Powerful Foe' but 'Powerful Foe' is not a low cost fit for 'Dragon' - since 'Powerful Ally' is a good fit too. [that example isn't clear either. damn]

Anyway, there should be lots of these keys - and lots of ways they can turn into each other.

And that, combined with drives and a 'the player already knows about this, try to reuse it' list (as well as a 'the player has completely forgotten about this, leave it behind unless you come up with a really great match that makes him regret it' factor) allows you to create plots. I hope.

When we come to need an element of plot, we look for an existing good fit - with emphasis given on any 'obvious' fits (to try and fit the players expectations) - then any 'its nearby' fits, and then twist things to fit - which generates a new 'why do two people in the world hold different views/motives on this single thing' plot element which may be explored...

Obviously this needs some large element of randomness. You can't just take the best fit every time - the obvious explanation should not always be right, otherwise the player would end up only ever interacting with a single element - over and over.

JITP to expand one level of explanation ahead of the player (or possibly more) allows for a plot to seem more self contained and less arbitary.

My method here is 'scatter and merge' - create elements which fit the templates, find ways to link them together - then look for overlaps. You are hunting a great treasure, and you need a great enemey to confront at the end and minions first (fairly simple story) Dragons fit well, they have great treasure and are powerful. But they don't hire minions well - scatter again to fill the 'hire minions plot' with a dragon at the top - dragons are magical, wizards like magical things, wizards CAN hire minions. Match - now, what wizard and dragon exist in this world?

The Goal?

I would be happy if we could get automatic generation of "Dragon took my gold! I'll reward you!" plots that actually segued into each other. ( Dragon with gold trie to hire you, Having killed a dragon, the dragons students come to hunt you)

I would be wonderfully happy if plots got generated that interlinked; "Dragon took my gold, on the way meet a wizard who attacks you getting you turned into a small bird, that lets you sneak in to dragons cave, running with the gold the wizard confronts you again demanding his share, attacking the wizard ruins the town..."

I would be ecstatic if it could write a plot that actually surprised me.

On a seperate axis, I want it to be able to intertwine different peoples plots. It needs to know that two people cannot slay the same thing seperately - to handle the passing off of the object it was guarding...

At the top of that axis, it needs to cope with players being actual actors in each others plots.

I think that this is attainable. After all - when it comes down to it - most plots are very very formulaic. The telling of those plots, the interaction with elements - that is somebody elses problem.

I just want it to be able to follow the hero's twelve steps and fill in the blanks :)

But first, I need to pick my structures and identify exactly what I mean by a motive and a key...

Edited by Stormcaller at 2002-11-01 18:34:12

Older News  
Main News>>>
[M]
[Haiku]

[Rifle]
[MORAT]
[Fa-Teen]

 
[Froody Comics]



[Nifty Links]
[Editorials]
[Guilt Box]
You owe:
00:00
 
['Tenkas Tips]

This HTML design by Vitenka
I'm aware it sucks, but am also too lazy.
Note that now you've changed all the colours, it could be about anything!
BTW - this site looks fine in IE5 and netscape4. If you have a problem, if no one else can help, and if you can find it, maybe you can use - Netscape 2.