Narrative Narrative, Narrative Analysis, and Narrative Writing.
Logical Interactive Programming for Narrative Worlds
Transcript of Logical Interactive Programming for Narrative Worlds
![Page 1: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/1.jpg)
Thesis Proposal:Logical Interactive Programming
forNarrative Worlds
Chris MartensDecember 6, 2013
1
![Page 2: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/2.jpg)
My interest:supporting the design & analysis of game mechanics at a linguistic
level.
2
![Page 3: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/3.jpg)
Talk OutlineSection Purpose
Narrative Worlds define my target domain
Example: Blocks World
describe how CLF specification works
Supporting Interactivity and
Analysis
describe my language extensions (phases,
generative properties)Narrative Worlds,
revisitedgive more examples to show breadth of scope
Proposed Work & Evaluation Strategy
establish a plan to justify my thesis statement
thesisstatement
3
![Page 4: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/4.jpg)
Talk OutlineSection Purpose
Narrative Worlds define my target domain
Example: Blocks World
describe how CLF specification works
Supporting Interactivity and
Analysis
describe my language extensions (phases,
generative properties)Narrative Worlds,
revisitedgive more examples to show breadth of scope
Proposed Work & Evaluation Strategy
establish a plan to justify my thesis statement
4
![Page 5: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/5.jpg)
Narrative Worlds
5
![Page 6: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/6.jpg)
6
![Page 7: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/7.jpg)
emphasis on narrative“vs.”
emphasis on (open) worlds
“ludonarrative” = ludo (game/play) + narrative (story)
7
![Page 8: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/8.jpg)
http://garethrees.org/2004/12/01/ocarina-of-time/
8
Puzzle Structure ofLegend of Zelda: Ocarina of Time
![Page 9: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/9.jpg)
from Reddit/r/Minecraft
9
![Page 10: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/10.jpg)
Narrative Structures(Madame Bovary)
(Martens, Bosser, Ferreira, Cavazza ’13)
Emma spends her young years in a Covent
Emma reads romantic novels
Emma maries Charles
Emma is invited to an aristocrats ball
Leon falls in love with Emma
Rodolphe decides to seduce Emma
Emma and Leon meet again
The Bovary go to the ball
OR
Bored, Emma contracts debts
Emma realises Leon's love
OR
OR
Emma pushes Leon away
Bored, Emma contracts important debts Emma accept Rodolphe advances
Emma and Rodolphe relationship falters
Rodolphe breaks up
Homais and Emma persuade Charles to operate Hypolyte
Hypolyte is amputated
Emma purchases a prosthetic leg
Emma purchases a gift for Rodolphe
Emma accepts Leon's advances
Emma reimburses some of the debtEmma swallows the arsenic and dies
Emma offers a gift to Rodolphe
Emma gets sick
Mr Homais informs Emma about Mr Bovary's death
Emma's love for Leon falters
The tribunal pronounces the Bovary's ruin
10
![Page 11: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/11.jpg)
Emma spends her young years in a Covent
Emma reads romantic novels
Emma maries Charles
Emma is invited to an aristocrats ball
Leon falls in love with Emma
Rodolphe decides to seduce Emma
Emma and Leon meet again
The Bovary go to the ball
OR
Bored, Emma contracts debts
Emma realises Leon's love
OR
OR
Emma pushes Leon away
Bored, Emma contracts important debts Emma accept Rodolphe advances
Emma and Rodolphe relationship falters
Rodolphe breaks up
Homais and Emma persuade Charles to operate Hypolyte
Hypolyte is amputated
Emma purchases a prosthetic leg
Emma purchases a gift for Rodolphe
Emma accepts Leon's advances
Emma reimburses some of the debtEmma swallows the arsenic and dies
Emma offers a gift to Rodolphe
Emma gets sick
Mr Homais informs Emma about Mr Bovary's death
Emma's love for Leon falters
The tribunal pronounces the Bovary's ruin
Emma Purchases Gift : Emma and Lheureux are present, Rodolphe & Emma are Together
→debt, gift
11
![Page 12: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/12.jpg)
Shared structure:plots & puzzles create resource dependencies
12
![Page 13: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/13.jpg)
Talk OutlineSection Purpose
Narrative Worlds define my target domain
Example: Blocks World
describe how CLF specification works
Supporting Interactivity and
Analysis
describe my language extensions (phases,
generative properties)Narrative Worlds,
revisitedgive more examples to show breadth of scope
Proposed Work & Evaluation Strategy
establish a plan to justify my thesis statement
13
![Page 14: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/14.jpg)
Simple Example:Blocks World
a
b c
14
![Page 15: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/15.jpg)
Representation of Individual States{ arm_free,on_table b,on_table c,
clear c,on a b,clear a }
a
b c
15
![Page 16: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/16.jpg)
Representation of Action Rules
pickup_from_table :on_table X * clear X * arm_free
-o {arm_holding X}.
a
b c
a
b
c
16
![Page 17: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/17.jpg)
Blocks world cont’dpickup_from_block :
on X Y * clear X * arm_free -o {clear Y * arm_holding X}.
put_on_table : arm_holding X -o
{on_table X * clear X * arm_free}.
put_on_block : arm_holding X * clear Y
-o {on X Y * clear X * arm_free}.17
![Page 18: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/18.jpg)
Local state change
*** -o { }
18
![Page 19: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/19.jpg)
Celf Specification Framework
based on CLF (Watkins, Cervesato, Pfenning, Walker ’02)
implements linear logic as a logic programming language(execution as proof search)
still many open questions about operational semantics
19
![Page 20: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/20.jpg)
Committed Choice
a
b c
a
b
c
20
a
b c
![Page 21: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/21.jpg)
Committed Choice
a
b
c
21
a
b c
![Page 22: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/22.jpg)
Celf
#query 10 (init -o {end_condition})
22
![Page 23: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/23.jpg)
Celf
#query 10 (init -o {end_condition})
23
a
b c
![Page 24: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/24.jpg)
Celf
#query 10 (init -o {end_condition})
24
a
b c
a
b
c
?
![Page 25: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/25.jpg)
Celf
#query 10 (init -o {end_condition})
25
a
b c
state atquiescence
![Page 26: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/26.jpg)
Celf
26
a
b
c
on a b * on b c * on_table c * arm_free-o {end_condition}
✔
![Page 27: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/27.jpg)
Celf#query 10 (init -o {end_condition})
...let {X13} = pickup_from_table [X10, [X11, X12]] in let {[X14, [X15, X16]]} = put_on_table X13 in let {X17} = pickup_from_table [X3, [X6, X16]] in let {[X18, [X19, X20]]} = put_on_block [X17, X8] in
...
27
![Page 28: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/28.jpg)
Celf
let {X13} = pickup_from_table [X10, [X11, X12]] in
28
a
b c
![Page 29: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/29.jpg)
Celf
let {X13} = pickup_from_table [X10, [X11, X12]] in
29
a
b c
a
b
c
![Page 30: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/30.jpg)
Celf
30
Proofs-as-traces:structural artifacts that we can analyze, e.g. for
causal dependency.
...let {X13} = pickup_from_table [X10, [X11, X12]] in let {[X14, [X15, X16]]} = put_on_table X13 in let {X17} = pickup_from_table [X3, [X6, X16]] in let {[X18, [X19, X20]]} = put_on_block [X17, X8] in
...
Emma spends her young years in a Covent
Emma reads romantic novels
Emma maries Charles
Emma is invited to an aristocrats ball
Leon falls in love with Emma
Rodolphe decides to seduce Emma
Emma and Leon meet again
The Bovary go to the ball
OR
Bored, Emma contracts debts
Emma realises Leon's love
OR
OR
Emma pushes Leon away
Bored, Emma contracts important debts Emma accept Rodolphe advances
Emma and Rodolphe relationship falters
Rodolphe breaks up
Homais and Emma persuade Charles to operate Hypolyte
Hypolyte is amputated
Emma purchases a prosthetic leg
Emma purchases a gift for Rodolphe
Emma accepts Leon's advances
Emma reimburses some of the debtEmma swallows the arsenic and dies
Emma offers a gift to Rodolphe
Emma gets sick
Mr Homais informs Emma about Mr Bovary's death
Emma's love for Leon falters
The tribunal pronounces the Bovary's ruin
![Page 31: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/31.jpg)
Celf
31
Proofs-as-traces:structural artifacts that we can analyze, e.g. for
causal dependency.
c.f: PlotExhttp://eblong.com/zarf/plotex/
GraphPlanhttp://www.cs.cmu.edu/~avrim/graphplan.html
![Page 32: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/32.jpg)
Proto-Thesis Statement
[Linear logic programming]+ can form the basis of a framework for [specifying]+
[simulation]+ mechanics.
32
![Page 33: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/33.jpg)
Proto-Thesis Statement
[Linear logic programming]+ can form the basis of a framework for [specifying]+
[simulation]+ mechanics.
33
![Page 34: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/34.jpg)
Proto-Thesis Statement
[Linear logic programming]+ can form the basis of a framework for [specifying]+
[simulation]+ mechanics.
34
![Page 35: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/35.jpg)
Talk OutlineSection Purpose
Narrative Worlds define my target domain
Example: Blocks World
describe how CLF specification works
Supporting Interactivity and
Analysis
describe my language extensions (phases,
generative properties)Narrative Worlds,
revisitedgive more examples to show breadth of scope
Proposed Work & Evaluation Strategy
establish a plan to justify my thesis statement
35
![Page 36: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/36.jpg)
Adding interactivity to blocks world
action : type.pickup : block → action.
putdown_on : block → action.putdown_table : action.
stop : action.
36
![Page 37: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/37.jpg)
Interactivity cont’dpickup_from_block : current (pickup X) * on X Y * clear X * arm_free -o {clear Y * arm_holding X}.
37
![Page 38: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/38.jpg)
current (pickup X) * … -o {… * player_turn}current (putdown_table X) * … -o {… * player_turn}
…
player_turn -o {ForAny a:action. current a}
38
Where does “current” come from?The engine & player should “take turns.”
Interactivity cont’d
![Page 39: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/39.jpg)
PhasesBlock-delimited subsignatures
phase world = { rule1 : current Action * … -o {…}. rule2 : current Action * … -o {…}.}
phase player = {rule : player_turn -o {…}
}
39
![Page 40: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/40.jpg)
Phases
phase world = {...}
phase player = {...}
quiesced world -o {player_turn * phase player}.
quiesced player -o {phase world}.
Connected by specification of quiescence behavior
40
![Page 41: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/41.jpg)
Phases
phase world = {...}
phase player = {...}
quiesced world -o {player_turn * phase player}.
quiesced player -o {phase world}.
Connected by specification of quiescence behavior
41
Related: “sensing” and “action”atoms in Meld (Claytronics)
![Page 42: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/42.jpg)
Phases…are block-delimited subsignatures connected by
specifications of quiescence behavior.
42
quiesced P * State -o {phase P’ * State’}.
arbitrarily many phaseslooping + branching
![Page 43: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/43.jpg)
Compiling Phases
43
We can interpret phase-structured programs as programs with higher-order, mixed-chaining rules in Celf.
![Page 44: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/44.jpg)
Compiling Phases
44
We can interpret phase-structured programs as programs with higher-order, mixed-chaining rules in Celf.
![Page 45: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/45.jpg)
Compiling Phases
45
We can interpret phase-structured programs as programs with higher-order, mixed-chaining rules in Celf.
(see proposal document for details)
![Page 46: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/46.jpg)
Compiling Phases
We can interpret phase-structured programs as programs with higher-order, mixed-chaining rules in Celf.
Ongoing work: Check that the source-level semantics corresponds to compiled semantics.
46
![Page 47: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/47.jpg)
Thesis Statement
Phase-structured linear logic programming can form the basis of a framework for specifying, testing, and inventing
ludonarrative mechanics.
47
![Page 48: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/48.jpg)
Checked Metatheory
48
![Page 49: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/49.jpg)
http://garethrees.org/2004/12/01/ocarina-of-time/
49
![Page 50: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/50.jpg)
http://www.cs.cf.ac.uk/Dave/AI2/node116.html
If the arm is holding a block, it is not empty.
If block A is on the table it is not on any other block.
If block A is on block B, block B is not clear.
Blocks World
50
![Page 51: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/51.jpg)
Generative Properties
a way of stating and checking programmer intent
51
![Page 52: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/52.jpg)
Generative Properties
based on Generative Invariants (Simmons ’12)
52
![Page 53: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/53.jpg)
Generative InvariantsTo prove an invariant of a signature Σ:
Describe a signature Σgen with a distinguished start state (usually an atom “gen”)
and prove that
- initial states of Σ are in (could be generated by) Σgen
- every rule in Σ preserves membership in Σgen
53
![Page 54: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/54.jpg)
gen -o {genArm * !genBlocks}.genArm -o {arm_free}.genArm -o {arm_holding X}.
genBlocks -o {on_table X * genTop X}.genBlocks * genTop Y -o {on X Y * genTop X}.
genTop X -o {clear X}.
54
Generative Invariants
![Page 55: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/55.jpg)
Quiescence & ActivityQuiescence: no rules can fire
Activity: at least one rule can fire
55
![Page 56: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/56.jpg)
Activity Generator forBlocks World
act -o {arm_holding X * !actBlocks}.act -o {arm_free * clear Y * !actBlocks}.
actBlocks -o {on_table X}.actBlocks -o {on X Y}.actBlocks -o {clear X}.
56
![Page 57: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/57.jpg)
Ongoing Work:
Work out how to mechanically check these properties.
Show applicability to invariant properties of game worlds.
57
![Page 58: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/58.jpg)
Talk OutlineSection Purpose
Narrative Worlds define my target domain
Example: Blocks World
describe how CLF specification works
Supporting Interactivity and
Analysis
describe my language extensions (phases,
generative properties)Narrative Worlds,
revisitedgive more examples to show breadth of scope
Proposed Work & Evaluation Strategy
establish a plan to justify my thesis statement
58
![Page 59: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/59.jpg)
Narrative Worlds, Revisited
59
![Page 60: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/60.jpg)
Generalized Narrative Structures
60
As a player, you get to select a character, guide their choices, watch other characters react to what you've
chosen, and accomplish (or fail at) your chosen goals.
![Page 61: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/61.jpg)
Generalized Narrative Structures
61
do/murder : anger C C' * anger C C' * anger C C' * anger C C' * at C L * at C' L * has C weapon -o {at C L * has C weapon * !dead C' * !murdered C C'}.
do/thinkVengefully : loves C C’ * !murdered K C’ -o {loves C C’ * anger C K * anger C K}.
![Page 62: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/62.jpg)
do/murder : do C (murder C’) * anger C C' * anger C C' * anger C C' * anger C C' * at C L * at C' L * has C weapon -o {at C L * has C weapon * !dead C' * !murdered C C'}.
do/thinkVengefully : do C (thinkVenge K) * loves C C’ * !murdered K C’ -o {loves C C’ * anger C K * anger C K}.
62
Generalized Narrative Structures
![Page 63: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/63.jpg)
Ongoing work: figure out how to specify failure conditions when preconditions for an action are not
met.
63
Generalized Narrative Structures
![Page 64: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/64.jpg)
64
Generalized Narrative StructuresInform 7 action
processing: Implementable as
phases!
![Page 65: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/65.jpg)
Puzzle games
65
http://www.puzzlescript.net
Scope: PuzzleScript
![Page 66: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/66.jpg)
Sokoban
66
![Page 67: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/67.jpg)
[ > Player | Crate ] -> [ > Player | > Crate ]
67
In PuzzleScript:
![Page 68: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/68.jpg)
move :loc pusher L * in_dir L Dir L' * empty L' -o {empty L * loc pusher L'}.
Sokoban Rules
@ @
@ @
68
push :loc pusher L * in_dir L Dir L' * loc block L' * in_dir L' Dir L'' * empty L'' -o {empty L * loc pusher L' * loc block L''}.
![Page 69: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/69.jpg)
push :action (arrow Dir) *loc pusher L * in_dir L Dir L' * loc block L' * in_dir L' Dir L'' * empty L'' -o {empty L * loc pusher L' * loc block L''}.
move :action (arrow Dir) *loc pusher L * in_dir L Dir L' * empty L' -o {empty L * loc pusher L'}.
69
![Page 70: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/70.jpg)
Many more examples (some in progress):
https://github.com/chrisamaphone/interactive-lp/tree/master/examples
70
![Page 71: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/71.jpg)
Talk OutlineSection Purpose
Narrative Worlds define my target domain
Example: Blocks World
step through all the pieces of my proposal
Narrative Worlds, revisited
show the intended scope of those ideas
Proposed Work & Evaluation Strategy
establish a plan to justify my thesis statement
71
![Page 72: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/72.jpg)
Proposed WorkShortcoming of Existing
FrameworkProposed Solution
Sometimes we want to impose partial orderings among rules.
Language proposal with phases.
Programming with state is hard to reason about!
Machine-checked invariants and other characterizations of states; analysis tools such as causality and dependency graphs.
Non-interactive, low-feedback programming workflow.
Visual state editor and trace rendering.
Lack of access to common game programming libraries for e.g. graphical rendering, text parsing, etc.
Implement compatibility between the language and existing game frameworks (e.g. Twine)
72
![Page 73: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/73.jpg)
Evaluation
73
![Page 74: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/74.jpg)
How will I determine success?
Phase-structured linear logic programming can form the basis of a framework for
specifying, testing, and inventing ludonarrative mechanics.
74
![Page 75: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/75.jpg)
Develop several examples in the framework.
75
Phase-structured linear logic programming can form the basis of a framework for
specifying, testing, and inventing ludonarrative mechanics.
![Page 76: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/76.jpg)
Phase-structured linear logic programming can form the basis of a framework for
specifying, testing, and inventing ludonarrative mechanics.
Prove correspondence and build prototype.
76
![Page 77: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/77.jpg)
Design UI & tooling, including visual rendering.
77
Phase-structured linear logic programming can form the basis of a framework for
specifying, testing, and inventing ludonarrative mechanics.
![Page 78: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/78.jpg)
Phase-structured linear logic programming can form the basis of a framework for
specifying, testing, and inventing ludonarrative mechanics.
Generative properties and graphical analysis tools
78
![Page 79: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/79.jpg)
To game design:- simple, uniform logical formalism- executable specs (“sketching” systems)- reasoning and intent-checking tools as an integrated part of design process
79
Key Contributions
![Page 80: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/80.jpg)
To logical frameworks:- exploration of a new domain as evidence for its generality- new or alternative answers to open questions about semantics- establishment of metatheoretic tools
80
Key Contributions
![Page 81: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/81.jpg)
Timeline• Spring 2014: Finish working out theoretical concerns (language semantics, proofs, and sketch of generative property checking)
• Summer-Fall 2014: Implementation of prototype and development of examples
• Spring 2015: Write dissertation• Summer 2015: Defend dissertation
Thank You!
81
![Page 82: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/82.jpg)
extra slides
82
![Page 83: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/83.jpg)
83
qui read -o {phase parse}.qui parse * outcome none -o {message defaultParseError * phase report}.qui parse * outcome failure -o {phase report}.qui parse * outcome success -o {phase check1}.qui check1 -o {phase check2}.qui check2 * outcome success -o {phase carryout}.qui check2 * outcome failure -o {phase report}.qui check2 * outcome none -o {message default * phase report}.qui carryout -o {phase report}.
Phase links for Inform7 action processing graph:
![Page 84: Logical Interactive Programming for Narrative Worlds](https://reader031.fdocuments.net/reader031/viewer/2022012507/618365a35d9a40544e15ece7/html5/thumbnails/84.jpg)
84
Phases Inform7 action processing:
phase check1 = { - : init * outcome X -o {outcome none}.
- : $action (take Obj) * inventory Obj -o {outcome failure
* message "You already have it."}.
- : $action look -o {outcome success}.}phase check2 = { - : $action (take Obj) * outcome none
* visible Obj -o {outcome success}.}
phase carryout = { - : action (take Obj) * in Obj C -o {inventory Obj * message "taken"}. - : action look * $in player R * $description R D -o {message D}. }