~hypedyn-team/hypedyn/release-2.3

« back to all changes in this revision

Viewing changes to src/hypedyn/examples/LRRH4.dyn

  • Committer: Teong Leong
  • Date: 2011-12-21 07:31:42 UTC
  • Revision ID: teongleong@gmail.com-20111221073142-v6lzb2tsmzrvwaol
[ant] reorganised file into top level build; change temp folder to be named temp instead of build;

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(begin (make-hypertext (quote htfe) 2.1) (set-card-shark! (quote #f)) (begin
2
 
(create-node "start"
3
 
"One day, Little Red Riding Hood is walking through the forest, on the way to deliver a basket of food and flowers to her grandmother."
4
 
331.0 47.0 false false 1) (begin (create-typed-rule "start" (quote node) (quote
5
 
and) 1 300))) (begin (create-node "Explore the forest"
6
 
"Tempted by a grove of flowers, Red strays off the path into the forest. There are a number of different types of flowers growing in the grassy clearing."
7
 
517.0 51.0 true false 3) (begin (create-typed-rule "Explore the forest" (quote
8
 
node) (quote and) 3 397) (create-typed-condition "Explore the forest" 0 9 0 397
9
 
400) (create-typed-condition "Explore the forest" 0 4 0 397 399)
10
 
(create-typed-condition "Explore the forest" 0 3 0 397 398) (create-action
11
 
"Explore the forest" (quote fact) "(assert 378)" 397 401))) (begin (create-node
12
 
"Go directly to Grandma's house"
13
 
"Red walks along the path, sticking carefully to the center to avoid the dark, menacing trees. Eventually, she reaches Grandma's house. \n\nWhen Red enters Grandma's house, she is surprised to see the young man sitting on the sofa.  \n\nGrandma smiles when she sees Red."
14
 
226.05 53.0 true false 4) (begin (create-typed-rule
15
 
"Go directly to Grandma's house" (quote node) (quote and) 4 411)
16
 
(create-typed-condition "Go directly to Grandma's house" 0 9 0 411 413)
17
 
(create-typed-condition "Go directly to Grandma's house" 0 4 0 411 412)
18
 
(create-action "Go directly to Grandma's house" (quote fact) "(retract 378)"
19
 
411 414))) (begin (create-node "Go deeper into the forest"
20
 
"A handsome young man is leaning against the trunk of a tree. He gestures to Red to come over."
21
 
673.0 128.0 true false 5) (begin (create-typed-rule "Go deeper into the forest"
22
 
(quote node) (quote and) 5 402) (create-typed-condition
23
 
"Go deeper into the forest" 0 9 0 402 406) (create-typed-condition
24
 
"Go deeper into the forest" 0 4 0 402 405) (create-typed-condition
25
 
"Go deeper into the forest" 0 5 0 402 404) (create-typed-condition
26
 
"Go deeper into the forest" 0 3 1 402 403) (create-action
27
 
"Go deeper into the forest" (quote fact) "(retract 378)" 402 407))) (begin
28
 
(create-node "Talk to young man"
29
 
"Red goes over and talks to the wolf. He asks her where she's going, and she says she's off to deliver a basket of food and flowers to her sick grandma."
30
 
677.0 202.0 true false 6) (begin (create-typed-rule "Talk to young man" (quote
31
 
node) (quote and) 6 415) (create-typed-condition "Talk to young man" 0 4 0 415
32
 
419) (create-typed-condition "Talk to young man" 0 9 0 415 418)
33
 
(create-typed-condition "Talk to young man" 0 6 0 415 417)
34
 
(create-typed-condition "Talk to young man" 0 5 1 415 416))) (begin
35
 
(create-node "Approach the young man"
36
 
"Unfortunately, the young man was a wolf. Neither Red nor Grandma were ever seen again."
37
 
315.0 134.0 true false 7) (begin (create-typed-rule "Approach the young man"
38
 
(quote node) (quote and) 7 366) (create-typed-condition
39
 
"Approach the young man" 0 4 1 366 367) (create-typed-condition
40
 
"Approach the young man" 0 6 1 366 368) (create-typed-condition
41
 
"Approach the young man" 0 9 0 366 369) (create-typed-condition
42
 
"Approach the young man" 0 7 0 366 370))) (begin (create-node
43
 
"Pass the basket to Grandma"
44
 
"Red passes the basket of food and flowers to Grandma." 113.0 135.0 true false
45
 
8) (begin (create-typed-rule "Pass the basket to Grandma" (quote node) (quote
46
 
and) 8 361) (create-typed-condition "Pass the basket to Grandma" 0 8 0 361 362)
47
 
(create-typed-condition "Pass the basket to Grandma" 0 9 0 361 363)
48
 
(create-typed-condition "Pass the basket to Grandma" 0 6 0 361 364)
49
 
(create-typed-condition "Pass the basket to Grandma" 0 4 1 361 365))) (begin
50
 
(create-node "Head home" "Red heads back home." 386.0 53.0 true false 9) (begin
51
 
(create-typed-rule "Head home" (quote node) (quote and) 9 408)
52
 
(create-typed-condition "Head home" 0 7 0 408 409) (create-action "Head home"
53
 
(quote fact) "(retract 378)" 408 410))) (begin (create-node
54
 
"Pick the geraniums"
55
 
"Red decides to pick some of the geraniums in the grove and exchange them for the flowers in the basket for Grandma."
56
 
502.0 203.0 true false 376) (begin (create-typed-rule "Pick the geraniums"
57
 
(quote node) (quote and) 376 392) (create-typed-condition "Pick the geraniums"
58
 
2 374 0 392 394) (create-typed-condition "Pick the geraniums" 2 378 1 392 393)
59
 
(create-action "Pick the geraniums" (quote fact)
60
 
"(set-value! 375 \"geraniums\")" 392 396) (create-action "Pick the geraniums"
61
 
(quote fact) "(assert 374)" 392 395))) (begin (create-node "Pick the violets"
62
 
"Red decides to pick some of the violets in the grove and exchange them for the flowers in the basket for Grandma."
63
 
495.0 130.0 true false 377) (begin (create-typed-rule "Pick the violets" (quote
64
 
node) (quote and) 377 387) (create-typed-condition "Pick the violets" 2 374 0
65
 
387 389) (create-typed-condition "Pick the violets" 2 378 1 387 388)
66
 
(create-action "Pick the violets" (quote fact) "(set-value! 375 \"violets\")"
67
 
387 391) (create-action "Pick the violets" (quote fact) "(assert 374)" 387
68
 
390))) (begin (create-link "talked" 4 -1 135 229 false false true -1 "" false
69
 
343) (begin (create-typed-rule "talked" (quote link) (quote and) 343 349)
70
 
(create-typed-condition "talked" 0 6 1 349 350))) (begin (create-link
71
 
"didn't talk" 4 -1 230 265 false false true -1 "" false 346) (begin
72
 
(create-typed-rule "didn't talk" (quote link) (quote and) 346 347)
73
 
(create-typed-condition "didn't talk" 0 6 0 347 348))) (begin (create-link
74
 
"flowers" 8 -1 34 41 false false (quote fact) -1 375 false 421) (begin
75
 
(create-typed-rule "flowers" (quote link) (quote and) 421 422)
76
 
(create-typed-condition "flowers" 2 374 0 422 423))) (set-start-node! 1)
77
 
(create-fact "Picked flowers" (quote boolean) 374) (create-fact "The flowers"
78
 
(quote string) 375) (create-fact "In the forest grove" (quote boolean) 378))
 
 
b'\\ No newline at end of file'