I did a really good job on reddit describing what the final version of DOT is going to be able to do as well as a lot of the challenges its facing. Pasting it here now:
We actually haven’t had a chance to get our technical writter to work on a full fleded document of everything it does.
If you want a TL;DR (Because I can go on for hours) the alpha is going to basically be like a dungeon master for an RPG game. You give it a list of your main characters, and their attributes, as well as a few key conflicts that happen in their plotline, and DOT files in the blanks and lets you play through the story it generates.
So I may create 5 main characters and say that one kills the king, DOT will work out everything that will hapen up until that point and then just let an AI simulation run after the plot point has been hit.
All that the prealpha version does is simulate what happens after your story is over. The alpha version can do simple conflicting plot lines (Two people want to be kings) and the beta version will be able to do extremely complicated conflicting plotlines (An entire army is invading a city while 5 factions fight over who wants to be king).
Think of it as a novel writing AI if you want
We actually have a very clear idea of how to implement this
A full document about 20 pages long should be ready sometime by the end of this month
It doesn’t connect up plot points before hand. It does emergent AI simulations while the player is exploring the world for the story. So it will simulate AI interactions in the background and how their actions eventually propagate to the player.
Problems with DOT
It works really well for open world games where they have like 50 hours of play time and can have DOT running on a background thread.
Since DOT is being designed for single player games primarily, we have the ability to drop LODs when the player isn’t near a certain area. And for scenarios where it isn’t just single player can offload computations to other players connected. While AAA games could do this, it would be looked down upon. Indie studios like our
own have an easier time getting away with this
Stuff like this hasn’t really been done client side, as these are more MMO -esk AIs. These type of systems are use to large amounts of RAM and lots of CPU cores.
There are of course faults in this, as the player can continuously pull the game away from its storyline, and there really isn’t much you can do to bring them back without it feeling horribly artificial. Since LODs are dropping, NPCs that weren’t meant to die can be killed off. This can cause weird plotholes occasionally, but if you’re in a world with 50K NPCs, its usually hard to notice this (I should add that we really only have to recalculate an NPC every 10 minutes or so, since advertisements like “Go to work” would take about that length). And of course, since computation is distributed among players, you can either have a single small server act as the central copy for everyone (But doesn’t do any computation itself) or you can run into the issues of doing p2p networking. Once again, this is usually isn’t as looked down upon when the studio is indie.
We haven’t figured out a way to prebake this from start to finish without just having players run through it and record the world’s AI interactions.
How some of it works
It isn’t mad-libs based. So if I create a plotpoint that says the king will always die, it won’t be a mad-libs where I just fill in the name for who kills the king. Its more of an NPC is created that is motivated to kill the king, and if the plot point fails (ie: The NPC gets killed), then the story digresses until the king gets killed.
Imagine a case like this:
An NPC is motivated to kill the king -> He dies along the way -> The king hears of his failed assassination attempt, and increases security -> The local inhabitants are angered by the excessive security and begin to rebel against the King -> The locals now have the motivation to kill the king.
This also does not manage pathfinding what so ever. Managing pathfinding would be far too much, as its more of a per game basis. Some games need flying NPCs while others don’t. It would make things too chaotic.
Performance
In tests this works. We haven’t done anything large scale yet, and we’ve only tested very linear plot lines. Its also insanely CPU expensive, but as I mentioned before we have VERY large time period to spread these computations over. We try to use every piece of hardware available to the player to help with this blunt though. We’re using their APU, their second GPU if they have SLI/Crossfire (Since more deferred rendering engines can’t utilize a second GPU anyway [And deferred rendering seems to be really popular right now]). We’re even working on a basic clustering API so the player can offload these computations to other nearby processor (We did some tests with the player offloading some basic NPC calculations to their Galaxy S5. It worked really well :D).
A high end computer has no issue running this SDK. The X99 processor we did some earlier testing on had zero problems peaking at 500K scores / second (Which would roughly equate to creating a few hours of plotlines for a city with the population size of Seattle in 30 seconds). What I’m mostly worried about are computers with less than 6 cores, since the performance increase with DOT from 5 cores to 6 cores is monumental. And since we have a game powered by DOT coming out sometime this spring (Or summer if it gets delayed. It may if we make some really cool features for DOT), I imagine most computers will sill be at 4 cores by then.
Of course since this is the version thats currently available for download, the Plan class and structure are not available; however, these create minimal overhead and actually greatly reduce the computational length of the calculations required since
A) It only computers nearest neighbour once per entity rather than once per entity per update
B) It does not immediately account for the negative aspects of an advertisement since we can assume that the NPC in most cases will be overwhelmed by passion rather than reason (Creates for some great drama in games :D)
B) Rather than calculating the definite integral over the two sigmoids like whats shown in the version that’s available, it computers a linearization and weighs the output score based off of its opinion about that advertisement. This is a LOT faster and its about 1/16th the CPU cycles per score.
In case you want some numbers: (Note that these numbers were calculated with the version that’s available for download right now. We pulled out multithreading since we couldn’t decide if we wanted to use boost or STL at the time. We’ve decided on boost since then.)
1 core reached 40K scores per second
2 cores reached 70K scores per second
3 cores reached 100K scores per second
4 cores reached 200K scores per second
6 cores reached 300K scores per second
6 cores reached 500K scores per second
7 cores reached 600K scores per second
8 cores didn’t want to function properly since we always had to have a core dedicated to error correcting :P. If
we disabled error correcting, it was well over a million scores per second (It was also a bottle neck on all the other benchmarks) but almost half the results were gibberish.
These numbers are from memory, so don’t quote me on them. Note that after 3 cores we started utilizing the APU (With OpenCL). We couldn’t really utilize them for 1 and 2 cores since creating buffers created too large of a bottleneck with that few cores.
This was also a perfect case scenario. We did not have to do any nearest neighbour searches since the entities new before hand which advertisements they wanted to utilize. In a real world scenario you would most likely be peaking at these numbers, but there would be no way to do them consistently. Removing the need to do nearest neighbour searches also improved the performance of error correcting. The actual numbers would most likely have been peaking at about 10% lower than what they’re presented as there.
NLG
As for conversations with NPCs, its encouraged :D. DIAG is a stochastic based Natural Language Generation system oriented for dialogue. (We don’t have a version of DIAG yet for narration. The dialogue version is mostly just concept code right now as well). DIAG, should IN THEORY produce some very interesting conversations between NPCs and between players and NPCs. The NPCs construct dialogue mostly based off their inference engines that I mentioned above. They retain opinions on most things in the world that they deem important to them, and try to push those opinions on others through dialogue. This in turn leads to some very interesting clustering among NPCs as they will naturally begin to group together into factions and groups. (We’ve had groups of NPCs try to start their own rebellion. It was fun to watch :D)
Stochastic Dialogue Systems:
http://repository.cmu.edu/cgi/viewcontent.cgi?article=2402&context=compsci&sei-redir=1&referer=http%3A%2F%2Fscholar.google.com%2Fscholar_url%3Fhl%3Den%26q%3Dhttp%3A%2F%2Frepository.cmu.edu%2Fcgi%2Fviewcontent.cgi%253Farticle%253D2402%2526context%253Dcompsci%26sa%3DX%26scisig%3DAAGBfm2u-Oz8whUidBZc0JRWUh_LrQy18g%26oi%3Dscholarr#search=“http%3A%2F%2Frepository.cmu.edu%2Fcgi%2Fviewcontent.cgi%3Farticle%3D2402%26context%3Dcompsci”
What we’re trying to make DIAG very close to:
http://onlinelibrary.wiley.com/doi/10.1207/s15516709cog0104_2/abstract (But I think this is the objective of most NLG systems :P. The difference is that our entire AI architecture was designed with dialogue systems in mind. All of our AI is needs based and inference based which is perfect for dialogue systems)
We have 7 planned modes for NPC communication:
-Help Seeking
-Gripping
-Info seeking
-Info Probing
-Assistance (Providing)
-Transaction (Just general trading)
-General (Just normal chit chat)
Each piece of dialogue is separated into segments. So if the player tries to buy a sword, the NPC may first use Info Seeking to figure out why, then just jump into a transaction.
The issue with DIAG is just how much data it requires. Even our simple tests (Right now DIAG is only a console application with 1/16th of the functionality I want it to have and a few dozen pages in a notebook of mine) it still requires 10GB+ of data to function.
While DOT is pretty close to being a reality, DIAG is still a year off from being beyond a solid working prototype. The DOT prototype is mostly ready, what I released was an earlier version of the prototype with half the functionality of what I wanted the prototype to be.