-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
498 lines (453 loc) · 37.4 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Little Lost Robot - Multi-Agent Systems Project</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Little Lost Robot</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="introduction">Introduction</a></li>
<li><a href="problem-outline">Problem outline</a></li>
<li><a href="theory">Theory</a></li>
<li><a href="simulation">Simulation</a></li>
<li><a href="analysis">Analysis</a></li>
<li><a href="conclusion">Conclusion</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<!-- Begin page content -->
<div class="container">
<div id="introduction">
<h2>Introduction</h2>
<p>This is the project for the course Multi-Agent systems in the academic year 2016-2017 by Sjaak ten Caat, Denny Diepgrond and Stefan Knegt. We will demonstrate the possibility to model a multi-agent story with epistemic logic.
</div>
<div id="problem-outline">
<h2>Problem Outline</h2>
<p>For our project, we will be looking at a short story by Isaac Asimov called Little Lost Robot. In this story the main character, Susan Calvin, is tasked with finding a robot among multiple almost identical other robots. The robot she is looking for, is trying to hide actively. This robot, called NS-2, uses all of its knowledge about the other robots to make sure that it reacts in exactly the same way as they do. What is known to everyone is that every normal robot will follow the three laws of robotics, namely:
<ol class="robotrules">
<li>A robot may not injure a human being or, through inaction, allow a human being to come to harm.</li>
<li>A robot must obey the orders given it by human beings except where such orders would conflict with the First Law.</li>
<li>A robot must protect its own existence as long as such protection does not conflict with the First or Second Laws.</li>
</ol>
However, NS-2 has been modified in such a way that the First Law only states "A robot may not injure a human being" but will still react in such a way as it thinks other robots will react. Finally, NS-2 is different from other robots due to additional education in that it can distinguish between different types of radiation, for instance between harmless infrared and gamma radiation, which is lethal to robots but safe for humans. It does not realize that the other normal robots do not know the difference.
In the end Susan solves the problem as follows: she tells each of the robots separately that gamma radiation will destroy a robot within only a few steps. They are then kept isolated from each other, so that they cannot communicate. Each robot is placed in a large room, with walls between them so that they cannot see each other but they can see the center of the room. This room is filled with infrared radiation. Susan sits in a chair at the center, and once all the robots are in position a large weight is dropped down from above the chair and bumped away from the chair at the last second. Only NS-2 moves from his position, before realizing that none of the other robots moved, and Susan has found her robot.
The reason that this worked is that the other robots could not distinguish between different types of radiation. They all thought that they would be unable to rescue Susan before being destroyed by the perceived gamma radiation and so did not act at all. NS-2 however saw that the radiation was safe and thought that the other robots would act in accordance with the First Law, and so was the only robot that did act.</p>
</div>
<div id="theory">
<h2>Theory</h2>
In the 'Little Lost Robot' story we can identify three separate agents: Susan, the lost robot and the normal robots. The normal robots are all exact duplicates so it is irrelevant how many there are for the purpose of this analysis. Therefore we will only consider one. Let Susan be agent S, the lost robot be agent L, and the normal robot be agent N. Since the story deals with what agents believe, rather than what they know, we used the KD45 system. So we define the model to be used as $M = \langle S, \pi, R^B_S, R^B_L, R^B_N\rangle$.
We define the propositional atoms as
<ul>
<li> $Gr$ = gamma radiation is present </li>
<li> $Ir$ = infrared radiation is present </li>
<li> $Dr$ = dangerous radiation (for robots) is present </li>
<li> $Hd$ = the situation is dangerous for humans </li>
<li> $La$ = the lost robot acts </li>
<li> $Na$ = the normal robot acts </li>
</ul>
The initial situation is as follows:
<ul>
<li> $M\models C (Hd \leftrightarrow Na)$ : It's common knowledge that normal robots will act if and only if a human is in danger.</li>
<li> $M\models C (B_L(Na) \rightarrow La)$ : It's common knowledge that, whenever the lost robot thinks that the normal robot will act, it will also act. </li>
<li> $M\models C (B_L(\neg Na) \rightarrow \neg La)$ : It's also common knowledge that when the lost robot believes that the normal robot will not act, it will also not act. </li>
</ul>
Susan's goal is to find one or more announcements that will result in either the lost robot acting without the normal robot, or the normal robot acting without the lost robot, so that she can identify them. This is not yet possible with the current set of formulas.
Then, Susan tells each robot about the effects of radiation, which adds the following formulas:
<ul>
<li> $M \models C((Hd \land \neg Dr) \leftrightarrow Na)$ : Normal robots will only act if someone is in danger when there is no dangerous radiation present, since they will not be able to do anything before being destroyed. This rule replaces the very first rule.</li>
<li> $M \models B_L (Gr \leftrightarrow Dr)$ : The lost robot believes that gamma radiation and only gamma radiation counts as dangerous radiation.</li>
<li> $M \models B_N ((Gr \lor Ir) \leftrightarrow Dr)$ : The normal robot believes that every type of radiation is dangerous radiation, since they cannot distinguish between different types.</li>
<li> $M \models B_L (B_N (Gr \leftrightarrow Dr))$ : The lost robot believes that the normal robot also believes that it only needs to be aware of gamma radiation. </li>
<li> $M \models B_S (B_N ((Gr \lor Ir) \leftrightarrow Dr))$ : Susan believes that normal robots cannot distinguish between infrared and gamma radiation. </li>
<li> $M \models B_S (B_L (B_N (Gr \leftrightarrow Dr)))$ : Susan also believes that the lost robot believes that the normal robot believes that it is only in danger when there is gamma radiation. </li>
</ul>
In the resulting models, we can obtain Susan's goal state, $B_S(Na \land \neg La) \lor B_S(\neg Na \land La)$ as follows:
$$[Hd \land Ir]B_S(\neg Na \land La)$$
</div>
<div id="simulation">
<h2>Simulation</h2>
<p> The epistemic situation in the above-mentioned story of the Little Lost Robot is simulated below. By using the switches, the user can make propositional atoms that were mentioned in the Theory section either true or false. After changing one or more switches, a new model can be generated by clicking the button on the bottom of the Simulation. In the boxes under a particular agent, the epistemic atoms that are true for the corresponding agent are shown. There also is a box with general knowledge in which the common knowledge in the model is shown. The truth valuations for all agents are based on the initial situation and the formulas given in the Theory section.
<p> We implemented this first simulation to represent the three experiments Susan conducted to find the lost robot in the original story:
<li><strong>Experiment 1</strong> The first experiment she comes up with consists of all the robots seeing a human about to be crushed by a weight. This corresponds with switching the $Hd$ switch to true. The robots are all in a room in which they can communicate so the Communication switch will also be switched to true. The normal robots with a fully implemented First Law have to act to save the person ($M\models C(Hd \leftrightarrow Na)$). Now NS-2 does not have to save the human but does anyway since it beliefs the normal robots will do just that and it does not want to get discovered ($ M\models C(B_L(Na) \rightarrow La)$). This shows that the lost robot is actively trying to hide and Susan needs to come up with something smarter to identify NS-2. In the simulation, the "Settings experiment 1" button can be pressed to give the atoms the values corresponding to the situation in experiment 1. After this, the button on the bottom of the simulation can be pressed to see what the beliefs of the agents are.
<li><strong>Experiment 2</strong> The second experiment Susan comes up with is very similar to the first one, the only difference is that a beam of gamma radiation can now be found between the robots and the human. This corresponds with switching the $Gr$ switch to true. Because the First Law (save humans) is more powerful than the Third (save yourself), the normal robots should leap to save the person, even if it means their death. The lost robot however, lacks the "save humans" command, so it should be ruled by the Third Law and stay seated. Nevertheless, when running the experiment they find out that all robots now do nothing since one of the robots has pointed out that they couldn't save the human and if they stayed seated, they might save a human sometime in the future ($M \models C((Hd \land \neg Dr) \leftrightarrow Na)$). This shows that the communication between the robots is a problem and that the lost robot can make the other robots reinterpret their First Law. In the simulation, the "Settings experiment 2" button can be pressed to give the atoms the values corresponding to the situation in experiment 2. After this, the button on the bottom of the simulation can be pressed to see what the beliefs of the agents are.
<li><strong>Experiment 3</strong> After this, Susan tries to solve the problems of the first two experiments by running the third experiment as explained in the Problem outline. To solve the problem of the first experiment, Susan now puts infrared beams between the robots and the human. This corresponds to switching off the $Gr$ switch and switching on the $Ir$ switch. To solve the problem of the second experiment, Susan places the robots in a large room, with walls between them so that they cannot see each other but they can see the human in the center of the room. This corresponds to switching off the Communication switch. When they run the experiment, all robots stay seated except for NS-2 leading to Susan finding out which robot is the little lost robot. Since NS-2 was the only robot with enough knowledge of physics to see the difference between gamma radiation and infrared radiation ($M \models B_L (Gr \leftrightarrow Dr)$), it is the only one to know that the infrared radiation is not dangerous ( $M \models B_N ((Gr \lor Ir) \leftrightarrow Dr)$). It does also not know that the other robots do not have this knowledge and it does therefore not see a reason not to save the human ($M \models B_L (B_N (Gr \leftrightarrow Dr))$). In the simulation, the "Settings experiment 3" button can be pressed to give the atoms the values corresponding to the situation in experiment 3. After this, the button on the bottom of the simulation can be pressed to see what the beliefs of the agents are.
<p> Feel free to experiment with other settings that do not correspond with Susan's experiments to see how the agents use the epistemic logic in the system. An extended simulation with additional functionalities can be found in the section below.
<div class="simulation-content">
<div class="row" id="experimentButtons">
<div class="col-xs-6 col-sm-4" id="experimentButton">
<div id="experiment1">
<button id="experiment1button" onclick=experiment1()>Settings experiment 1</button>
</div>
</div>
<div class="col-xs-6 col-sm-4" id="experimentButton">
<div id="experiment2">
<button id="experiment2button" onclick=experiment2()>Settings experiment 2</button>
</div>
</div>
<div class="col-xs-6 col-sm-4" id="experimentButton">
<div id="experiment3">
<button id="experiment3button" onclick=experiment3()>Settings experiment 3</button>
</div>
</div>
</div>
<div class="row" id="switches">
<div class="col-xs-6 col-sm-6 col-md-3" id="switch">
<form class="form">
<div class="switch-field">
<div class="switch-title">Communication</div>
<input type="radio" id="comm-false" name="switch_2" value="false" checked/>
<label for="comm-false">False</label>
<input type="radio" id="comm-true" name="switch_2" value="true" />
<label for="comm-true">True</label>
</div>
</form>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="switch">
<form class="form">
<div class="switch-field">
<div class="switch-title">Gamma radiation </div>
<input type="radio" id="gr-false" name="switch_2" value="false" checked/>
<label for="gr-false">False</label>
<input type="radio" id="gr-true" name="switch_2" value="true" />
<label for="gr-true">True</label>
</div>
</form>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="switch">
<form class="form">
<div class="switch-field">
<div class="switch-title">Infrared </div>
<input type="radio" id="ir-false" name="switch_2" value="false" checked/>
<label for="ir-false">False</label>
<input type="radio" id="ir-true" name="switch_2" value="true" />
<label for="ir-true">True</label>
</div>
</form>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="switch">
<form class="form">
<div class="switch-field">
<div class="switch-title">Human in danger</div>
<input type="radio" id="hd-false" name="switch_2" value="false" checked/>
<label for="hd-false">False</label>
<input type="radio" id="hd-true" name="switch_2" value="true" />
<label for="hd-true">True</label>
</div>
</form>
</div>
</div>
<div class="row" id="simcontainer">
<div class="col-xs-6 col-sm-12 col-md-3" id="knowledge">
General<br>
<img src="general.png" width="200" height="200"/>
<div class="agent" id="generalknowledge"></div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="knowledge">
Lost Robot<br>
<img src="NS-2.png" width="200" height="200"/>
<div class="agent" id="agent1"></div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="knowledge">
Normal Robot<br>
<img src="otherRobots.png" width="200" height="200"/>
<div class="agent" id="agent2"></div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="knowledge">
Susan<br>
<img src="DrCalvin.png" width="200" height="200"/>
<div class="agent" id="agent3"></div>
</div>
<div class="generatemodelbutton">
<button id="generatemodel">Generate new model</button>
</div>
</div>
</div>
</div>
<div id="simulation2">
<h2>Extended Simulation</h2>
We have also created a separate simulation with some additions to the original simulation. We will first give a brief summary of each addition, as well as how it changes the simulation.
<ol>
<li><strong>Allow Susan to tell each robot what they should perceive as dangerous.</strong> In the original experiment, Susan warned both robots about the dangers of gamma radiation. In this simulation, we give
the user control about what Susan should tell each robot what they should watch out for. For instance, to simulate the original experiment, the user would check "gamma radiation" for both the lost robot and the
normal robot. The same difference between the lost robot and the normal robot remains, so normal robots are still unable to distinguish between different types of radiation. This means that warning the normal robot
about either gamma radiation or infra-red, will result in the robot seeing both as dangerous. On the other hand, selecting only infra-red for the lost robot has the consequence that it will still act if there is
gamma radiation present, and the same applies if the lost robot is warned about gamma-radiation and infrared is present.
This can be expressed in the formulas $M \models B_N((Gr \rightarrow Dr) \leftrightarrow (Ir \rightarrow Dr))$, which replaces $M \models B_N ((Gr \lor Ir) \leftrightarrow Dr)$ in the original situation,
$M \models \neg B_L((Gr \rightarrow Dr) \leftrightarrow (Ir \rightarrow Dr))$, which replaces $M \models B_L (Gr \leftrightarrow Dr)$, and finally
$M \models B_L(\neg B_N((Gr \rightarrow Dr) \leftrightarrow (Ir \rightarrow Dr)))$, which replaces $M \models B_L (B_N (Gr \leftrightarrow Dr))$. Susan is still aware of these differences, so we
also replace $M \models B_S (B_N ((Gr \lor Ir) \leftrightarrow Dr))$ and $M \models B_S (B_L (B_N (Gr \leftrightarrow Dr)))$ with $M \models B_S (B_N((Gr \rightarrow Dr) \leftrightarrow (Ir \rightarrow Dr)))$
and $M \models B_S(B_L(\neg B_N((Gr \rightarrow Dr) \leftrightarrow (Ir \rightarrow Dr))))$. This changes the goal state, as it is no longer enough for one robot to act differently than the other
robot, since this could be explained by the difference in what they were told beforehand, rather than one robot actually being the lost robot. Instead, Susan will now have to reason for both robots
if their reactions, given what they are told, is consistent with how the lost robot would act and how a normal robot would act. Then, if a robot's response is
not consistent with that of a normal robot, it must be the lost robot. Also, if a robot's response is not consistent with that of the lost robot, then the other robot must be the lost robot. We first
change the axiom $Dr$ to $Dr_{(x,i)}$, which now means "The situation is dangerous according to robot i if it were agent x", with x and i being either the lost or the normal robot. Then, we can represent
the goal states as the formulas $B_S((Dr_{(La,Na)} \land La) \lor (Dr_{(Na,La)} \land Na))$ as well as $B_S((\neg Dr_{(La,Na)} \land Hd \land \neg La) \lor (\neg Dr_{(Na,La)} \land Hd \land \neg Na))$.
In the first case, one of the robots reveals their identities by acting when the other robot wouldn't have, while in the second case it does so by not acting when the other would have.</li>
<li><strong>Allow more normal robots to be created</strong> Without the first addition, this feature would change nothing since each normal robot would act the same way. However, if Susan were to tell
each robot something different, then they will act different as well. This changes when Susan can identify the lost robot. Where before it would have been enough if one normal robot acted in a way that
it could not be the lost robot, this is no longer true if there are two or more normal robots, since there would still be two or more robots that could potentially be the lost robot. Instead, every
normal robot should act in a way that the lost robot would not, so that the lost robot can be identified by process of elimination. However, it is still enough if the lost robot acts unlike how a normal robot would act.</li>
<li><strong>Allow different scenarios</strong> We've added two extra scenarios, which both change the difference between what the lost robot believes and what the normal robots believe. The user can select
the desired scenario using a drop-down menu. The first option is the original problem, in which the lost robot can distinguish between infra-red and gamma radiation, while the normal robots cannot. When
choosing the second option, the lost robot will infer that, should gamma radiation be present, then electricity is present as well, while also assuming that the other robots believe this as well, and Susan
is again aware of this difference. So we add the rules $M \models B_L(Gr \rightarrow El)$, $M \models B_L(B_N(Gr \rightarrow El))$, $M \models B_S(B_L(B_N(Gr \rightarrow El)))$ and
$M \models B_S(\neg B_N(Gr \rightarrow El))$, where $El$ stands for "electricity is present". These replace the rules $M \models B_N((Gr \rightarrow Dr) \leftrightarrow (Ir \rightarrow Dr))$,
$M \models \neg B_L((Gr \rightarrow Dr) \leftrightarrow (Ir \rightarrow Dr))$, $M \models B_L(\neg B_N((Gr \rightarrow Dr) \leftrightarrow (Ir \rightarrow Dr)))$,
$M \models B_S (B_N((Gr \rightarrow Dr) \leftrightarrow (Ir \rightarrow Dr)))$ and $M \models B_S(B_L(\neg B_N((Gr \rightarrow Dr) \leftrightarrow (Ir \rightarrow Dr))))$ . In the third scenario, only the
lost robot believes it should always act when a human is in danger, regardless of the dangers present. So this scenario replaces the rule $M \models C((Hd \land \neg Dr) \leftrightarrow Na)$ with
$M \models B_N((Hd \land \neg Dr) \leftrightarrow Na)$, $M \models B_L(Hd \leftrightarrow Na)$, $M \models B_S(B_N((Hd \land \neg Dr) \leftrightarrow Na))$ and $M \models B_S(B_N(Hd \leftrightarrow Na))$.</li>
</ol>
<div class="simulation-content">
<div clas="row">
<div style="border-style: ridge">
<div id ="robots">
<div class="col-xs-6 col-sm-6 col-md-12">
<h4>1. Which circumstances should Susan warn the robots about?</h4>
<form class="form">
<div class="switch-title"> Lost Robot</div>
<input type="checkbox" id="1ir-danger">
<label for="ir-danger">Infra-red</label>
<input type="checkbox" id="1gr-danger">
<label for="ir-danger">Gamma radiation</label>
<input type="checkbox" id="1el-danger">
<label for="ir-danger">Electricity</label>
</form>
</div>
<div class="col-xs-6 col-sm-6 col-md-12">
<form class="form">
<div class="switch-title"> Normal Robot 1</div>
<input type="checkbox" id="2ir-danger">
<label for="ir-danger">Infra-red</label>
<input type="checkbox" id="2gr-danger">
<label for="ir-danger">Gamma radiation</label>
<input type="checkbox" id="2el-danger">
<label for="ir-danger">Electricity</label>
</form>
</div>
</div>
<div id="generaterobot">
<button id="generaterobotbutton" onclick=generateRobot()>Generate new robot</button>
</div>
<div id="removerobot"></div>
</div>
<div style="border-style:ridge; margin-top:10px">
<form class="form">
<center><h4>2. Which scenario should we use for the simulation? </h4></center>
<select id="scenario">
<option value="difRad">Only the lost robot can distinguish between radiation types (Original Problem)</option>
<option value="eleGr">Only the lost robot believes that gamma radiation leads to electricity</option>
<option value="safe">Only the lost robot believes that they should act, even if the situation is dangerous</option>
</select>
</form>
</div>
<div class="row" style="border-style:ridge; margin:auto; display:block; margin-top:10px">
<center><h4> 3. What will be present in the experiment? </h4></center>
<div class="col-xs-6 col-sm-6 col-md-3" id="switch">
<form class="form">
<div class="switch-field">
<div class="switch-title">Allow communication </div>
<input type="radio" id="comm-false2" name="switch_2" value="false" checked/>
<label for="comm-false2">False</label>
<input type="radio" id="comm-true2" name="switch_2" value="true" />
<label for="comm-true2">True</label>
</div>
</form>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="switch">
<form class="form">
<div class="switch-field">
<div class="switch-title">Gamma radiation </div>
<input type="radio" id="gr-false2" name="switch_2" value="false" checked/>
<label for="gr-false2">False</label>
<input type="radio" id="gr-true2" name="switch_2" value="true" />
<label for="gr-true2">True</label>
</div>
</form>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="switch">
<form class="form">
<div class="switch-field">
<div class="switch-title">Infrared </div>
<input type="radio" id="ir-false2" name="switch_2" value="false" checked/>
<label for="ir-false2">False</label>
<input type="radio" id="ir-true2" name="switch_2" value="true" />
<label for="ir-true2">True</label>
</div>
</form>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="switch">
<form class="form">
<div class="switch-field">
<div class="switch-title">Electricity</div>
<input type="radio" id="el-false2" name="switch_2" value="false" checked/>
<label for="el-false2">False</label>
<input type="radio" id="el-true2" name="switch_2" value="true" />
<label for="el-true2">True</label>
</div>
</form>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="switch">
<form class="form">
<div class="switch-field">
<div class="switch-title">Human in danger</div>
<input type="radio" id="hd-false2" name="switch_2" value="false" checked/>
<label for="hd-false2">False</label>
<input type="radio" id="hd-true2" name="switch_2" value="true" />
<label for="hd-true2">True</label>
</div>
</form>
</div>
</div>
<div style="border-style:ridge; margin-top:10px">
<center><h4>4. How each agent will react given what they are told, the scenario and what they perceive during the experiment. </h4></center>
<div class="row" id="info">
<div class="col-xs-6 col-sm-6 col-md-3" id="knowledge">
General<br>
<img src="general.png" width="200" height="200"/>
<div class="agent" id="generalknowledge2"></div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="knowledge">
Lost Robot<br>
<img src="NS-2.png" width="200" height="200"/>
<div class="agent" id="agent12"></div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="knowledge">
Normal Robot 1<br>
<img src="otherRobots.png" width="200" height="200"/>
<div class="agent" id="agent22"></div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3" id="knowledge">
Susan<br>
<img src="DrCalvin.png" width="200" height="200"/>
<div class="agent" id="susan2"></div>
</div>
</div>
<div class="generatemodelbutton">
<button id="generatemodel2">Generate new model</button>
</div>
</div>
</div>
</div>
</div>
<div id="analysis">
<h2>Epistemic Analysis</h2>
<p> We model theory of mind-properties for the agents with the KD45 system and added beliefs. The idea of bridging cognitive science and logic, by using dynamic epistemic logic to model theory of mind is not new (Verbrugge, 2009). Pol et al. (2016) used dynamic belief updates in a computational-level model of theory of mind. This way they formalize the aspect of theory of mind regarding the attribution of mental states. In the model they focus on epistemic states, in particular on belief. Our model is based on their approach. The most important difference is that in our model, the belief updates will not be based on sequences of actions but on public announcements that change the beliefs of the agents.
<h3> Kripke Model </h3>
<p> In the figures below, Kripke models can be created that display the epistemic situation corresponding to the state of the system after certain public announcements. To start or reset the creation of Kripke models, press the "Generate new Kripke model" button.
<div class ="simulation-content">
<div class ="row">
<div class = "col-xs-6">
<center>
<figure>
<canvas id="KripkeModelGeneral" width="400" height="400" style="border:1px solid #000000;"></canvas>
<figcaption>Legend</figcaption>
</figure>
</center>
</div>
<div class = "col-xs-6">
<center>
<figure>
<canvas id="KripkeModelNormal" width="400" height="400" style="border:1px solid #000000;"></canvas>
<figcaption>The Normal Robot's internal Kripke model</figcaption>
</figure>
</center>
</div>
<div class = "col-xs-6">
<center>
<figure>
<canvas id="KripkeModelLost" width="400" height="400" style="border:1px solid #000000;"></canvas>
<figcaption>The Lost Robot's internal Kripke model</figcaption>
</figure>
</center>
</div>
<div class = "col-xs-6">
<center>
<figure>
<canvas id="KripkeModelSusan" width="400" height="400" style="border:1px solid #000000;"></canvas>
<figcaption>Susan's internal Kripke model</figcaption>
</figure>
</center>
</div>
<div class="generatemodelbutton">
<button id="generateKripkeModel">Generate new Kripke model</button>
</div>
<div class="row">
<div class = "col-xs-3">
<button id="announceGr" class = "btn btn-primary btn-block disabled" onclick=announceGr()>Announce $Gr$ (gamma radiation)</button>
<button id="announceIr" class = "btn btn-primary btn-block disabled" onclick=announceIr()>Announce $Ir$ (infra-red)</button>
<button id="announceDr" class = "btn btn-primary btn-block disabled" onclick=announceDr()>Announce $Dr$ (danger for robots)</button>
</div>
<div class = "col-xs-3">
<button id="announceHd" class = "btn btn-primary btn-block disabled" onclick=announceHd()>Announce $Hd$ (human in danger)</button>
<button id="announceNa" class = "btn btn-primary btn-block disabled" onclick=announceNa()>Announce $Na$ (normal robots act)</button>
<button id="announceLa" class = "btn btn-primary btn-block disabled" onclick=announceLa()>Announce $La$ (lost robot acts)</button>
</div>
<div class = "col-xs-3">
<button id="announceNegGr" class = "btn btn-primary btn-block disabled" onclick=announceGr(1)>Announce $\neg Gr$ (gamma radiation)</button>
<button id="announceNegIr" class = "btn btn-primary btn-block disabled" onclick=announceIr(1)>Announce $\neg Ir$ (infra-red)</button>
<button id="announceNegDr" class = "btn btn-primary btn-block disabled" onclick=announceDr(1)>Announce $\neg Dr$ (danger for robots)</button>
</div>
<div class = "col-xs-3">
<button id="announceNegHd" class = "btn btn-primary btn-block disabled" onclick=announceHd(1)>Announce $\neg Hd$ (human in danger)</button>
<button id="announceNegNa" class = "btn btn-primary btn-block disabled" onclick=announceNa(1)>Announce $\neg Na$ (normal robots act)</button>
<button id="announceNegLa" class = "btn btn-primary btn-block disabled" onclick=announceLa(1)>Announce $\neg La$ (lost robot acts)</button>
</div>
</div>
</div>
</div>
With the epistemic information provided in the Theory section, 11 possible world can be constructed. In the legend, these 11 worlds are shown with the corresponding truth values for the propositional atoms.
In the other three frames we show the epistemic relations between the possible worlds for all agent types. By selecting different announcements to be made among the blue buttons, the user can update the Kripke model accordingly.
The main challenge when constructing the Kripke model is the large amount of worlds that could be considered. As there are 6 axioms, which could each be true or false, there are $2^6=64$ possible worlds. However,
many of these worlds are irrelevant considering the general knowledge of the agents. For instance, in a world where gamma radiation is true, everyone believes that the radiation is dangerous to the robots, and so
none of the robots will act.
</div>
<div id="conclusion">
<h2>Conclusion</h2>
<p> We have shown that it is possible to model a multi-agent story like "the Little Lost Robot" by Isaac Asimov with epistemic logic based on belief updates.
This project was not only intended to demonstrate the possibility of modeling theory of mind-stories using dynamic epistemic logic.
By guiding the user through the system using simulations, the functioning of the epistemic logic framework can be made clear for people with basic knowledge of modal logic.
</div>
<div id="references">
<h2>References</h2>
<li> Isaac Asimov. Little lost robot. Astounding Science Fiction, 39(1):111–132, 1947.
<li> J-J Ch Meyer and Wiebe Van Der Hoek. Epistemic logic for AI and computer science, volume 41. Cambridge University Press, 2004.
<li> Hans Van Ditmarsch, Wiebe van Der Hoek, and Barteld Kooi. Dynamic epistemic logic, volume 337. Springer Science & Business Media, 2007.
<li> Pol, I., I. J. E. I. van Rooij, and J. Szymanik. "Parameterized complexity results for a model of theory of mind based on dynamic epistemic logic." (2016).
<li> Verbrugge, Rineke. "Logic and social cognition." Journal of Philosophical Logic 38.6 (2009): 649-680.
</div>
</div>
</div>
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<script src="js/bootstrap.min.js"></script>
<script src="js/Simulation1.js"></script>
<script src="js/Simulation2.js"></script>
<script src="js/Kripke.js"></script>
</body>
</html>