Download presentation
Presentation is loading. Please wait.
Published byKerrie Joseph Modified over 9 years ago
1
Comp763: Modern Computer Games Using Constraint Logic Programming to Analyze the Chronology in a William Faulkner Story Jennifer BurgSheau-Dong Lang Irwin Chiu Hau Computer Science McGill University Winter 2004
2
Comp763: Modern Computer Games Overview Introduction “A Rose to Emily” by William Faulkner Constraint Logic Programming The Constraint Satisfaction Algorithm and Conflict Sets Useful Extensions Conclusion
3
Comp763: Modern Computer Games Introduction Narratives In movies: »Essential component –Every movie In games: »Interesting component –Some games
4
Comp763: Modern Computer Games Introduction A good story Quality »The storyline »Character Development »Plot twist »Logical
5
Comp763: Modern Computer Games Introduction A good story may have Flaws Conflicts Human beings are Sensitive to these issues Good in spotting conflicts
6
Comp763: Modern Computer Games Introduction Movies / Novels Conflicts could »Lead us to confusion »Ruin the storyline Games Conflicts could cause serious problems »Hinder game completion
7
Comp763: Modern Computer Games Introduction Dealing with conflicts Detecting Removing
8
Comp763: Modern Computer Games Overview Introduction “A Rose to Emily” by William Faulkner Constraint Logic Programming The Constraint Satisfaction Algorithm and Conflict Sets Useful Extensions Conclusion
9
Comp763: Modern Computer Games A Rose For Emily Novel Written by William Faulkner Originally published on April 30, 1930 The story Not told in chronological order Broken into countless pieces Very difficult to understand
10
Comp763: Modern Computer Games A Rose For Emily The challenge English literature courses »Story Analysis –Developing a list of the descriptive details associated with Emily ·Her appearance ·Surroundings – Reconstructing a chronological list of events This paper »Analysis –Events sorting –Conflicts detection
11
Comp763: Modern Computer Games Overview Introduction “A Rose to Emily” by William Faulkner Constraint Logic Programming The Constraint Satisfaction Algorithm and Conflict Sets Useful Extensions Conclusion
12
Comp763: Modern Computer Games Constraint Logic Programming In this paper, CLP is applied to analyze the chronology of “A Rose for Emily” What is CLP? Family of programming languages that allow »Declarative problem statements »Expression of constraints in specialized domains
13
Comp763: Modern Computer Games Constraint Logic Programming CLP language allows a programmer to Express a problem declaratively rather than procedurally »Augmented with expression of constraints –Integers, rational numbers and Boolean values –Equations and inequalities Find a solution »Solving the system of constraints –Resolution-based inference –Constraint satisfaction
14
Comp763: Modern Computer Games Constraint Logic Programming CLP is used to solve problems Circuit design Resource allocation Discrete optimization applications Analyze the Chronology in a William Faulkner Story Detecting conflicts in computer games
15
Comp763: Modern Computer Games CLP(R) Applied to Time Elements Analyze the Chronology in a William Faulkner Story ··· Table 1 Variables and Their Meaning
16
Comp763: Modern Computer Games CLP(R) Applied to Time Elements Table 2 Constraints and Their Meaning ···
17
Comp763: Modern Computer Games Overview Introduction “A Rose to Emily” by William Faulkner Constraint Logic Programming The Constraint Satisfaction Algorithm and Conflict Sets Useful Extensions Conclusion
18
Comp763: Modern Computer Games The Constraint Satisfaction Algorithm CLP program can be divided into two components An inference engine »Binding of variables A constraint solver »Each inequality constraint: a 1 x 1 + … + a n x n ≤ b »System of constraints
19
Comp763: Modern Computer Games Prolog PROgramming in LOGic A declarative language Knowledge Base »Facts Inference »Rules Query In this paper, CLP(R) is implemented in Prolog
20
Comp763: Modern Computer Games Conflict Sets The system Satisfiable Not satisfiable Not satisfiable => There are conflicts Conflict sets
21
Comp763: Modern Computer Games The Conflict in "A Rose for Emily" B ≥ E D – E ≥ 8 E = B
22
Comp763: Modern Computer Games Removing the Conflict The conflict uncovered by the CLP(R) Minimal conflict To resolve the conflict Removing any conflicting constraint In this example (A Rose For Emily) We choose to remove E = B And the solver finds 5 solutions
23
Comp763: Modern Computer Games A solution for “A Rose for Emily”
24
Comp763: Modern Computer Games Overview Introduction “A Rose to Emily” by William Faulkner Constraint Logic Programming The Constraint Satisfaction Algorithm and Conflict Sets Useful Extensions Conclusion
25
Comp763: Modern Computer Games Useful Extensions CLP(R) Useful for chronological sorting of events »In stories where events are related out-of-order. How is it related to games? Adventure games have »Events »Puzzles CLP(R) can be applied to games
26
Comp763: Modern Computer Games Useful Extensions Providing an graphical interface define points in time, indicate which points are before which others give dates where dates are known ask for a sort receive a list of conflicting constraints
27
Comp763: Modern Computer Games Overview Introduction “A Rose to Emily” by William Faulkner Constraint Logic Programming The Constraint Satisfaction Algorithm and Conflict Sets Useful Extensions Conclusion
28
Comp763: Modern Computer Games Conclusion Novels / Movies A story should not have any conflicts Games Puzzles and story should not have any conflicts CLP(R) is a powerful tool Can be used to analyze a story »Sort events »Detect conflicts
29
Comp763: Modern Computer Games Questions?
30
Comp763: Modern Computer Games
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.