forked from meneguzzi/plan-goal-recognition-talk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpucrs-planrecognition-presentation.tex
2016 lines (1812 loc) · 84.3 KB
/
pucrs-planrecognition-presentation.tex
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
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{colortbl}
\usepackage{epstopdf}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{listings}
\usepackage{letltxmacro}
\usepackage{algorithm, algpseudocode}
\usepackage{subcaption}
\newcommand{\todo}[1]{ {\color{red} #1} }
\def\masterclass{1}
\def\masterclass{0}
\logo{\includegraphics[width=4cm]{politecnica.pdf}}
\usetheme{Madrid}
\usecolortheme{seagull}
\title[\fontsize{0.08cm}{1em}\selectfont Plan and Goal Recognition in the Real World]{Plan and Goal Recognition in the Real World}
\author[Meneguzzi]{Felipe Meneguzzi\dag
}
\institute[]{\dag Pontifical Catholic University of Rio Grande do Sul, Brazil
\\
\url{[email protected]}
}
\date{October, 2018}
\AtBeginSection[]
{
\begin{frame}
\frametitle{Table of Contents}
% \tableofcontents[currentsection,sectionstyle=show/hide,subsectionstyle=show/hide/show]
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
%---------------------------------------------------------------------------------
\begin{frame}
\titlepage
\end{frame}
% \logo{\includegraphics[width=1cm]{politecnica.pdf}}
\logo{}
%---------------------------------------------------------------------------------
\section{Introduction}
\subsection{Motivation and Intuition}
% \begin{frame}[c]\frametitle{Tentative Structure}
% \begin{itemize}
% \item Introduction to plan recognition (from Automated Planning)
% \item Goal recognition heuristics
% \item Hybrid goal recognition heuristics (ask Mor)
% \item Optimality monitoring and applications
% \item Recognizing plans using real-time video data
% \item Future work
% \end{itemize}
% \end{frame}
\begin{frame}[c]\frametitle{Introduction}
\begin{itemize}
\item Recognizing plans and goals of others is a critical ability for intelligent interaction:
\begin{itemize}
\item important for humans/agents working in the same environment
\item increasingly important as we build more intelligent systems
\end{itemize}
\item Overall area of Plan, Activity and Intent Recognition
\begin{itemize}
\item Activity recognition: recognizing meaningful activities from low-level sensor data
\item Plan/Intent/Goal recognition: recognizing intentional higher-level sequences of activities
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[c]\frametitle{Introduction}
\begin{itemize}
\item \textbf{Goal Recognition} is the task of recognizing agents' goal that explains a sequence of observations of its actions;
\begin{itemize}
\item Related to plan recognition, i.e. recognizing a \emph{top-level} action
\item A specific form of the problem of abduction
\end{itemize}
\item Approaches to goal and plan recognition divided into roughly two types:
\begin{itemize}
\item Plan-library based (\emph{classical} plan recognition)
\item Domain-theory based (plan recognition as planning, or PRAP)
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[c]\frametitle{Flavors of Recognition Formalism}
\begin{columns}
\begin{column}[t]{0.5\textwidth}
Plan Library
\includegraphics[width=\textwidth]{examples/fig_plan_library.pdf}
\end{column}
\begin{column}[t]{0.5\textwidth}
Domain Theory (PRAP)
\lstinputlisting[basicstyle=\fontsize{4}{4.5}\selectfont,language=LISP]{examples/easy_ipc_grid.pddl.txt}
\end{column}
\end{columns}
\end{frame}
\begin{frame}[c]\frametitle{An example of Activity Recognition}
% \animategraphics[loop,type=png,width=\linewidth]{2}{fig/egg-}{1}{4}
\begin{center}
\only<1>{\includegraphics[width=.5\linewidth]{fig/egg-1.jpg}}
\only<2>{\includegraphics[width=.5\linewidth]{fig/egg-2.jpg}}
\only<3>{\includegraphics[width=.5\linewidth]{fig/egg-3.jpg}}
\only<4>{\includegraphics[width=.5\linewidth]{fig/egg-4.jpg} \\
\texttt{breaking egg}
}
\end{center}
% {\color{red} Complete this once I figure out how to include graphics}
\end{frame}
\begin{frame}[c]\frametitle{An Example of Goal/Plan Recognition}
from Miquel Ramirez's thesis
\begin{columns}
\begin{column}{0.5\textwidth}
\includegraphics[width=.9\textwidth]{fig/roboschool-example.pdf}\\
Wooden pieces $p_1,p_2, \dots p_n$\\
Pieces have shapes and colors\\
Bins $b_1, b_2, \dots, b_n$
\end{column}
\begin{column}{0.5\textwidth}
\only<1>{
The possible \textbf{goals} the trainer expected to pursue:
\begin{enumerate}
\item Store all triangles in $b_1$
\item Store all spheres in $b_2$
\item Store all cubes in $b_3$
\item Store red objects in $b_2$
\item Store green objects in $b_3$
\item Store blue objects in $b_1$
\end{enumerate}
}
\only<2>{
One possible \emph{plan} for the trainer to achieve goal \#1 \\(store all triangles in $b_1$):
\begin{enumerate}
\item Walk from B3 into A4
\item Pick $p_3$ up
\item Walk from A4 into B3
\item Walk from B3 into C2
\item Pick $p_4$ up
\item Throw $p_3$ into $b_1$
\item Throw $p_4$ into $b_1$
\end{enumerate}
}
\only<3->{
If sensors miss 70\% of \emph{walk} actions and half \emph{pick} and \emph{drop} actions, we may only see:
\begin{enumerate}
\item Pick $p_3$ up
\item Walk from A4 into B3
\end{enumerate}
}
\only<4->{
Here, we could deduce either goal \#1 or \#4 (store all red objects in $b_2$), as other tasks are less \emph{likely}.
}
\end{column}
\end{columns}
\end{frame}
%---------------------------------------------------------------------------------
\if\masterclass1
\subsection{Formalism}
\begin{frame}[c]\frametitle{Automated Planning}
\begin{definition} [\textbf{Planning}]
A planning instance is represented by a triple $\Pi = \langle \Xi, \mathcal{I}, G\rangle$, in which:
\begin{itemize}
\item $\Xi = \langle \Sigma, \mathcal{A} \rangle$ is the \textbf{domain definition}, and consists of a finite set of \textbf{facts} $\Sigma$ and a finite set of \textbf{actions} $\mathcal{A}$ (action costs typically 1);
\item $\mathcal{I} \subseteq \Sigma$ and $G \subseteq \Sigma$ represent the \textbf{planning problem}, in which $\mathcal{I} \subseteq \Sigma$ is the \textbf{initial state}, and $G \subseteq \Sigma$ is the \textbf{goal state}.
\end{itemize}
\end{definition}
\begin{itemize}
\item Actions $a \in \mathcal{A}$ are tuples $a = \langle \mathit{pre}(a), \mathit{eff}(a), \mathit{cost}(a) \rangle$
\item Facts $\Sigma$ can be modeled in a variety of ways:
\begin{itemize}
\item As a logic language (restricted FOL): \\states are truth assignments
\item As a set of variables $\mathcal{V}$ with finite domains: \\states are variable assignments
\end{itemize}
%\todo{Complete this in a new slide}
\end{itemize}
\end{frame}
\begin{frame}[c]\frametitle{Roboschool}
{\color{red} Add Roboschool formalization}
\end{frame}
\begin{frame}[c]\frametitle{Goal Recognition Problem}
\begin{definition}[\textbf{Goal Recognition Problem}]
A goal recognition problem is a tuple $P = \langle \Xi, \mathcal{I}, \mathcal{G}, \mathbf{O} \rangle$, where:
\begin{itemize}
\item $\Xi = \langle \Sigma, \mathcal{A} \rangle$ is the domain definition (facts and actions) ;
\item $\mathcal{I} \subseteq \Sigma$ is the initial state;
\item $\mathcal{G}$ s.t. $\forall{G \in \mathcal{G}}, G \subseteq \Sigma$ is a set of candidate goals (with an assumed hidden goal $G$); and
\item $\mathbf{O}$ is a sequence $\langle o_1, \dots o_n \rangle$ of observations, where $o_i \in \mathcal{A}$
\end{itemize}
\end{definition}
\begin{itemize}
\item The solution for a goal recognition problem is the hidden goal $G \in \mathcal{G}$ that is most consistent with observation sequence $O$.
\item Caveat: we may have other representations for the observations
\item This is what I will refer to as PRAP
\end{itemize}
\end{frame}
\begin{frame}[c]\frametitle{Plan Recognition Problem}
\begin{definition}[Plan Recognition Problem]
\todo{Figure out formalization}
\end{definition}
\begin{itemize}
\item Requires a lot more domain knowledge
\item This is what I will refer to as classical plan recognition
\end{itemize}
\end{frame}
\begin{frame}[c]\frametitle{Roboschool}
{\color{red} Add Roboschool problem for master class}
\end{frame}
\begin{frame}[c]\frametitle{Observations}
Often, this means Observed Actions\\
This observation sequence can be either \textbf{partial} or \textbf{full}.\\
\todo{Observations as actions, and states, animation}
\end{frame}
\fi
% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\section{Goal Recognition as reasoning over Heuristics}
\if\masterclass1
\begin{frame}[c]\frametitle{Goal Recognition}
Background on other PRAP approaches:
\begin{itemize}
\item Ramirez and Geffner
\item Martin
\item Sohrabi
\end{itemize}
\end{frame}
\begin{frame}[c]\frametitle{Previous Work: Ramirez and Geffner}
\if\masterclass1
\todo{Move this to the background}
\fi
\begin{itemize}
\item First approaches to goal recognition: Plan Recognition as Planning (PRAP)
\item Probabilistic model aims to compute $P(G \mid O)$
\item Following Bayes Rule $P(G \mid O) = \alpha P(O \mid G) P(G)$
\item Given $P(G)$ as a prior, key bottleneck is computing $P(O \mid G)$
\begin{itemize}
\item In their work $P(O \mid G)$ is computed in terms of a cost difference $c(G,O) - c(G,\bar{O})$
\item Computational cost is \textbf{two planner calls per goal hypothesis}
\item For online recognition: two planner calls per goal hypothesis \textbf{per observation}
\end{itemize}
\item Some conclusions challenged for path planning domains\\ (Masters and Sardina 2017)
\end{itemize}
\end{frame}
\fi
\begin{frame}{Motivation}
\begin{itemize}
\item In this work, we use a \textbf{planning domain definition} to represent agent behavior and environment properties;
\item Previous approaches involve multiple calls to a modified planner.
\item Our main contribution is twofold:
\begin{itemize}
\item We \textbf{obviate the need to execute a planner multiple times} for recognizing goals; and
\item We develop novel goal recognition heuristics that \textbf{use planning landmarks}.
\end{itemize}
% \item We evaluate our approaches against the fastest and most accurate approach of Ramírez and Geffner ({\footnotesize Plan Recognition as Planning. IJCAI, 2009}) over \textbf{15 planning domains};
\item We show that our approaches are \textbf{more accurate} and \textbf{orders of magnitude faster} than Ramírez and Geffner's approach.
\end{itemize}
\end{frame}
\if\masterclass1
\begin{frame}[c]\frametitle{Planning Heuristics}
Material about the planning heuristics
\end{frame}
\begin{frame}{Background: Planning and Landmarks}
\begin{definition} [\textbf{Planning}]
\textit{A planning instance is represented by a triple $\Pi = \langle \Xi, \mathcal{I}, G\rangle$, in which:
\begin{itemize}
\item $\Xi$ $=$ $\langle$$\Sigma$, $\mathcal{A}$$\rangle$ is the \textbf{domain definition}, and consists of a finite set of \textbf{facts} $\Sigma$ and a finite set of \textbf{actions} $\mathcal{A}$ (action costs $=$ 1);
\item $\mathcal{I}$ and $G$ represent the \textbf{planning problem}, in which $\mathcal{I}$ $\subseteq$ $\Sigma$ is the \textbf{initial state}, and $G$ $\subseteq$ $\Sigma$ is the \textbf{goal state}.
\end{itemize}}
\end{definition}
\begin{definition}[\textbf{Landmarks}]
\textit{Given a planning instance $\Pi = \langle \Xi, \mathcal{I}, G\rangle$, a \textbf{fact} (or \textbf{action}) $L$ is a landmark in $\Pi$ iff $L$ must be \textbf{satisfied} (or \textbf{executed}) at some point along all valid plans that achieve $G$ from $\mathcal{I}$.}
\end{definition}
\begin{itemize}
\item To extract landmarks and their ordering, we use an algorithm developed by Hoffman \emph{et al.} {\footnotesize (Ordered Landmarks in Planning. JAIR, 2004)}.
\end{itemize}
\end{frame}
\fi
%---------------------------------------------------------------------------------
\begin{frame}{Computing Achieved Landmarks}
\if\masterclass1
\todo{Change this example to the one from Ramirez}
\fi
\begin{center}
\includegraphics[width=.4\textwidth]{example.pdf}
\end{center}
\begin{itemize}
\item Our heuristics require identifying which fact landmarks have been achieved during the observed plan execution for every candidate goal $G \in \mathcal{G}$;
\item For every candidate goal $G \in \mathcal{G}$:
\begin{itemize}
\item Extract \emph{ordered} landmarks for $G$;
\item Use achieved landmarks of $G$ in preconditions and effects of every observed action $o \in O$;
\item Under partial observability, we deal with missing actions by inferring that predecessors of observed landmarks must have been achieved;
\end{itemize}
\end{itemize}
% \begin{figure}[here]
% \centering
% \includegraphics[width=0.65\linewidth]{algo1-computing_achieved_landmarks.pdf}
% \end{figure}
\end{frame}
%---------------------------------------------------------------------------------
\begin{frame}{Landmark-Based Goal Completion Heuristic}
\begin{itemize}
\item Goal Completion $h_{gc}$ aggregates the percentage of completion of each sub-goal into an overall percentage of completion for all facts of a candidate goal;
\end{itemize}
\begin{equation}
h_{gc}(G, \mathcal{AL}_{G}, \mathcal{L}_{G}) = \left(\frac{\sum_{g \in G} \frac{|\mathcal{AL}_{g} \in \mathcal{AL}_{G} |}{|\mathcal{L}_{g} \in \mathcal{L}_{G}|}}{ |G| }\right)
\end{equation}
where:
\begin{itemize}
\item $\mathcal{AL}_{G}$ achieved landmarks for goals in $G$
\item $\mathcal{L}_{G}$ all landmarks for goals in $G$
\end{itemize}
\end{frame}
% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\if\masterclass1
\begin{frame}{Landmark-Based Goal Completion Heuristic: Algorithm}
\begin{itemize}
\item Our approach allows the use of a threshold $\theta$, giving us \textbf{flexibility to avoid eliminating candidate goals} whose the percentage of goal completion are close to the highest completion value;
\end{itemize}
\begin{figure}[here]
\centering
\includegraphics[width=0.8\linewidth]{algo2-heuristic_goalcompletion.pdf}
\end{figure}
\end{frame}
\fi
%---------------------------------------------------------------------------------
\begin{frame}{Landmark-Based Uniqueness Heuristic (1 of 2)}
\begin{itemize}
\item Our second heuristic computes \textbf{landmark uniqueness}: \\inverse frequency of a landmark within landmarks for candidate goals:%, \emph{i.e.}, how unique (and thus informative) each landmark is among all landmarks;
\end{itemize}
\begin{equation}
L_{\mathit{Uniq}}(L, \mathcal{L}_{\mathcal{G}}) = \left(\frac{1}{\displaystyle\sum_{\mathcal{L} \in \mathcal{L_G}} |\{L |L \in \mathcal{L}\}|}\right)
\end{equation}
\begin{center}
\includegraphics[width=.4\textwidth]{example.pdf}
\quad
\begin{minipage}{.4\textwidth}
\vspace{-6em}
$L_{\mathit{Uniq}}(L2)=1/2$ \\
$L_{\mathit{Uniq}}(L1)=1/3$ \\
$L_{\mathit{Uniq}}(L3)=1$
\end{minipage}
\end{center}
\end{frame}
% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\begin{frame}{Landmark-Based Uniqueness Heuristic (2 of 2)}
\begin{itemize}
\item Our second heuristic, called $h_{uniq}$, estimates the goal completion of a candidate goal $G$ by calculating the ratio between the sum of the uniqueness value of the achieved landmarks of $G$ and the sum of the uniqueness value of all landmarks of $G$;
\end{itemize}
\begin{equation}
h_{\mathit{uniq}}(G, \mathcal{AL}_{G}, \mathcal{L}_{G}, \Upsilon_{uv}) = \left(
\frac
{\displaystyle\sum_{\mathcal{A}_{L} \in \mathcal{AL}_{G}}\Upsilon_{uv}(\mathcal{A}_{L})}
{\displaystyle\sum_{L \in \mathcal{L}_{G}}\Upsilon_{uv}(L)}\right)
\end{equation}
where:
\begin{itemize}
\item $\Upsilon_{uv}$ is a table of uniqueness values
\item $\mathcal{AL}_{G}$ achieved landmarks for goals in $G$
\item $\mathcal{L}_{G}$ all landmarks for goals in $G$
\end{itemize}
\end{frame}
% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\if\masterclass1
\begin{frame}{Landmark-Based Uniqueness Heuristic: Algorithm}
\begin{itemize}
\item Our second heuristic is called $h_{uniq}$;
\end{itemize}
\begin{figure}[here]
\centering
\includegraphics[width=0.75\linewidth]{algo3-heuristic_uniqueness.pdf}
\end{figure}
\end{frame}
\fi
%---------------------------------------------------------------------------------
% \if\masterclass1
\begin{frame}{Example (1 of 4)}
\begin{figure}[here]
\centering
\includegraphics[width=0.75\linewidth]{example-blocksworld.pdf}
\end{figure}
\begin{itemize}
\item Observations:
\begin{itemize}
\item \texttt{(unstack D B)}; and
\item \texttt{(unstack C A)}.
\end{itemize}
\item The real goal is: \texttt{(and (ontable D) (on C D) (clear C))}
\end{itemize}
\end{frame}
\begin{frame}{Example (2 of 4)}
\textbf{Achieved Landmarks in Observations:}
\begin{itemize}
\item \texttt{(and (ontable D) (clear A) (on A D)), 5 out of 8}:
\begin{itemize}
\item {\scriptsize \texttt{[(clear A)]}, \texttt{[(clear A) (ontable A) (handempty)]},
\\ \texttt{[(on C A) (clear C) (handempty)]}, \texttt{[(holding D)]},
\\ \texttt{[(clear D) (on D B) (handempty)]}}
\end{itemize}
\item \texttt{(and (ontable D) (clear B) (on B D)), 4 out of 7}:
\begin{itemize}
\item {\scriptsize \texttt{[(clear B)]}, \texttt{[(ontable B) (handempty)]},
\\ \texttt{[(on D B) (clear D) (handempty)]}, \texttt{[(holding D)]}}
\end{itemize}
\item \texttt{(and (ontable D) (clear C) (on C D)), 5 out of 7}:
\begin{itemize}
\item {\scriptsize \texttt{[(clear C)]}, \texttt{[(clear C) (on C A) (handempty)]}, \texttt{[(clear D) (holding C)]}
\\ \texttt{[(clear D) (on D B) (handempty)]}, \texttt{[(holding D)]}}
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}{Example (3 of 4) - $h_{gc}$}
\textbf{Landmark-Based Goal Completion Heuristic}
% TODO break this down in more detail
\begin{itemize}
\item \texttt{(and (ontable D) (clear A) (on A D))}:%, 5 out of 8:
\begin{itemize}
\item Goal Completion: 0.7222
\end{itemize}
\item \texttt{(and (ontable D) (clear B) (on B D))}:%, 4 out of 7:
\begin{itemize}
\item Goal Completion: 0.6666
\end{itemize}
\item \texttt{(and (ontable D) (clear C) (on C D))}:%, 5 out of 7:
\begin{itemize}
\item \textbf{Goal Completion: 0.7777 (highest estimated value)}
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}{Example (4 of 4) - $h_{uniq}$}
\textbf{Landmark-Based Uniqueness Heuristic}
\begin{itemize}
\item \texttt{(and (ontable D) (clear A) (on A D))}, Total$_{Uniq}$ = 5.5:
\begin{itemize}
\item {\scriptsize \texttt{[(clear A)] = 1}, \texttt{[(clear A) (ontable A) (handempty)] = 1},
\\ \texttt{[(on C A) (clear C) (handempty)] = 0.5}, \texttt{[(holding D)] = 0.3333},
\\ \texttt{[(clear D) (on D B) (handempty)] = 0.3333}}
\item $h_{uniq}$ = 3.1666 / 5.5 = 0.5757
\end{itemize}
\item \texttt{(and (ontable D) (clear B) (on B D))}, Total$_{Uniq}$ = 5:
\begin{itemize}
\item {\scriptsize \texttt{[(clear B)] = 1}, \texttt{[(ontable B) (handempty)] = 1},
\\ \texttt{[(on D B) (clear D) (handempty)] = 0.3333}, \texttt{[(holding D)] = 0.3333}}
\item $h_{uniq}$ = 2.6666 / 5 = 0.5333
\end{itemize}
\item \texttt{(and (ontable D) (clear C) (on C D))}, Total$_{Uniq}$ = 4.5:
\begin{itemize}
\item {\scriptsize \texttt{[(clear C)] = 1}, \texttt{[(clear C) (on C A) (handempty)] = 0.5},
\\ \texttt{[(clear D) (holding C)] = 1}, \texttt{[(holding D)] = 0.3333}
\\ \texttt{[(clear D) (on D B) (handempty)] = 0.3333}}
\item $h_{uniq}$ = 3.1666 / 4.5 = 0.71
\end{itemize}
\end{itemize}
\textbf{Recognized} {\footnotesize \texttt{(and (ontable D) (clear C) (on C D))}} \textbf{with: }
\\ $h_{uniq} = 0.71$
\end{frame}
% % \if\masterclass1
% \fi
%---------------------------------------------------------------------------------
\begin{frame}{Experiments and Evaluation}
\begin{itemize}
\item We evaluate our heuristics over datasets with 15 planning domains \\(6 of these domains from original Ramírez and Geffner paper):
\begin{itemize}
\item {\footnotesize \textsc{Blocks-World, Campus, Depots, Driver-Log, Dock-Worker-Robots, Easy-IPC-Grid, Ferry, Intrusion-Detection, Kitchen, Logistics, Miconic, Rovers, Satellite, Sokoban, and Zeno-Travel}};
\end{itemize}
\item These datasets contain hundreds of goal recognition problems, varying the observability (10\%, 30\%, 50\%, 70\%, and 100\%);
\item We compared our heuristics against the original approach of Ramírez and Geffner ({\footnotesize Plan Recognition as Planning. IJCAI, 2009}), which is their fastest and most accurate approach;
\end{itemize}
\end{frame}
% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\begin{frame}{Experiments and Evaluation - ROC Space (1 of 2)}
\begin{itemize}
\item Results of our heuristics use threshold $\theta = $ 20\%;
\item We compare Ramírez and Geffner's approach over ROC space,\\
which shows the trade-off between TPR and FPR;
\item We aggregate multiple domains and plot these goal recognition results in ROC space.
\end{itemize}
\end{frame}
% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\begin{frame}{Experiments and Evaluation - ROC Space (2 of 2)}
\begin{figure}[here]
\centering
\includegraphics[width=0.6\linewidth]{fig/rocspace-all_domains.pdf}
\end{figure}
\end{frame}
% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\begin{frame}{Experiments and Evaluation - Recognition Time}
\begin{figure}[here]
\centering
\includegraphics[width=0.7\linewidth]{fig/missing-recognition_time.pdf}
\end{figure}
\end{frame}
\begin{frame}{Experiments and Evaluation - Recognition Time with Noise}
\begin{figure}[here]
\centering
\includegraphics[width=0.7\linewidth]{fig/noisy-recognition_time.pdf}
\end{figure}
\end{frame}
%---------------------------------------------------------------------------------
% RFP - Do we need talk about related work?!
% \begin{frame}{Related Work}
% \begin{itemize}
% \item ?
% \end{itemize}
% \end{frame}
%---------------------------------------------------------------------------------
\begin{frame}{Contributions and Limitations}
% \todo{REDO THIS SLIDE}
\begin{itemize}
\item \textbf{Contribution so far:}
\begin{itemize}
\item Use planning landmarks for goal recognition;
\item Obviate the need to run a planner during goal recognition, resulting in much faster and highly accurate recognition; and
\item Robust dataset to evaluate goal recognition algorithms
\end{itemize}
% \item We show that our heuristics are more accurate and much faster than Ramírez and Geffner's approach ({\footnotesize Plan Recognition as Planning. IJCAI, 2009}).
\item \textbf{Limitations:}
\begin{itemize}
\item Sensitive to the presence of landmarks; and
\item Low accuracy with very few observations, \emph{i.e.}, 10\% of observability;
\end{itemize}
% \item \textbf{Future Work:}
% \begin{itemize}
% \item Use different landmark extraction algorithms;
% \item Use goal ordering techniques;
% \item Derive a probabilistic interpretation for the landmarks; and
% \item Apply our landmark-based heuristics to continuous and temporal domains.
% \end{itemize}
\end{itemize}
\end{frame}
%---------------------------------------------------------------------------------
\section{Online Goal Recognition as Reasoning over Landmarks}
\begin{frame}[c]\frametitle{Motivation for Efficient Online Goal Recognition}
Most goal recognition approaches using domain models have three key limitations:
\begin{enumerate}
\item assumption of a discrete state-space in a PDDL-like formalism
\begin{itemize}
\item not viable for use with path planning scenarios
\end{itemize}
\item assume all access to all observations at once
\begin{itemize}
\item approaches do not consider the time to recognition
\end{itemize}
\item need to call a planner multiple times per goal to rank hypotheses
\begin{itemize}
\item PRAP is computationally expensive, impractical for long plans
\end{itemize}
\end{enumerate}
\end{frame}
\begin{frame}[c]\frametitle{Online vs. Offline Plan Recognition}
\begin{itemize}
\item Offline plan recognition:
\begin{itemize}
\item All observations received at once;
\item Observations may be incomplete or noisy;
\item One-shot recognition;
\end{itemize}
\item Online plan recognition:
\begin{itemize}
\item Observations received incrementally;
\item Observations may be incomplete or noisy; %(can use facts as observations);
\item Objective is to recognize goal as soon as possible, without the full observation sequence
\end{itemize}
\end{itemize}
\begin{center}
\vspace{-3mm}
\includegraphics[width=.9\textwidth]{fig/observations-example.pdf}
\end{center}
\end{frame}
\begin{frame}[c]\frametitle{Efficient Online Goal Recognition}
% Thus, want to develop an approach that can:
% \begin{itemize}
% \item recognize plans over continuous and discrete domains
% \item use a full-fledged planner as little as possible
% \item return reliable goal ranking as soon as possible
% \end{itemize}
Our approach:
\begin{itemize}
\item is efficient for online goal recognition;
\item works in both discrete and continuous domains;
\if\masterclass1
\item uses goal-mirroring to minimize planner calls;
\else
\item minimizes planner calls;
\fi
\item reasons about landmarks to minimize the number of goal hypotheses;
\item returns reliable goal ranking as soon as possible
\end{itemize}
\end{frame}
\if\masterclass1
\begin{frame}[c]\frametitle{Previous Work: Ramirez and Geffner}
\if\masterclass1
\todo{Move this to the background}
\fi
\begin{itemize}
\item First approaches to goal recognition: Plan Recognition as Planning (PRAP)
\item Probabilistic model aims to compute $P(G \mid O)$
\item Following Bayes Rule $P(G \mid O) = \alpha P(O \mid G) P(G)$
\item Given $P(G)$ as a prior, key bottleneck is computing $P(O \mid G)$
\begin{itemize}
\item In their work $P(O \mid G)$ is computed in terms of a cost difference $c(G,O) - c(G,\bar{O})$
\item Computational cost is \textbf{two planner calls per goal hypothesis}
\item For online recognition: two planner calls per goal hypothesis \textbf{per observation}
\end{itemize}
\item Some conclusions challenged for path planning domains\\ (Masters and Sardina 2017)
\end{itemize}
\end{frame}
\begin{frame}[c]\frametitle{Previous Work: Goal Mirroring}
\begin{itemize}
\item Focuses on efficient online recognition
\item Uses a planner to generate plan hypotheses using $(|O|+1)|G|$ planner calls
\begin{itemize}
\item Computes optimal plans for each goal
\item For every incoming observation compute:
\begin{itemize}
\item prefix -- concatenation of observations
\item suffix -- plan from last observation to every goal
\end{itemize}
\item Rank plan hypotheses by comparing to ideal plan
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[c]\frametitle{Previous Work: Goal Recognition using Heuristics}
\begin{itemize}
\item Focuses on efficient recognition with \textbf{no planner calls}
\item Uses heuristic estimation of states resulting from observation
\item Ranks goals as a weighed sum based on the number of \textbf{landmarks} visited by the observations
\item Key characteristics:
\begin{itemize}
\item Very fast (linear on the number of goals and observations)
\item Less accurate in domains with few landmarks and/or observability
\end{itemize}
\end{itemize}
\end{frame}
\fi
\if\masterclass1
\begin{frame}[c]\frametitle{Domain formalization}
The underlying representation adapts from the Transition Normal Form (TNF) (from Pommerening and Helmert), specifically
\begin{itemize}
\item Domain model originally dealt with operators that modify the truth-value of \emph{facts} or fluents
\item We adopt a domain model $M = \langle \mathcal{V}, \mathcal{O} \rangle$:
\begin{itemize}
\item $\mathcal{V}$ is a set of variables with a, possibly infinite, domain
\item operators in $\mathcal{O}$ change the value of all variables in $\mathcal{V}$ from $s$ into $s'$
\item $cost(o)$ is usually $1$, but when dealing with continuous variables it is the euclidean distance of such values between $s$ and $s'$
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[c]\frametitle{Landmarks in Discrete Domains}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item Facts that must be true in all valid plans
\item Root node is the goal condition
\item Leaves are facts of initial state
\item Connected boxes – facts that must be true together
\end{itemize}
\end{column}
\begin{column}{0.5\textwidth}
\includegraphics[width=\textwidth]{fig/blocksworld-landmarks-example.pdf}
\end{column}
\end{columns}
\end{frame}
\fi
\begin{frame}[c]\frametitle{Landmarks in Continuous Domains}
We need a notion of landmark in continuous domains
\begin{columns}
\begin{column}{0.7\textwidth}
\begin{itemize}
\item Redefine landmarks as areas surrounding goals
\begin{itemize}
\item Goals – Black dots
\item Surrounding Rectangles – continuous landmark areas
\end{itemize}
\item To reach a goal the observed motion must intersect (go through) the corresponding landmark area.
\item In this work, landmark areas roughly correspond to rooms partitioned as rectangular Voronoi diagrams
\begin{itemize}
\item Other notions of numeric landmarks may apply \\(e.g. Scala et al. IJCAI 2017)
\end{itemize}
\end{itemize}
\end{column}
\begin{column}{0.3\textwidth}
\includegraphics[width=\textwidth]{fig/continuous-landmark-example.pdf}
\end{column}
\end{columns}
\end{frame}
\if\masterclass1
\begin{frame}[c]\frametitle{Extracting Landmarks in Continuous Domains}
\todo{Finish this for the masterclass}
\end{frame}
\fi
\begin{frame}[c]\frametitle{Online Recognition with Landmarks}
\begin{columns}
\begin{column}{0.7\textwidth}
\begin{itemize}
\item Generate the ordered set of achieved landmarks
\item Maintain the group of goals eliminated due to landmarks
\item For every observation:
\begin{itemize}
% \item Check if it caused any landmarks to be achieved
\item Check if it ``achieved'' a landmark
% \item Intersect observation point with landmark areas
\item If observations backtrack, re-instate goals
\end{itemize}
\item Rank goals using the landmark completion heuristic $h_{gc}$
\end{itemize}
\end{column}
\begin{column}{0.3\textwidth}
\includegraphics[width=\textwidth]{fig/continuous-landmark-example.pdf}
\end{column}
\end{columns}
\end{frame}
\if\masterclass1
\begin{frame}[c]\frametitle{Online Recognition with Landmarks}
\todo{For masterclass, put algorithm with example}
\end{frame}
\fi
\begin{frame}[c]\frametitle{Goal Mirroring with Landmarks}
Combines landmark reasoning with goal mirroring
\begin{columns}
\begin{column}{0.7\textwidth}
\begin{itemize}
\item Compute landmarks and optimal plans for all goals
\item For every observation:
\begin{itemize}
\item Compute plan prefix, and for every goal
\begin{itemize}
\item Either prune goals that have \textbf{passed} the last landmark; or
\item Compute plan suffix (from last observation) using planner
\item Compute \textbf{cost ratio} between prefix+suffix and optimal plan
\end{itemize}
\end{itemize}
\item Rank unpruned goals based on a \textbf{normalized cost ratio}
\end{itemize}
\end{column}
\begin{column}{0.3\textwidth}
\includegraphics[width=\textwidth]{fig/continuous-landmark-example.pdf}
\end{column}
\end{columns}
\begin{itemize}
\item Ranks $P(g_k \mid O)$ using a normalizing factor $\eta 1/\sum_{g_k \in G} rank(g_k)$
\item Approximates $P(g \mid O) = \eta \sum_{g_k \in G} P(O \mid g_k) P(g_k)$ for all goals, assuming $P(g_k) = 0$ for pruned goals
\end{itemize}
\end{frame}
\if\masterclass1
\begin{frame}[c]\frametitle{Goal Mirroring with Landmarks}
\todo{Algorithm and example for masterclass}
\end{frame}
\fi
\begin{frame}[c]\frametitle{Continuous Evaluation}
\begin{columns}
\begin{column}{0.7\textwidth}
\begin{itemize}
\item Cubicles environment and robot (OMPL)
\item 11 points spread evenly over the environment
%\item Two different paths from start to goal 110*2 problems
\item 220 problems
\end{itemize}
\end{column}
\begin{column}{0.3\textwidth}
\includegraphics[width=\textwidth]{fig/CubiclesEnv_RobotOnlyView.png}
\end{column}
\end{columns}
\end{frame}
% \if\masterclass1
\begin{frame}[c]\frametitle{Discrete Evaluation}
\begin{columns}
\begin{column}{0.7\textwidth}
\begin{itemize}
\item Dataset expanded from Ramirez and Geffner's original work
\item Domains extracted from the IPC competition
\item Hundreds of goal recognition problems
\end{itemize}
\end{column}
\begin{column}{0.3\textwidth}
Domains
\begin{itemize}
\tiny
\item \textsc{Blocks-World}
\item \textsc{Campus}
\item \textsc{Depots}
\item \textsc{Driver-Log}
\item \textsc{Dock-Worker-Robots}
\item \textsc{Easy-IPC-Grid}
\item \textsc{Ferry}
\item \textsc{Intrusion-Detection}
\item \textsc{Kitchen}
\item \textsc{Logistics}
\item \textsc{Miconic}
\item \textsc{Rovers}
\item \textsc{Satellite}
\item \textsc{Sokoban}; and
\item \textsc{Zeno-Travel}
\end{itemize}
\end{column}
\end{columns}
\end{frame}
% \fi
\if\masterclass1
\begin{frame}[c]\frametitle{Performance Results}
\todo{Redo this table for the masterclass}
\newcommand{\timeout}{\fontsize{4}{4}\selectfont \textit{Timeout}}
\tiny
\begin{tabular}{llll|cccccc|cccccc|cccccc|}
\cline{5-22}
& & & & \multicolumn{18}{c|}{\bf Continuous Domains} \\ \cline{5-22}
& & & & \multicolumn{6}{c|}{\sc Goal Mirroring}
& \multicolumn{6}{c|}{\sc Goal Mirroring with Landmarks}
& \multicolumn{6}{c|}{\sc Online Recognition with Landmarks} \\ \hline
\multicolumn{1}{|c|}{\textit{\begin{tabular}[c]{@{}c@{}}Domain\\ (\# problems)\end{tabular}}\hspace{0.2em}}
& \multicolumn{1}{c}{\textit{$|G|$}} & \multicolumn{1}{c}{\textit{$|O|$}} & \multicolumn{1}{c|}{\textit{$|L|$}}
& \textit{Time} & \textit{PC} & \textit{TPR} & \textit{FPR} & \textit{RF} & \textit{CV}
& \textit{Time} & \textit{PC} & \textit{TPR} & \textit{FPR} & \textit{RF} & \textit{CV}
& \textit{Time} & \textit{PC} & \textit{TPR} & \textit{FPR} & \textit{RF} & \textit{CV} \\ \hline
\multicolumn{1}{|c|}{\begin{tabular}[c]{@{}c@{}}Cubicles\\ (220)\end{tabular}\hspace{0.2em}}
& \multicolumn{1}{c}{11.0}
& \multicolumn{1}{c}{26.5}
& \multicolumn{1}{c|}{11.0}
% Mirroring Results
& 104.70 & 265.0 & \textbf{100\%} & 100\% & 20.2\% & 21.8\%
% Mirroring with Landmarks
& 85.90 & 184.8 & 78.2\% & 61.1\% & \textbf{24.3\%} & \textbf{26.2\%}
% Landmarks
& \textbf{0.020} & \textbf{0} & 78.3\% & \textbf{60.9\%} & 21.7\% & 15\% \hspace{0.3em} \\ \hline
\end{tabular}
\vspace{1mm}
\begin{tabular}{llll|cccccc|cccccc|cccccc|}
\cline{5-22}
& & & & \multicolumn{18}{c|}{\bf Discrete Domains} \\ \cline{5-22}
& & & & \multicolumn{6}{c|}{\sc Goal Mirroring}
& \multicolumn{6}{c|}{\sc Goal Mirroring with Landmarks}
& \multicolumn{6}{c|}{\sc Online Recognition with Landmarks} \\ \hline
\multicolumn{1}{|c|}{\textit{\begin{tabular}[c]{@{}c@{}}Domain\\ (\# problems)\end{tabular}}}
& \multicolumn{1}{c}{\textit{$|G|$}} & \multicolumn{1}{c}{\textit{$|O|$}} & \multicolumn{1}{c|}{\textit{$|L|$}}
& \textit{Time} & \textit{PC} & \textit{TPR} & \textit{FPR} & \textit{RF} & \textit{CV}
& \textit{Time} & \textit{PC} & \textit{TPR} & \textit{FPR} & \textit{RF} & \textit{CV}
& \textit{Time} & \textit{PC} & \textit{TPR} & \textit{FPR} & \textit{RF} & \textit{CV} \\ \hline
\multicolumn{1}{|c|}{\begin{tabular}[c]{@{}c@{}}Campus\\ (15)\end{tabular}}
& \multicolumn{1}{c}{2.0}
& \multicolumn{1}{c}{5.4}
& \multicolumn{1}{c|}{8.6}
% Mirroring Results
& 0.441 & 12.8 & 60.0\% & 21.3\% & 57.3\% & 41.3\%
% Mirroring with Landmarks
& 0.212 & 7.7 & \textbf{96.4\%} & \textbf{1.7\%} & \textbf{96.4\%} & \textbf{96.4\%}
% Landmarks
& \textbf{0.065} & \textbf{0} & 92.8\% & 3.5\% & 92.8\% & 92.8\% \\ \hline
\multicolumn{1}{|c|}{\begin{tabular}[c]{@{}c@{}}IPC-Grid\\ (61)\end{tabular}}
& \multicolumn{1}{c}{8.3}
& \multicolumn{1}{c}{21.8}
& \multicolumn{1}{c|}{10.2}
% Mirroring Results
& 10.36 & 209.1 & \textbf{87.2\%} & 19.4\% & 36.6\% & 35.6\%
% Mirroring with Landmarks
& 3.29 & 71.2 & 55.6\% & \textbf{10.5\%} & \textbf{45.8\%} & \textbf{41.5\%}
% Landmarks
& \textbf{0.335} & \textbf{0} & 59.4\% & 21.8\% & 32.6\% & 31.1\% \\ \hline
\multicolumn{1}{|c|}{\begin{tabular}[c]{@{}c@{}}Ferry\\ (28)\end{tabular}}
& \multicolumn{1}{c}{7.5}
& \multicolumn{1}{c}{24.2}
& \multicolumn{1}{c|}{28.5}
% Mirroring Results
& 55.24 & 179.5 & 83.1\% & 10.2\% & 59.2\% & 57.2\%
% Mirroring with Landmarks
& 7.98 & 35.4 & \textbf{83.3\%} & \textbf{3.1\%} & \textbf{82.4\%} & \textbf{82.1\%}
% Landmarks
& \textbf{0.101} & \textbf{0} & 82.4\% & 5.4\% & 72.5\% & 71.9\% \\ \hline
\multicolumn{1}{|c|}{\begin{tabular}[c]{@{}c@{}}Intrusion\\ (45)\end{tabular}}
& \multicolumn{1}{c}{16.6}
& \multicolumn{1}{c}{13.1}
& \multicolumn{1}{c|}{16.0}
% Mirroring Results
& 2.02 & 235.5 & \textbf{100\%} & 7.2\% & 55.3\% & 55.3\%
% Mirroring with Landmarks
& 0.257 & 34.7 & 75.5\% & \textbf{3.6\%} & \textbf{67.1\%} & \textbf{67.1\%}
% Landmarks
& \textbf{0.127} & \textbf{0} & 87.6\% & 3.9\% & 57.1\% & 55.1\% \\ \hline
\multicolumn{1}{|c|}{\begin{tabular}[c]{@{}c@{}}Kitchen\\ (15)\end{tabular}}
& \multicolumn{1}{c}{3.0}
& \multicolumn{1}{c}{7.4}
& \multicolumn{1}{c|}{5.0}
% Mirroring Results
& 0.141 & 25.4 & 70.1\% & 18.4\% & 44.6\% & 36.1\%
% Mirroring with Landmarks
& 0.07 & 20.0 & 77.6\% & \textbf{17.9\%} & \textbf{62.6\%} & \textbf{58.3\%}
% Landmarks
& \textbf{0.04} & \textbf{0} & \textbf{100\%} & 50\% & 23.9\% & 23.9\% \\ \hline
\multicolumn{1}{|c|}{\begin{tabular}[c]{@{}c@{}}Logistics\\ (61)\end{tabular}}
& \multicolumn{1}{c}{10.4}
& \multicolumn{1}{c}{24.4}
& \multicolumn{1}{c|}{16.1}
% Mirroring Results
& 53.82 & 199.3 & \textbf{95.4\%} & 14.7\% & 26.9\% & 25.8\%
% Mirroring with Landmarks
& 14.39 & 49.6 & 61.7\% & \textbf{6.7\%} & \textbf{49.1\%} & \textbf{48.4\%}
% Landmarks