CS 680: GAME AI
WEEK 5: DRAMA MANAGEMENT
2/13/2012 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2012/CS680/intro.html
CS 680: GAME AI WEEK 5: DRAMA MANAGEMENT 2/13/2012 Santiago Ontan - - PowerPoint PPT Presentation
CS 680: GAME AI WEEK 5: DRAMA MANAGEMENT 2/13/2012 Santiago Ontan santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2012/CS680/intro.html Reminders Change in schedule: Week 9 (March 12) will have an extended project help
2/13/2012 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2012/CS680/intro.html
extended project help session:
projects,
same purpose.
that needs to be re-explained?
“Adversarial Planning Through Strategy Simulation”
“Build Order Optimization in Starcraft”
“On-Line Case-Based Planning”
“Adversarial Planning Through Strategy Simulation”
“Build Order Optimization in Starcraft”
“On-Line Case-Based Planning”
them
Game Engine Player
Game Engine Drama Manager Player Game Adaptation Evaluation Function
Game Engine Drama Manager Player The Drama Manager modifies the game by executing DM Actions Game Adaptation Evaluation Function The Drama Manager
interaction between player and game: Player Actions
Game Engine Drama Manager Player Game Adaptation Evaluation Function The DM needs a function to assess interest / difficulty / boredom / dramatic effect / etc. Player model The DM needs an adaptation strategy that decides how to change the game to maximize the evaluation function
block or open paths)
with parameter ranges, and selects the appropriate pattern with the appropriate parameters.
dramatic effects (surprise/fear/calm/etc.)
player, and the expected lessons are learned.
adequate level
“Adversarial Planning Through Strategy Simulation”
“Build Order Optimization in Starcraft”
“On-Line Case-Based Planning”
get constantly stuck
simple example
Game Engine Drama Manager Player Game Adaptation Evaluation Function
Game Engine Drama Manager Player Game Adaptation Evaluation Function Is the player stuck? For how long? 1) Find what is the next step in the game 2) Provide some sort of hint
advancing in the game, and some of them are not
been executed for a long time
are relevant for advancing in the game
an ordered list of actions:
will be completed
Take kite Take soap Take water bucket Wash car Fly kite
counting when was the last time a new action from the “relevant action list” was executed:
Take kite Take soap Take water bucket Wash car Fly kite Executed at time 6s Executed at time 22s Executed at time 24s Current time: 90s Not yet executed Not yet executed Time stuck: 66s
actions in the list.
Take kite Take soap Take water bucket Wash car Fly kite Hint 1 (subtle): character says “Oh! A kite! I love kites!” Hint 2 (obvious): character says “I wonder what could I do with that kite?” Hint 3 (obvious): an NPC points at the soap and says “I wish I had had that soap last time I washed my car!” Etc.
subtle hint for the next action (if available)
Take kite Take soap Take water bucket Wash car Fly kite Executed at time 6s Executed at time 22s Executed at time 24s Next action, available clues Hint 7 (subtle) Hint 8 (obvious)
Game Engine Drama Manager Player Game Adaptation Evaluation Function
Action 1 Action 2 Action 3 Action 4 Action 5 Action 6 Action n
…
Time Stuck
Hint 1 Hint 2 Hint 3 Hint 4 Hint 5 Hint m
… Player Actions Hints Time
Game Engine Drama Manager Player Game Adaptation Evaluation Function
Action 1 Action 2 Action 3 Action 4 Action 5 Action 6 Action n
…
Time Stuck
Hint 1 Hint 2 Hint 3 Hint 4 Hint 5 Hint m
… Player Actions Hints Time DM also keeps track of which hints have already been given, for not repeating
the player form getting stuck
easily:
hints)
following a systematic approach and eventually advance
sign of frustration)
“Adversarial Planning Through Strategy Simulation”
“Build Order Optimization in Starcraft”
“On-Line Case-Based Planning”
way to infer what was the next action to be executed in the game to advance (list of “relevant actions”)
the game (Game Narrative):
Game Engine Drama Manager Player Game Adaptation Evaluation Function Narrative
reason about them?
games:
meaningful part of the story)
for the game designer to author games that tell good stories
Leave_house Get_flask Give_bum_flask Find_magical_shop Get_amulet Give_bum_amulet Discover_book_in_sewer Get_card Read_library_book
Subset of the plot points in Anchorhead
Leave_house Get_flask Give_bum_flask Find_magical_shop Get_amulet Give_bum_amulet Discover_book_in_sewer Get_card Read_library_book
Subset of the plot points in Anchorhead Plot point Get_amulet cannot be visited before Find_magical_shop
state”
Leave_house Get_flask Give_bum_flask Find_magical_shop Get_amulet Give_bum_amulet Discover_book_in_sewer Get_card Read_library_book
we used a simplified form of plot point graph to represent player progress:
Game Engine Drama Manager Player Game Adaptation Evaluation Function Action 1 Action 2 Action 3 Action 4 Action 5 Action 6 Action n … Time Stuck Hint 1 Hint 2 Hint 3 Hint 4 Hint 5 Hint m … Player Actions Hints Time
Simplified plot point graph
Complex plot point graphs Hierarchical plot points Complex ordering conditions (NOT, OR, AND, etc.) (Example plot point graph from the intro scene of a murder mystery game)
as a graph of plotpoints:
buy(player, flask)
give(bartender,player,flask) say(bartender,”Here you are!”)
plot point graph:
plot point
Beat
itself, e.g.: in Façade, “the characters talk about what to have for a drink”, or “Trip greets you at the door”
Beat Goal 1 Beat Goal 2 Beat Goal 3 Preconditions Postconditions Context
Beat
itself, e.g.: in Façade, “the characters talk about what to have for a drink”, or “Trip greets you at the door”
Beat Goal 1 Beat Goal 2 Beat Goal 3 Preconditions Postconditions Context Preconditions: What needs to be true in order to this beat to be executable Things that will be true after this beat ends
Beat
itself, e.g.: in Façade, “the characters talk about what to have for a drink”, or “Trip greets you at the door”
Beat Goal 1 Beat Goal 2 Beat Goal 3 Preconditions Postconditions Context Context defines any beat- specific responses that characters need to have in response to player actions Beat Goals define the sequence of events that need to happen in a beat. Each beat goal might have a repertoire of events that will be triggered once the goal becomes active.
person beaten to death.
Beat Goal 1: Police asks Goal 2: Player justifies Goal 3: Police moves on Preconditions:
Murder discovered Police sees player with a bat Player has no alibu
Postconditions: Player has alibi Context: If player moves away, police will block him
Goal 1: Build Up Goal 2: Sustain Peak Goal 3: Peak Fade Goal 4: Relax Director spawns enemies and threats until desired peak is reached Keeps spawning to maintain the peak for some seconds Waits for player to completely resolve the situation Waits for some fixed a mount of time, or until player advanced a certain distance
needs to be accomplished to complete the game
about the order:
next
sequencing beats to maintain the desired story arch
“Adversarial Planning Through Strategy Simulation”
“Build Order Optimization in Starcraft”
“On-Line Case-Based Planning”
Game Engine Drama Manager Player Game Adaptation Evaluation Function Narrative
players
the player
situations
getting bored
bored
times
needs to become easier
player is finding the game too easy
for a certain boss, the DM could force the player to learn how to use X by not spawning any of the other types of weapons (forcing the player to try X out)
the beginning (be a wizard, warrior, thief, etc.), a player model could be hardcoded for each player choice (representing populations of players that typically take that choice)
data
“Adversarial Planning Through Strategy Simulation”
“Build Order Optimization in Starcraft”
“On-Line Case-Based Planning”
Game Engine Drama Manager Player Game Adaptation Evaluation Function Narrative
evaluation function?
stuck
function, any of the techniques we covered in the RTS decision making lecture would do!
actions:
player and DM actions that can be executed.
player)
characters and objects, etc.)
visited
Game State
execute:
where the player and the DM alternate turns
each leaf
value
current state
state state state state state state action state action state action state action DM action DM action DM action DM action DM action
execute:
where the player and the DM alternate turns
each leaf
value
current state
state state state state state state action state action state action state action DM action DM action DM action DM action DM action
When propagating the values up the tree, DM action levels use the max
execute:
where the player and the DM alternate turns
each leaf
value
current state
state state state state state state action state action state action state action DM action DM action DM action DM action DM action
When propagating the values up the tree, player action levels use the average
end.
“discover murderer” plot point from happening for as long as possible (until very few other plot points are left to be visited)
search tree of the search-based drama manager
action
search is aborted, and restarted after player action
techniques can help
2.7 2.75 2.8 2.85 2.9 2.95 3 3.05 6 26 # of Cases for Player Modeling Rating of the Interaction No DM DM
DM helped player “I would have never thought (unless told by DM) that picking up the skull would ever be useful” With DM then without DM “I realized how much the DM had helped me in the first interaction only when I played the game without the DM” Game Endings “I felt that I could influence the particular outcome in the game” Liked the Game “Game allows you to discover game elements at ones
Player liked a plotpoint “I enjoyed solving the puzzle to find a magic lens”
agency away from the player
choose between different actions, and to which degree those actions have an effect in the game
system agency
“Adversarial Planning Through Strategy Simulation”
“Build Order Optimization in Starcraft”
“On-Line Case-Based Planning”
a specific game defined: Anchorhead
extend it if you need additional elements in your game to test your DM
accomplish (avoid player getting stuck, interestingness, etc.)
based, etc.)
provides hints at appropriate times
player
next week) to learn a player model, and try to maximize interest based on that player model.
“Adversarial Planning Through Strategy Simulation”
“Build Order Optimization in Starcraft”
“On-Line Case-Based Planning”