CS 680: GAME AI
WEEK 8: STORY GENERATION
3/5/2012 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2012/CS680/intro.html
CS 680: GAME AI WEEK 8: STORY GENERATION 3/5/2012 Santiago Ontan - - PowerPoint PPT Presentation
CS 680: GAME AI WEEK 8: STORY GENERATION 3/5/2012 Santiago Ontan santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2012/CS680/intro.html Reminders This is the last lecture! Next week will be a special project assistance
3/5/2012 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2012/CS680/intro.html
assistance session.
2-3 slides summary of the course. But it will be short.
“Towards Automated Game Design”
“Game AI as Storytelling”
“Towards Automated Game Design”
“Game AI as Storytelling”
many yet-unsolved problems:
Bill sings to Sarah. Sarah sings to
will do other dangerous things
stroke each other. They may chant of their difficulties and their
also have typewriters. That is interesting.
human authors
story generation research community. Specially applicable to video games
closely related
“Towards Automated Game Design”
“Game AI as Storytelling”
to a target state
A Table C B A Table C B Initial State Target State Possible actions: Take(X) Put(X,Y)
with nothing on top
A Table C B A Table C B Initial State Target State Solution:
are not satisfied, for example:
Current State:
Target State:
h(s) = 3
A Table C B A Table C B 3
S0 OPEN = [S0] CLOSED = []
A Table C B A Table C B 3
OPEN = [S1,S2] CLOSED = [S0]
A Table C B 3
S1
A Table C B 3
S2 S0 Take(B) Take(C)
A Table C B A Table C B 3
OPEN = [S2,S4,S3] CLOSED = [S0,S1]
A Table C B 3
S1
A Table C B 3
S2 S0 Take(B) Take(C)
A Table C B 3
S3
A Table C B 2
S4 Put(B,C) Put(B,Table)
that take us from an initial state to a target state
in particular story generation
“Towards Automated Game Design”
“Game AI as Storytelling”
problems to solve. When an event occurs, it is expressed in English, thus forming the text of the story. Central to the simulation, therefore, are the techniques for solving problems”
translated to natural language, thus forming the story
There was a nest in an ash tree. Wilma bird lived in the nest. There was some water in a river. Wilma knew that the water was in the river. George knew that the water was in the river. One day Wilma was very thirsty. Wilma wanted to get near some water. Wilma flew from her nest across a meadow through a valley to the river. Wilma drank the water. Wilma was not thirsty any more.
meadow through the valley to a river bank. George fell into the
get near the valley. George wanted to get near the meadow. George couldn't get near the meadow. Wilma wanted George to get near the meadow. Wilma wanted to get near George. Wilma grabbed George with her claw. Wilma took George from the river through the valley to the meadow. George was devoted to Wilma. George owed everything to Wilma. Wilma let go of George. George fell to the meadow. The end.
There was a nest in an ash tree. Wilma bird lived in the nest. There was some water in a river. Wilma knew that the water was in the river. George knew that the water was in the river. One day Wilma was very thirsty. Wilma wanted to get near some water. Wilma flew from her nest across a meadow through a valley to the river. Wilma drank the water. Wilma was not thirsty any more.
meadow through the valley to a river bank. George fell into the
get near the valley. George wanted to get near the meadow. George couldn't get near the meadow. Wilma wanted George to get near the meadow. Wilma wanted to get near George. Wilma grabbed George with her claw. Wilma took George from the river through the valley to the meadow. George was devoted to Wilma. George owed everything to Wilma. Wilma let go of George. George fell to the meadow. The end.
Story 1 Story 2 Initial state goal goal
state not yet satisfied in the current state, and tries to find an action to satisfy them.
the action “John bear ate X”.
state)
was in his cave. There was a beehive in an apple tree. Betty bee knew that the beehive was in the apple tree. Betty was in her
some honey in Betty's beehive. Betty knew that the honey was in Betty's beehive. Betty had the honey. Betty knew that Betty had the
Betty had the honey. There was a rose flower in a flowerbed. Sam knew that the rose flower was in the flowerbed.
Once upon a time Sam bear lived in a cave. Sam knew that Sam was in his
beehive was in the apple tree. Betty was in her beehive. Betty knew that Betty was in her beehive. There was some honey in Betty's beehive. Betty knew that the honey was in Betty's beehive. Betty had the honey. Betty knew that Betty had the honey. Sam knew that Betty was in her beehive. Sam knew that Betty had the honey. There was a rose flower in a
Goal: Sam bear not hungry
Once upon a time Sam bear lived in a cave. Sam knew that Sam was in his
beehive was in the apple tree. Betty was in her beehive. Betty knew that Betty was in her beehive. There was some honey in Betty's beehive. Betty knew that the honey was in Betty's beehive. Betty had the honey. Betty knew that Betty had the honey. Sam knew that Betty was in her beehive. Sam knew that Betty had the honey. There was a rose flower in a
Goal: Sam bear not hungry
Tale-spin knows (for each type of goal) the set of actions that can satisfy it. In this case:
One is picked at random
Once upon a time Sam bear lived in a cave. Sam knew that Sam was in his
beehive was in the apple tree. Betty was in her beehive. Betty knew that Betty was in her beehive. There was some honey in Betty's beehive. Betty knew that the honey was in Betty's beehive. Betty had the honey. Betty knew that Betty had the honey. Sam knew that Betty was in her beehive. Sam knew that Betty had the honey. There was a rose flower in a
Goal: Sam bear not hungry Goal: have something edible
Once upon a time Sam bear lived in a cave. Sam knew that Sam was in his
beehive was in the apple tree. Betty was in her beehive. Betty knew that Betty was in her beehive. There was some honey in Betty's beehive. Betty knew that the honey was in Betty's beehive. Betty had the honey. Betty knew that Betty had the honey. Sam knew that Betty was in her beehive. Sam knew that Betty had the honey. There was a rose flower in a
Goal: Sam bear not hungry Goal: have honey
Tale-spin knows (for each type of character) the set of thins they eat. In this case, a bear:
One is picked at random
Once upon a time Sam bear lived in a cave. Sam knew that Sam was in his
beehive was in the apple tree. Betty was in her beehive. Betty knew that Betty was in her beehive. There was some honey in Betty's beehive. Betty knew that the honey was in Betty's beehive. Betty had the honey. Betty knew that Betty had the honey. Sam knew that Betty was in her beehive. Sam knew that Betty had the honey. There was a rose flower in a
Goal: Sam bear not hungry Goal: have honey
Every time a goal is posted, Tale-spin generates text, to motivate the actions of the characters. In this case: “Sam bear wanted to get some honey”
Once upon a time Sam bear lived in a cave. Sam knew that Sam was in his
beehive was in the apple tree. Betty was in her beehive. Betty knew that Betty was in her beehive. There was some honey in Betty's beehive. Betty knew that the honey was in Betty's beehive. Betty had the honey. Betty knew that Betty had the honey. Sam knew that Betty was in her beehive. Sam knew that Betty had the honey. There was a rose flower in a
Goal: Sam bear not hungry Goal: have honey
Once upon a time Sam bear lived in a cave. Sam knew that Sam was in his
beehive was in the apple tree. Betty was in her beehive. Betty knew that Betty was in her beehive. There was some honey in Betty's beehive. Betty knew that the honey was in Betty's beehive. Betty had the honey. Betty knew that Betty had the honey. Sam knew that Betty was in her beehive. Sam knew that Betty had the honey. There was a rose flower in a
Goal: Sam bear not hungry Goal: have honey
Tale-spin searches among the possible actions that can satisfy “have honey”:
Take(honey) cannot be used, since its precondition is that “honey” is not owned by someone else. So, Tale-spin selects one of the
Once upon a time Sam bear lived in a cave. Sam knew that Sam was in his
beehive was in the apple tree. Betty was in her beehive. Betty knew that Betty was in her beehive. There was some honey in Betty's beehive. Betty knew that the honey was in Betty's beehive. Betty had the honey. Betty knew that Betty had the honey. Sam knew that Betty was in her beehive. Sam knew that Betty had the honey. There was a rose flower in a
Goal: Sam bear not hungry Goal: have honey Goal: persuade Betty to abandon honey
action, etc.)
contribute to the story are removed. For example:
Sam HAD THE HONEY. Sam KNEW THAT Sam TOOK THE HONEY. Sam KNEW THAT Sam HAD THE HONEY. Sam ATE THE HONEY. THE HONEY WAS GONE. Sam WAS NOT HUNGRY. Sam THOUGHT THAT THE HONEY WAS GONE.
somewhere, etc.
execute
set of possible ways to solve goals.
behaviors between characters):
characters’ behavior
sure that the story that comes out is interesting
involve multiple characters
goal
Initial state: characters and their relationships Goal: (churn Liz Neil)
Initial state: characters and their relationships Goal: (churn Liz Neil) Plot fragment subgoal subgoal
Initial state: characters and their relationships Goal: (churn Liz Neil) Plot fragment subgoal subgoal
Universe selects one of the plot- fragments from the library that can satisfy the goal at random, and posts any subgoals it might have.
Initial state: characters and their relationships Goal: (churn Liz Neil) Plot fragment subgoal subgoal Plot fragment subgoal
Initial state: characters and their relationships Goal: (churn Liz Neil) Plot fragment subgoal subgoal Plot fragment subgoal Plot fragment
Initial state: characters and their relationships Goal: (churn Liz Neil) Plot fragment subgoal subgoal Plot fragment subgoal Plot fragment
Some goals can be satisfied by plot fragments that do not have subgoals, ending the search for that branch.
interact in interesting ways
any interesting interaction is pure chance
(characters have their own goals)
characters, but it’s not enough to guarantee character believability
(bad stories): Tale-Spin
believable (they are forced to perform actions for the sake of the plot)
“Towards Automated Game Design”
“Game AI as Storytelling”
past solutions
cases)
problem) and adapt the solution (assess the result).
ago)
data representation
typically focused in simple data representations (feature vectors)
natural-language, etc.)
understood) problem
production line (e.g. engine failure detection in airplanes by Boeing, ink generation for phones by Nokia, etc.)
“Towards Automated Game Design”
“Game AI as Storytelling”
humans are not like that.
explored (hoping to increase the range of story types computers can generate):
humans are not like that.
explored (hoping to increase the range of story types computers can generate):
Student presentation next week: SAM Algorithm
problem of story generation.
generate stories. Nothing new was being created, other than what the system already knew.
computer system generate stories that are creative and interesting.
known to Minstrel
“goals”, “states of the world”.
“Knight does something and kills himself”
creative solution as to how did that happen. The result is a story.
solution to a problem:
solution to a problem:
If any of these problem can be solved. The solution can be transformed back to the
A creative solution
solution to a problem:
TRANSFORM RECALL ADAPT TRAM
adapt the solution to the original domain
saves a friend”
This is where MINSTREL solves problems. It can be recursive. When a TRAM transforms a problem, the resulting problem can be solved using another TRAM, etc.
Once upon a time there was a lady of the court named Jennifer. Jennifer loved a knight named Grunfeld. Grunfeld loved Jennifer. Jennifer wanted revenge on a lady of the court name Darlene because she had the berries which she picked in the woods and Jennifer wanted to have the berries. Jennifer wanted to scare Darlene. Jennifer wanted a dragon to move towards Darlene so that Darlene believed it would eat her. Jennifer wanted to appear to be a dragon so that a dragon would move towards Darlene. Jennifer drank a magic
Grunfeld wanted to impress the king. Grunfeld wanted to move towards the woods so that he could fight a dragon. Grunfeld moved towards the woods. Grunfeld was near the woods. Grunfeld fought a
with grief. Jennifer was buried in the woods. Grunfeld became a hermit.
Once upon a time there was a lady of the court named Jennifer. Jennifer loved a knight named Grunfeld. Grunfeld loved Jennifer. Jennifer wanted revenge on a lady of the court name Darlene because she had the berries which she picked in the woods and Jennifer wanted to have the berries. Jennifer wanted to scare Darlene. Jennifer wanted a dragon to move towards Darlene so that Darlene believed it would eat her. Jennifer wanted to appear to be a dragon so that a dragon would move towards Darlene. Jennifer drank a magic
Grunfeld wanted to impress the king. Grunfeld wanted to move towards the woods so that he could fight a dragon. Grunfeld moved towards the woods. Grunfeld was near the woods. Grunfeld fought a
with grief. Jennifer was buried in the woods. Grunfeld became a hermit.
A “princess” attempts a revenge And fails.
“Towards Automated Game Design”
“Game AI as Storytelling”
hard problem!):
Quests generated using patterns and parameters. E.g. “kill-enemy” pattern:
By selecting semi-random enemies and rewards, you can generate unineteresting, but almost infinite number of quests.
Fragments
completely generated by a single pattern)
patterns, like in Universe:
Many of these subgoals could be solved through additional plot fragments, making the plot more complex
Some patterns should be simple, and not decomposable into
the task of plot generation can end.
Universe’s or Minstrel’s techniques can be used to generate complex plots in RPG/Adventure games
Management (talk earlier today):
a new plot automatically
(human authored)
complex than it seems!
“Towards Automated Game Design”
“Game AI as Storytelling”