Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Dynamic Story Theory - Dropped

Here you can find anything related to the Open Source, Freelancer like game project Openlancer.

Post Wed Dec 28, 2005 12:35 am

Dynamic Story Theory - Dropped

Does anyone here have experience with neural networks? I have an idea...

I'm working on the storylines implementation part of the framework rewrite and I'm writing the social setting implementation sub-section. There really aren't a lot of options beyond inter-faction relations (e.g. a vague version of international politics of sorts), economic stuff, and pirate attacks. So I was thinking maybe we could build on that by developing a neural network to generate simulated faction cultures, media, politics, and other stuff. Something along the lines of SimCity or the Sims. I really have no idea how the AI in those games work but it doesn't need to be done in real time.

One of the neat features of RakNet is support for RPC (remote procedure calls) effectively allowing for the formation of parallel processing super computers that can make efficient use of periods of low CPU load on the client/player systems. So if each client were given a chunk of data to process it could do the processing work while the MP server manages the work load and all the data (just like SETI@home or any of the other @home data processing networks). If we added something like a thousand fake factions with ten thousand fake characters they could dynamically produce TV shows, commodities, news, rumors, NPC chatter, and possibly something that the player could become directly involved with (in a limited fashion). This would require a large amount of high level programming, scripting, and a massive volume of written material. It would be a long term feature to be implemented after everything else but it is possible.

If a process for generating these groups were streamlined then the work load would be shifted from the development team to the TLR community to write details for the factions and characters. Effectively this could also be used for dynamically creating new storylines with full campaigns and other stuff. I've seen AI chatter bots that'll talk your ear off if you let them but its generally boring stuff or verbose replay of stories the bot was told by other users.

So the problem is figuring out how to reliability generate dramatic story material. However one option is to run whole libraries of books through the AI chatter bot and then get it to tell stories based on those books. Problem there is the books must be painstakingly formatted in XML so the AI can correctly process the logic of the story. Alternatively we can develop algorithms that will generate the story procedurally but that would require extensive work by a small army of programmers rather than a community of writers.

Clarification: By feeding books to the chatter bot it can generate logic structures that can be used as templates to basically tell the same story but in a different setting and with different characters. To support TV shows, missions, and campaigns a system for interpreting the movements and actions of the characters in the story must be developed. Then the books fed to the bot would have to be carefully formatted to include extreme detail about the those movements and actions. Dialog is actually easy as long as its noted with quotation marks and includes a dialog source statement the bot can follow (e.g. <character> said, ”<dialog text>” ). Each character also needs to be profiled in the conversion process to include a highly detailed physical description for NPC generation and a voice profile for the text to voice engine. Character descriptions don't have to be exact, just enough to get the general scope of the character, so ranges of characteristics can be used (e.g. age range could be a number range or abstracted to “teenager” or “middle age” and then the character generation system can pick a random value within that range. Setting details are less critical since the story is being abstracted into the Openlancer setting (roughly similar to Freelancer). It might be easier to convert a movie script or play than a typical short story or even a novel. Fine tuning this monster system will also require figuring out how to translate emotional states into facial and body animation scripts. There are existing commercial middle ware systems that do most of this automatically but I can't find any free open source systems to do even half of it.

If this were done the groups would generate material for faction politics, media culture, civilian culture, corporate culture, and social concerns that would become the basic for TV shows, news, rumors, NPC chatter, missions, and campaigns. Note, obviously this would be almost entirely based on the story profiles put into the system, so the extent of the storyline material generated would be based on the volume of material generated by the TLR community.

Another problem is the AI chatter bot software we need is mainly closed source commercial products. So we need to develop some of this stuff ourselves if we want to be able to make the generated content truly dynamic. News, rumors, simple NPC chatter, missions, and campaigns can use templates that kind of work like CSS style sheets, they take a certain amount of prewritten text and fill in gaps with dynamic game data. Generating the prewritten text dynamically requires an AI chatter bot and the more diverse the subject matter the more complex the AI needs to be and also pushes the required processing power into an extreme range. The same is true of text-to-voice engines, most of the good ones are closed source commercial and used on things like customer service call centers and robots.

I honestly think that creating something akin to the Sims, SimCity, and similar games is possible and then routing that to the players via the TV streaming render data sub system is possible, along with everything else, the news, rumors, chatter, missions, and campaigns. So here are my questions:

Is anyone interested in this?

Does anyone have any ideas for how to develop this?

If a system were developed and we could write a manual to allow general TLR members to create the factions and characters would people be interested in working on this?

If a system were developed to process specially formatted text would anyone be interested in converting public domain fiction books into that format if a manual detailing the process was released?

Does anyone know of any systems that are able to dynamically generate stories?

Does anyone here play or know someone that plays the Sims 2 SimCity (current version ?), or similar simulated reality type games and can describe in detail the extent of what the characters can do by themselves? (maybe include specific examples or stories about their Sims characters)

Does anyone know exactly how the AI in the Sims 2 and those other games works?

Has anyone worked with complex neural networks before?

Are any programmers lurking in the background reading this?

Any other ideas?

And, uh, have I gone completely mad or as Blackhole was fond of saying, insane?


-Burn

Edited by - MegaBurn on 12/28/2005 8:53:02 AM

Edited by - MegaBurn on 1/4/2006 7:32:01 PM

Post Wed Dec 28, 2005 8:47 am

Note: I posted a reference to this thread in the Off Topic forum requesting that people read and reply to this thread. With that in mind I added more details but anyone not familiar with the Openlancer project generally need to know its a Freelancer sequel project thats showing a lot of promise. Specific things people need to know:

- RakNet is the network engine middle ware that will probably be used in the Openlancer game engine.
- Realm Forge GDK is the middle ware package we're using to develop the game engine for Openlancer and it supports a wide range of different AI types including limited neural networks. It's AI system is extensible so the GDK's neural network system can be extended to a far more advanced system without completely rewriting or even heavily altering the rest of the AI engine. Also note the AI will probably be one of the most advanced systems ever seen in an community developed game (won't surpass something like Bethsoft's Radiant AI engine though, thats a damn fine state-of-the-art AI engine there).
- Openlancer will probably be developed and released in multiple phases, starting with static systems on par with Freelancer and later with fully dynamic systems that surpass the new “next generation games” and a final release with some of these “extraneous features”.
- The radio and TV subsystems are features designed to allow the players to collectively create TV shows for their MP servers and a Openlancer Media Network that acts as a sort of TV guide. It will run on a global server and include listings from all Openlancer MP servers that use the main global server.
- More details can be found in the design doc, design doc thread, and my framework threads.

To everyone who followed the link in the Off Topic thread and replied: Thank you.

EDIT: Added clarification and fixed typos. Added details for people who followed the link in the Off Topic thread. Fixed more typos. Split the first post into two posts, seems there was a problem with the length of the post.


-Burn

Edited by - MegaBurn on 12/28/2005 8:54:40 AM

Post Wed Dec 28, 2005 1:41 pm

This is impossible without more OSS (open source software) middle ware and its taking time away from finishing the framework rewrite.

So far I've found three free open source TTS (text-to-voice) engines that should work but will require varying degrees of overhaul to integrate into the RF GDK (Realm Forge Game Development Kit) but I'm still researching this. IBM has released a number of TTS systems under open source licenses and its possible one of them might work as middle ware. The problem with the TTS engines is making sure they “play nice” with the 3D sound engine and the lower level sound API's and don't try to take over the sound system. The TTS sound stream gets routed through OpenAL (3D sound engine), the audio engine (SDL), and the lower level audio libraries (SDL again or DirectX). That is except for radio/TV mode where its routed through the VoIP audio processor in RakNet (speex codec) and either sent out over the network engine (RakNet again) or saved to a file in the media library in the user's profile. Just thinking about all that probably gives most people a headache and the volume of material I had to read to figure it all out is enough to make your eyes bleed. Thing is the TTS engine is going into the game engine one way or another for dynamic dialog, radio chatter, and probably the typical “sexy computer voice”.

I saw an AI chatter bot that won't work (ALICE bot) for this theory but just might work for the dynamic dialog system I wanted to add to the game engine anyway. So the problem here is finding the right AI chatter bot. It needs to be something extensible, easy to train, handles dialog templates well, can handle multiple databases, and is written in C++/C# but at the same time does not hog system resources. ALICE doesn't hog system sources, supports multiple databases, is hard to train, handles templates well, and isn't extensible (e.g. can't work with an animation engine or use motion tags or produce non-language sounds). But, I'm still looking.

I found a great dynamic facial animation engine with support for automatic lip-syncing, moods, aging, dynamic face generation (including random faces), is easy to work with, supports converting real photos into digital faces, will work with RF GDK, and its being used in Bethsoft's TES4 Oblivion -but- it costs about three grand... I can't find a free/OSS counterpart to it, just some static animation scripts. I haven't researched this much because I don't know a lot about graphics.

Now for the AI, I can't find a single decent AI engine middle ware package. I've read enough theory in the past week that I could probably build a suitable dynamic AI engine for this extreme add-on theory. I can't find an “artificial life” engine like the one used in the Sims 2, OSS or commercial. I did find a few academic engines but they're huge and intended to create something more akin to robot intelligence than anything we could use in the game engine. However, for the dynamic AI engine I want to add to Openlancer...lets just say I'm really excited about it.

On the networking side, I found systems for managing distributed processing, large data sets, and everything else required but we would still need a professional network programmer to code the network engine. This is true for this distributed processing system, the radio/TV system, MP server banks/links, and extending MP support from about a dozen players up to in excess of a hundred players. Its a lot of really complex stuff. RakNet only supports “turnkey” multiplayer for about a half dozen players but I think that can be pushed to about a dozen.

I haven't gotten to the data processing stuff yet but I think an overhauled version of DocBook's XML format could handle the literary content used in training the AI engine to dynamically generate the stories. However I was thinking about the notion of using algorithms and it might be possible to procedurally generate stories if the AI emotion algorithms were properly developed and trained. The drama would be bland and the action would be rather mindless but its probably better than a generic “story wrapper”/”drama wrapper”.

I'm going to leave this theory as is for now. If I find anything else to help develop this system then I'll post it but I need to finish up this framework. Then I must get back to my other projects so I can get back to this project in a few months or less. If anyone finds this stuff interesting or if you find anything on story, mission, and/or campaign generation please post it.


-Burn

"Only the dead have seen the end of war"-Plato

Post Wed Jan 04, 2006 7:32 pm

I was thinking about this some more and how about using a series of story templates, rather than use dynamic story content creation which kind of sets the game up to kind of create itself. We can do procedural content generation for all kinds of stuff but every step of the way the core of that content is removed from the creative potential of the community as a whole (thats bad). So if we could setup a highly detailed but easy to use series of templates with web based forms then writers could fill in the details. Then a content assembler could build those details into a full blown mission files, campaign folders, or other storyline parts that should seamlessly fit into the game.

Anything that falls outside of the range of the templates would still need to be created manually by the development team but mission creation would be far easier. So if a campaign with something like twenty missions was created most of those missions could be created by the writers through filling out forms. The rest could be created by the development team based on the designers and writers work. Then everything could be spliced together into a major campaign expansion pack mod.

To do this we need to break the story down into specific elements and create a list of all possible values type and formats for each element. Examples of element types are character files, dialog files, scene files, etc. Examples of formats are probably a half dozen different text formats, a couple audio formats, video files, etc. Then we need to create a series of forms to create each type of text file and name specific files for the non-text formats, however the text files can contain in-line binary data (e.g. open a small sound file in a raw text editor and copy & paste it into formated text file as a single data line). This will give us the basic information to development the templates.

The templates will then be different arrangements of these elements in a special form. So when a writer is creating a story they can load up a story form, select a template, fill in the details, and click build. Then manually edit the results or give it to a developer to edit for anything special that needs to be done, such as custom scripting.

This whole system can reach an insane level of complexity rather rapidly so I'm going to start a new thread with some structural outlines for the whole framework and then fill in the details in new threads for each structure, including story creation. This can transferred directly to a wiki for easier management and editing.


-Burn

"Only the dead have seen the end of war"-Plato

Post Wed Jan 04, 2006 9:36 pm

A template or other such mission creating utility would be wonderful. Custom campaigns would pop up everywhere, and if we want our game to last through the years, easy addition of content by normal people will help it greatly. Even though your much, much smarter than me, i'll throw out my idea of mission breakdown anyway:

Mission Name:
Mission Difficulty: (strings supported)
Mission Description:
Initial waypoint coordinates: x, y, z, [optional system name

[uEvents[/u
1. Name:
Condition: (List of conditions and their parameters, kind of like Age of mythology)
List Of Effects:
- 1. Effect Name:
Delay:
Effect Type: (List of effects and their parameters, again like Age of Mythology)
- 2. Effect Name:
Delay:
Effect Type:
2. Name:
Condition: (List of conditions and their parameters, kind of like Age of mythology)
List Of Effects:
- 1. Effect Name:
Delay:
Effect Type: (List of effects and their parameters, again like Age of Mythology)
- 2. Effect Name:
Delay:
Effect Type:


The structure is based somewhat on the Age of Mythology Triggers. An event has a condition, once that condition is filled, all the listed effects occur. If those effects have a delay, it waits until the delay is up and then fires the effect. Conditions range from distance to object, distance to waypoint, to is ship dead. Effects range from Mission Failed to teleport object . Both have parameters based on what effect or condition they are. Teleport object would have the parameters: Object and Destination.

Hope this helps.



Openlancer Lead Developer

Return to Openlancer