-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpc-examples.lisp
516 lines (475 loc) · 18.8 KB
/
pc-examples.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
;; This runs on OSCAR_3.31
#| To run these problems, first load Perception-Causes_3.31a.lisp.
Then load this file. To run problem n, execute (simulate-oscar n). |#
(in-package "OSCAR")
(setf *simulation-problems* nil)
;======================================================================
(make-simulation-problem
:number 1
:message
"This is the perceptual updating problem. First, Fred looks red to me. Later, Fred looks blue to me.
What should I conclude about the color of Fred?"
:reasons
*PERCEPTION*
*TEMPORAL-PROJECTION*
*incompatible-colors*
:inputs
(1 "(the color of Fred is red)" 1.0)
(30 "(the color of Fred is blue)" 1.0)
:interests
("(? x)((the color of Fred is x) at 50)" 0.2)
)
;======================================================================
(make-simulation-problem
:number 2
:message
"This is the perceptual updating problem. First, Fred looks red to me. Later, Fred looks blue to me.
What should I conclude about the color of Fred?"
:reasons
*INDEXICAL-PERCEPTION*
*indexical-incompatible-colors*
:inputs
(1 "(the color of Fred is red)" 1.0)
(30 "(the color of Fred is blue)" 1.0)
:interests
("(? x)(the color of Fred is x)" 0.75)
)
;======================================================================
(make-simulation-problem
:number 3
:message
"First, Fred looks red to me. Later, I am informed by Merrill that I am then
wearing blue-tinted glasses. Later still, Fred looks blue to me. All along, I know that the
probability is not high of Fred being blue given that Fred looks blue to me, but I am
wearing blue tinted glasses. What should I conclude about the color of Fred?"
:reasons
*PERCEPTION*
*RELIABLE-INFORMANT*
*PERCEPTUAL-RELIABILITY*
*TEMPORAL-PROJECTION*
*INCOMPATIBLE-COLORS*
:inputs
(1 "(the color of Fred is red)" 0.8)
(20 "(Merrill reports that I_am_wearing_blue_tinted_glasses)" 1.0)
(30 "(the color of Fred is blue)" 0.8)
:premises
("((the probability of (the color of Fred is blue) given
((I have a percept with content (the color of Fred is blue)) & I_am_wearing_blue_tinted_glasses)) <= .8)"
1.0)
("(Merrill is a reliable informant)" 1.0)
:interests
("(? x)((the color of Fred is x) at 50)" 0.55)
)
;======================================================================
;; This requires the temporal-projectibility of ~my_surroundings_are_illuminated_by_red_light.
(make-simulation-problem
:number 4
:message
"This illustrates the use of discounted-perception and perceptual-unreliability."
:reasons
*perception*
*discounted-perception*
*perceptual-reliability*
*perceptual-unreliability*
*temporal-projection*
neg-at-intro
:inputs
(10 "(the color of Fred is red)" 1.0)
:premises
("((the probability of (the color of Fred is red) given
((I have a percept with content (the color of Fred is red))
& my_surroundings_are_illuminated_by_red_light)) <= .7)"
1.0)
("((the probability of (the color of Fred is red) given
((I have a percept with content (the color of Fred is red)) & I_am_wearing_red_tinted_glasses)) <= .8)"
1.0)
("(I_am_wearing_red_tinted_glasses at 1)" 1.0 15)
("(my_surroundings_are_illuminated_by_red_light at 1)" 1.0 30)
("(~my_surroundings_are_illuminated_by_red_light at 8)" 1.0 50)
:interests
("((the color of Fred is red) at 10)" 0.5)
)
;======================================================================
;; This requires the temporal-projectibility of ~my_surroundings_are_illuminated_by_red_light.
(make-simulation-problem
:number 5
:message
"This illustrates the use of discounted-indexical-perception and indexical-perceptual-unreliability."
:reasons
*indexical-perception*
*discounted-indexical-perception*
*indexical-perceptual-reliability*
*indexical-perceptual-unreliability*
*temporal-projection*
neg-at-intro
:inputs
(10 "(the color of Fred is red)" 1.0)
:premises
("((the probability of (the color of Fred is red) given
((I have a percept with content (the color of Fred is red))
& my_surroundings_are_illuminated_by_red_light)) <= .7)"
1.0)
("((the probability of (the color of Fred is red) given
((I have a percept with content (the color of Fred is red)) & I_am_wearing_red_tinted_glasses)) <= .8)"
1.0)
("(I_am_wearing_red_tinted_glasses at 1)" 1.0 15)
("(my_surroundings_are_illuminated_by_red_light at 1)" 1.0 30)
("(~my_surroundings_are_illuminated_by_red_light at 8)" 1.0 50)
:interests
("(the color of Fred is red)" 0.5)
)
;======================================================================
(make-simulation-problem
:number 6
:message
"This is the Yale Shooting Problem. I know that the gun being fired while loaded
will cause Jones to become dead. I know that the gun is initially loaded, and Jones is initially
alive. Later, the gun is fired. Should I conclude that Jones becomes dead?"
:reasons
neg-at-elimination
*TEMPORAL-PROJECTION*
*CAUSAL-UNDERCUTTER+*
*CAUSAL-IMPLICATION*
neg-at-intro
:inputs
:premises
("(the_gun_is_loaded at 20)" 1.0)
("((Jones is alive) at 20)" 1.0)
("(the_gun_is_fired at 30)" 1.0)
("(all x)(all time)(((x is dead) at time) <-> ~((x is alive) at time))" 1.0)
("(the_gun_is_fired when the_gun_is_loaded is causally sufficient for
(Jones is dead) after an interval 10)" 1.0)
:interests
("((Jones is alive) at 50)" 0.75)
("((Jones is dead) at 50)" 0.75)
)
;======================================================================
(make-simulation-problem
:number 7
:message
"This is the solved Yale Shooting Problem. I know that the gun being fired while loaded
will cause Jones to become dead. I know that the gun is initially loaded, and Jones is initially
alive. Later, the gun is fired. Should I conclude that Jones becomes dead?"
:reasons
neg-at-elimination
*TEMPORAL-PROJECTION*
*CAUSAL-UNDERCUTTER*
*CAUSAL-IMPLICATION*
neg-at-intro
:inputs
:premises
("(the_gun_is_loaded at 20)" 1.0)
("((Jones is alive) at 20)" 1.0)
("(the_gun_is_fired at 30)" 1.0)
("(the_gun_is_fired when the_gun_is_loaded is causally sufficient for
~(Jones is alive) after an interval 10)" 1.0)
:interests
("(? ((Jones is alive) at 50))" 0.75)
)
;======================================================================
(make-simulation-problem
:number 13
:message
"This illustrates sequential causation. This requires causal undercutting for
causal implication. I know that the gun being fired while loaded
will cause Jones to become dead. I know that the gun is initially loaded, and Jones is initially
alive. Later, the gun is fired. But I also know that he will be resuscitated later, and then he will
be alive. Should I conclude that Jones becomes dead? This version is solved incorrectly."
:reasons
neg-at-elimination
*TEMPORAL-PROJECTION*
*CAUSAL-UNDERCUTTER*
*CAUSAL-IMPLICATION*
neg-at-intro
neg-at-intro2
:inputs
:premises
("(the_gun_is_loaded at 20)" 1.0)
("((Jones is alive) at 20)" 1.0)
("(the_gun_is_fired at 30)" 1.0)
("(Jones_is_resuscitated at 45)" 1.0)
("(the_gun_is_fired when the_gun_is_loaded is causally sufficient for
~(Jones is alive) after an interval 10)" 1.0)
("(Jones_is_resuscitated when ~(Jones is alive) is causally sufficient for
(Jones is alive) after an interval 5)" 1.0)
:interests
("(? ((Jones is alive) at 60))" 0.75)
)
;======================================================================
(make-simulation-problem
:number 14
:message
"This illustrates sequential causation. This requires causal undercutting for
causal implication. I know that the gun being fired while loaded
will cause Jones to become dead. I know that the gun is initially loaded, and Jones is initially
alive. Later, the gun is fired. But I also know that he will be resuscitated later, and then he will
be alive. Should I conclude that Jones becomes dead?"
:reasons
neg-at-elimination
*TEMPORAL-PROJECTION*
*CAUSAL-UNDERCUTTER*
*CAUSAL-IMPLICATION*
*CAUSAL-UNDERCUTTER-FOR-CAUSAL-IMPLICATION*
neg-at-intro
neg-at-intro2
:inputs
:premises
("(the_gun_is_loaded at 20)" 1.0)
("((Jones is alive) at 20)" 1.0)
("(the_gun_is_fired at 30)" 1.0)
("(Jones_is_resuscitated at 45)" 1.0)
("(the_gun_is_fired when the_gun_is_loaded is causally sufficient for
~(Jones is alive) after an interval 10)" 1.0)
("(Jones_is_resuscitated when ~(Jones is alive) is causally sufficient for
(Jones is alive) after an interval 5)" 1.0)
:interests
("(? ((Jones is alive) at 60))" 0.75)
)
;======================================================================
(make-simulation-problem
:number 8
:message
"This is the indexical Yale Shooting Problem. I know that the gun being fired while loaded
will cause Jones to become dead. I know that the gun is initially loaded, and Jones is initially
alive. Later, the gun is fired. Should I conclude that Jones becomes dead?"
:reasons
*INDEXICAL-TEMPORAL-PROJECTION*
*TEMPORAL-PROJECTION*
*INDEXICAL-CAUSAL-UNDERCUTTER*
*INDEXICAL-CAUSAL-IMPLICATION*
:start-time 50
:inputs
:premises
("((Jones is alive) at 20)" 1.0)
("(the_gun_is_loaded at 20)" 1.0)
("(the_gun_is_fired at 30)" 1.0)
("(the_gun_is_fired when the_gun_is_loaded is causally sufficient for
~(Jones is alive) after an interval 10)" 1.0)
:interests
("(? (Jones is alive))" 0.75)
)
;======================================================================
(make-simulation-problem
:number 9
:message
"1. An interest in whether b1 and b2 collide at 10 generates an interest in their positions at 10.
Because we know their positions at 0, we adopt interest in their velocities between 0 and 10.
2. We know the velocities at 0, and temporal-projection leads to an inference that those velocities
remain unchanged between 0 and 10. From that we can compute the positions at 10, and infer
that b1 and b2 collide at 10.
3. However, temporal projection also leads to an inference that the positions at 10 are the
same as those at 0. Because the velocities at 0 are nonzero, causal undercutting defeats this
inference, leaving us with a unique conclusion regarding the positions at 10 (they are at (5.0 3.0)).
"
:reasons
neg-at-elimination
&-at-elimination
*TEMPORAL-PROJECTION*
*CAUSAL-UNDERCUTTER*
*COLLISION*
*NEW-POSITION*
*POSITION-INCOMPATIBILITY-1*
*POSITION-INCOMPATIBILITY-2*
strict-arithmetical-inequality
arithmetical-inequality
is-past-or-present
neg-at-intro
arithmetical-nonequality
inequality-transitivity
pair-nonidentity
pair-nonidentity-at-time
&-at-intro
arithmetical-equality
:inputs
:premises
("((the position of b1 is (0.0 3.0)) at 0)" 1.0)
("((the position of b2 is (1.0 0.0)) at 0)" 1.0)
("(all b)(all x)(all y)(all vx)(all vy)
((the velocity of b is (vx vy))
when ((the position of b is (x y)) & ~((vx vy) = (0.0 0.0)))
is causally sufficient for ~(the position of b is (x y)) after an interval 0)" 1.0)
("((the velocity of b1 is (.5 0.0)) at 0)" 1.0)
("((the velocity of b2 is (.4 .3)) at 0)" 1.0)
("(5.0 = (0.0 + (0.5 * (10 - 0))))" 1.0)
("(3.0 = (3.0 + (0.0 * (10 - 0))))" 1.0)
("(5.0 = (1.0 + (0.4 * (10 - 0))))" 1.0)
("(3.0 = (0.0 + (0.3 * (10 - 0))))" 1.0)
:interests
; ("(? ((b1 and b2 collide) at 10))" 0.75)
("(? x)(? y) ((the position of b1 is (x y)) at 10)" 0.75)
)
;======================================================================
(make-simulation-problem
:number 10
:message
"
1. An interest in whether b1 and b2 collide at 10 generates an interest in their positions at 10.
Because we know their positions at 0, we adopt interest in their velocities between 0 and 10.
2. We know the velocities at 0, and temporal-projection leads to an inference that those velocities
remain unchanged between 0 and 10. From that we can compute the positions at 10, and infer
that b1 and b2 collide at 10.
3. However, temporal projection also leads to an inference that the positions at 10 are the
same as those at 0. Because the velocities at 0 are nonzero, causal undercutting defeats this
inference, leaving us with a unique conclusion regarding the positions at 10 (they are at (5.0 3.0)).
"
:reasons
neg-at-elimination
&-at-elimination
*TEMPORAL-PROJECTION*
*CAUSAL-UNDERCUTTER*
*COLLISION*
*NEW-POSITION*
*POSITION-INCOMPATIBILITY-1*
*POSITION-INCOMPATIBILITY-2*
strict-arithmetical-inequality
arithmetical-inequality
is-past-or-present
neg-at-intro
arithmetical-nonequality
inequality-transitivity
pair-nonidentity
pair-nonidentity-at-time
&-at-intro
arithmetical-equality
; *CAUSAL-IMPLICATION*
; COLLISION-SYMMETRY
; *CAUSAL-UNDERCUTTER+*
:inputs
:premises
("((the position of b1 is (0.0 3.0)) at 0)" 1.0)
("((the position of b2 is (1.0 0.0)) at 0)" 1.0)
("(all b)(all x)(all y)(all vx)(all vy)
((the velocity of b is (vx vy))
when ((the position of b is (x y)) & ~((vx vy) = (0.0 0.0)))
is causally sufficient for ~(the position of b is (x y)) after an interval 0)" 1.0)
("((the velocity of b1 is (.5 0.0)) at 0)" 1.0)
("((the velocity of b2 is (.4 .3)) at 0)" 1.0)
("(5.0 = (0.0 + (0.5 * (10 - 0))))" 1.0)
("(3.0 = (3.0 + (0.0 * (10 - 0))))" 1.0)
("(5.0 = (1.0 + (0.4 * (10 - 0))))" 1.0)
("(3.0 = (0.0 + (0.3 * (10 - 0))))" 1.0)
; ("((0 + 0) < 10)" 1.0)
:interests
("(? ((b1 and b2 collide) at 10))" 0.75)
)
;======================================================================
(make-simulation-problem
:number 11
:message
"1. We are given the velocities of b1 and b2 at 0, and are told they collide at (5 3) at 10.
We are interested in the velocity of b1 at 20.
2. By causal-implication, we can infer that the velocity of b1 at 20 is (.4 .3).
3. By temporal projection, we can also infer that the velocity of b1 at 20 is (.5 .0). But this
is defeated by causal-undercutter+, because we also know that if the velocity is (.4 .3) then
it is not (.5 .0).
"
:reasons
neg-at-elimination
*TEMPORAL-PROJECTION*
*CAUSAL-UNDERCUTTER+*
*CAUSAL-UNDERCUTTER*
*CAUSAL-IMPLICATION*
*COLLISION*
*NEW-POSITION*
strict-arithmetical-inequality
arithmetical-inequality
is-past-or-present
neg-at-intro
arithmetical-nonequality
inequality-transitivity
:inputs
:premises
("((the velocity of b1 is (.5 0.0)) at 10)" 1.0)
("((the velocity of b2 is (.4 .3)) at 10)" 1.0)
("(b1 is a dimensionless billiard ball)" 1.0)
("(b2 is a dimensionless billiard ball)" 1.0)
("((b1 and b2 collide) at 10)" 1.0)
("(((.5 expt 2) + (0.0 expt 2)) = ((.4 expt 2) + (.3 expt 2)))" 1.0)
("(same-mass b1 b2)" 1.0)
("(all b)(all time) (((the velocity of b is (0.4 0.3)) at time)
-> ~((the velocity of b is (0.5 0.0)) at time))" 1.0)
("(all b)(all time) (((the velocity of b is (0.5 0.0)) at time)
-> ~((the velocity of b is (0.4 0.3)) at time))" 1.0)
("(all b1)(all b2)(all v1x)(all v1y)(all v2x)(all v2y)
((((b1 is a dimensionless billiard ball) & (b2 is a dimensionless billiard ball))
& ((same-mass b1 b2) & (((v1x expt 2) + (v1y expt 2)) = ((v2x expt 2) + (v2y expt 2)))))
->
((b1 and b2 collide)
when (the velocity of b2 is (v2x v2y))
is causally sufficient for (the velocity of b1 is (v2x v2y))
after an interval 0))" 1.0)
("(all b1)(all b2)(all v1x)(all v1y)(all v2x)(all v2y)
((((b1 is a dimensionless billiard ball) & (b2 is a dimensionless billiard ball))
& ((same-mass b1 b2) & (((v1x expt 2) + (v1y expt 2)) = ((v2x expt 2) + (v2y expt 2)))))
->
((b1 and b2 collide)
when (the velocity of b1 is (v2x v2y))
is causally sufficient for (the velocity of b2 is (v2x v2y))
after an interval 0))" 1.0)
:interests
("(? x)(? y) ((the velocity of b1 is (x y)) at 20)" 0.75)
)
;======================================================================
(make-simulation-problem
:number 12
:message
" This is the Extended Prediction Problem.
1. We are given the velocities of b1 and b2 at 0, and are told they collide at (5 3) at 10.
We are interested in the position of b1 at 20. Given knowledge of the position of b1 at 10,
this generates an interest in the velocity of b1 between 10 and 20.
2. By causal-implication, we can infer that the velocity of b1 between 10 and 20 is (.4 .3).
From this we can compute that the position of b1 at 20 is (9.0 6.0).
3. By temporal projection, we can also infer that the velocity of b1 at 20 is (.5 .0). But this
is defeated by causal-undercutter, because we also know that if the velocity is (.4 .3) then
it is not (.5 .0).
4. By temporal projection, we can infer that the position of b1 at 20 is the same as at 0.
But this is defeated by causal-undercutter, because we know that the velocity of b1 at 0
is nonzero.
5. By temporal projection, we can infer that the position of b1 at 20 is the same as at 10.
This is defeated in the same fashion as (4), because we know the velocity of
b1 between 0 and 10, and we are given that 10 is between 0 and 10.
"
:reasons
*CAUSAL-IMPLICATION*
*TEMPORAL-PROJECTION*
*CAUSAL-UNDERCUTTER*
*COLLISION*
*NEW-POSITION*
*POSITION-INCOMPATIBILITY*
pair-nonidentity
pair-nonidentity-at-time
&-at-intro
:inputs
:premises
("((the position of b1 is (0.0 3.0)) at 0)" 1.0)
("((the position of b2 is (1.0 0.0)) at 0)" 1.0)
("((the velocity of b1 is (.5 0.0)) at 0)" 1.0)
("((the velocity of b2 is (.4 .3)) at 0)" 1.0)
("(b1 is a dimensionless billiard ball)" 1.0)
("(b2 is a dimensionless billiard ball)" 1.0)
("(all b)(all x)(all y)(all vx)(all vy)
((the position of b is (x y))
when ((the velocity of b is (vx vy)) & ~((vx vy) = (0.0 0.0)))
is causally sufficient for ~(the position of b is (x y)) after an interval 0)" 1.0)
("(all b1)(all b2)(all v1x)(all v1y)(all v2x)(all v2y)
((((b1 is a dimensionless billiard ball) & (b2 is a dimensionless billiard ball))
& ((same-mass b1 b2) & (((v1x expt 2) + (v1y expt 2)) = ((v2x expt 2) + (v2y expt 2)))))
->
((b1 and b2 collide)
when (the velocity of b2 is (v2x v2y))
is causally sufficient for (the velocity of b1 is (v2x v2y))
after an interval 0))" 1.0)
("(same-mass b1 b2)" 1.0)
("(5.0 = (0.0 + (0.5 * (10 - 0))))" 1.0)
("(3.0 = (3.0 + (0.0 * (10 - 0))))" 1.0)
("(5.0 = (1.0 + (0.4 * (10 - 0))))" 1.0)
("(3.0 = (0.0 + (0.3 * (10 - 0))))" 1.0)
("(9.0 = (5.0 + (0.4 * (20 - 10))))" 1.0)
("(6.0 = (3.0 + (0.3 * (20 - 10))))" 1.0)
("(((.5 expt 2) + (0.0 expt 2)) = ((.4 expt 2) + (.3 expt 2)))" 1.0)
:interests
("(? ((b1 and b2 collide) at 10))" 0.75)
; ("(? x)(? y) ((the velocity of b1 is (x y)) throughout (clopen 10 20))" 0.75)
("(? x)(? y) ((the position of b1 is (x y)) at 20)" 0.75)
)
;======================================================================