SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Learning Relational Grammars from Sequences of
                     Actions

              Blanca A. Vargas-Govea and Eduardo F. Morales
                      {blanca,emorales}@inaoep.mx

                                   Robotics Lab
                                            ´
                                  INAOE, Mexico


                                   CIARP 09
                               November 18, 2009




                      ´
(Robotics Lab INAOE, Mexico)                       CIARP 09 November 18, 2009   1 / 23
Outline


                                 Outline

Introduction

Grammar learning
   Induction
   Evaluation
   Generalization

Experiments
   Navigation
   Gesture recognition

Conclusions

Future work


                        ´
  (Robotics Lab INAOE, Mexico)             CIARP 09 November 18, 2009   2 / 23
Introduction


                                 Motivation

Robot, go to the living room               Increasing demand of service robots
                                                ◮   a robot has to be programmed
                                                    according to the task to be
                                                    accomplished
                                                ◮   programming abilities to perform
                                                    tasks is difficult and usually,
                                                    users are not programmers or
                                                    robotic experts
                                                ◮   a possibility is that the user
                                                    shows the robot what to do

      A mobile robot that learns to navigate and to identify gestures



                        ´
  (Robotics Lab INAOE, Mexico)                                  CIARP 09 November 18, 2009   3 / 23
Introduction


                                                          Motivation

Sequences are used to describe different problems in many fields
                                                                         ◮   The robot can learn from
      Goal
                           dynamic obstacle                                  sequences of actions generated
                          turn-right
                                                                             by the user
             turn-left



                 orient                go-forward
                                                                         ◮   In this work the idea is to learn
                                               leave-a-
                                                                             grammars from sequences of
                             orient
                                                 trap
                                                                             actions that can be used to
                                                                             execute tasks or as classifiers

       Grammars are used as control programs and as classifiers




                       ´
 (Robotics Lab INAOE, Mexico)                                                          CIARP 09 November 18, 2009   4 / 23
Grammar learning


                                 Grammar learning
                        FOSeq (First Order Sequence learning)

Input: a set of sequences of first order state-action pairs. FOSeq:

 1. Induces a grammar for each sequence, identifying repeated
    elements (n-grams e.g., sub-sequences of n-items, in our case
    n-predicates) .

 2. Evaluates the sequences with each learned grammar.

 3. Selects the best evaluated grammar and a list of candidates to
    improve the evaluation of the best grammar.

 4. Applies a generalization process to the best grammar.
Output: A grammar that can be applied as controller or as classifier.
                        ´
  (Robotics Lab INAOE, Mexico)                         CIARP 09 November 18, 2009   5 / 23
Grammar learning


                                             Input
The user steers the robot to execute the task. Raw data from the
sensors are transformed into predicates




The input is a sequence of first order state-action pairs like the
following:

pred1(State1,action1),pred2(State2,action1),pred1(State3,action2),. . .
                        ´
  (Robotics Lab INAOE, Mexico)                       CIARP 09 November 18, 2009   6 / 23
Grammar learning   Induction


                                      Induction


◮   The algorithm looks for n-grams that appear at least twice in the
    sequence.

◮   The candidate n-grams are incrementally searched by their length.

◮   The n-gram with the highest frequency of each iteration is
    selected, generating a new grammar rule and replacing in the
    sequence, all occurrences of the n-gram with a new non-terminal
    symbol.




                      ´
(Robotics Lab INAOE, Mexico)                                  CIARP 09 November 18, 2009   7 / 23
Grammar learning   Evaluation


                                Induction: example

S→a b c b c b c b a b c b d b e b c                                  S2 → R2 d b e R1
b c (5)                                                              R1 → b c
Add: R1 → b c                                                        R2 → a R1 b
S1 → a R1 R1 R1 b a R1 b d b e R1
Removing repeated items:
S1 → a R1 b a R1 b d b e R1
R1 b (2)
a R1 (2)                                                              R2    d     b    e      R1
a R1 b (2)
Add: R2 → a R1 b                                                 a    R1 b                    b c
S2 → R2 R2 d b e R1
Removing repeated items:                                             b c
S2 → R2 d b e R1

                       ´
 (Robotics Lab INAOE, Mexico)                                    CIARP 09 November 18, 2009    8 / 23
Grammar learning   Evaluation


                                 Induction: predicates



When the items of the sequence are first order predicates, the learned
grammar is a definite clause grammar (DCG). DCGs:

 ◮    are an extension of context free grammars,

 ◮    can have arguments, and

 ◮    are expressed and executed in Prolog.




                        ´
  (Robotics Lab INAOE, Mexico)                                     CIARP 09 November 18, 2009   9 / 23
Grammar learning   Evaluation


                                     Evaluation

◮   Every learned grammar is used to parse all the sequences in the
    set of traces provided by the user.

◮   For each parsed sequence, each grammar is evaluated using the
    following function:
                                                      n
                                                              cj
                                   eval(Gi ) =                                                    (1)
                                                           cj + fj
                                                     j=1

    where Gi is the grammar being evaluated, cj and fj are the number
    of items that the grammar is able or unable to parse respectively.

◮   The best evaluated grammar is selected.


                      ´
(Robotics Lab INAOE, Mexico)                                         CIARP 09 November 18, 2009   10 / 23
Grammar learning   Generalization


                                  Generalization
The key idea is to obtain a new grammar that improves the covering of
the best grammar.


 1. Select the grammar that provides the largest number of different
    instantiations of predicates.

 2. Compute the lgg* between both grammars.

 3. Accept the new grammar rule if it improves the original coverage,
    otherwise discard it.

 4. The process continues until a coverage threshold is reached or
    there is no longer improvement with the generalization process.

*Least general generalization (lgg) [Plotkin,1970]
                        ´
  (Robotics Lab INAOE, Mexico)                                       CIARP 09 November 18, 2009   11 / 23
Grammar learning   Generalization


                                    lgg example


            c1 = pred(State,action1) ←                  c2 = pred(State,action3) ←
                  cond1(State,action1),                       cond1(State,action1),
                  cond2(State,action2).                       cond2(State,action3).


Computing lgg(c1,c2), the clause:
                                pred(State,Action) ←
                                      cond1(State,action1),
                                      cond2(State,Action).


where the constants action2 and action3 of predicate cond2 are
replaced by the variable Action.


                       ´
 (Robotics Lab INAOE, Mexico)                                       CIARP 09 November 18, 2009   12 / 23
Experiments


                                 Experiments

Learning navigation tasks                Classification of dynamic gestures




                                                         Stop




                                                         Left
                        ´
  (Robotics Lab INAOE, Mexico)                        CIARP 09 November 18, 2009   13 / 23
Experiments   Navigation


 Learning navigation tasks: goto (wander + orient)

Input: sequences of basic TRPs: wander and orient.
 orient(State,turn-left),wander(State,turn-left), wander(State,turn-right),
 wander(State,go-forward),orient(State,turn-left),wander(State,go-forward),.. .
 ...
Output:
goto(State,nil) ←
    in-goal(State).
goto(State,Action) ←
    orient(State,none),
    wander(State,Action).
                ´
goto(State,Accion) ←
    wander(State,go-forward),
    orient(State,Action).
goto(State,Action) ←
    wander(State,Action).




                        ´
  (Robotics Lab INAOE, Mexico)                              CIARP 09 November 18, 2009   14 / 23
Experiments   Navigation


             Navigation experiments: simulation



                                                   TRP                  seq     Tasks           Acc
                                                   wander + orient       8        30        86.67 %
                                                   (goto)
                                                   wander + orient +     12       30        93.33 %
                                                   leave-trap
                                                   follow + wander       10       40        90.00 %
                    Goto                           follow + wander +     14       40       100.00 %
                                                   leave-trap
                                                   visiting 5 places*     -       30        96.67 %




         Visiting different places
                      ´
(Robotics Lab INAOE, Mexico)                                       CIARP 09 November 18, 2009   15 / 23
Experiments   Navigation


         Navigation experiments: Markovito (1/2)

A service ActivMedia robot equipped with a sonar ring, a Laser SICK
LMS200 and a vision stereo system.

                         ◮      Navigating to several places in the environment.
                                Each place has a previously defined name (e.g.,
                                kitchen, sofa).

                         ◮      following a human under user commands,

                         ◮      finding one of a set of different objects in a house,
                                and

                         ◮      delivering messages and/or objects between
                                different people.

                       ´
 (Robotics Lab INAOE, Mexico)                                      CIARP 09 November 18, 2009   16 / 23
Experiments   Navigation


        Navigation experiments: Markovito (2/2)



                                                              Tasks     Interv.      Acc
                                                    Goto       120        20       85.00 %
                                                   Follow      20          3       90.00 %
                                                  a person




                      ´
(Robotics Lab INAOE, Mexico)                                 CIARP 09 November 18, 2009   17 / 23
Experiments      Gesture recognition


                         Learning gesture grammars
Goal: learn grammars from sequences of dynamic gestures and use
them to classify new sequences.




                         (a)            (b)           (c)             (d)              (e)




                          (f)           (g)           (h)              (i)             (j)

(a) initial/final position, (b) atenttion, (c) come, (d) left, (e) right, (f) stop, (g) turn-right, (h) turn-left,
(i) waving-hand, (j) point             ´
                                  [Aviles,2006]

                         ´
   (Robotics Lab INAOE, Mexico)                                                   CIARP 09 November 18, 2009   18 / 23
Experiments   Gesture recognition


                                 Representation
Each sequence is a vector with sets of seven attributes describing the
executed gesture. An example of a sequence is:
      (+ + −− T F F),(+ + −+ T F F),(+ + +0 T F F),(+ + ++T F F)...

   Motion features                                Posture features
       ◮   ∆area                                      ◮   form : horizontal(−),
                                                          vertical(+), tilted (0).
       ◮   ∆x
                                                      ◮   above (the head).
       ◮   ∆y
                                                      ◮   right (to the head).
   These features take one of
   three possible values: {+,−,0}                     ◮   torso (hand over the torso).
   indicating increment, decrement
   or no change.

   hmov(State,right), vmov(State,up), size(State,inc), forma(State,vertical),
   right(State,yes), above face(State,no),. . .

                        ´
  (Robotics Lab INAOE, Mexico)                                        CIARP 09 November 18, 2009   19 / 23
Experiments            Gesture recognition



                            Overall accuracy FOSeq/HMMs
                                     2 sequences                            10 sequences
                                  FOSeq     HMMs                          FOSeq     HMMs
                                  95.17 % 94.85 %                         97.34 % 97.56 %

                     Confusion matrix for 10 sequences
                                                                Prediction
                        1           2            3          4             5           6          7          8        9    Total
             1      99.33                                                                                0.67             300
             2                97.24                      2.76                                                             290
             3                            100.00                                                                          290
  Real class




             4                13.10          1.72       85.17                                                             290
             5                                                     100.00                                                 300
             6      1.03                                                         97.59                            1.38    290
             7                                                        2.07                   96.55                1.38    290
             8                                                                                         100.00             290
             9                                                                                                  100.00    290
         Total      301          320          295         255          306         283        280        292      298     2630
1) attention, 2) come, 3) left, 4) point, 5) right, 6) stop, 7) turn-left, 8) turn-right, 9) waving.


                            Best classified gestures: left, right, turn-right and waving.
                       Worst classified gesture: point, (13 % were classified as come).

                              ´
        (Robotics Lab INAOE, Mexico)                                                                CIARP 09 November 18, 2009    20 / 23
Experiments   Gesture recognition


                    Example of gesture grammars
                     Come                                                 Point
    S → ...R8,size(dec),R6,R1,R12,R7
                                                   S → ... R3,size(dec),form(horizontal),
    R1 → above head(State,no),
                                                   right(si),above head(no),over torso(no)
          over torso(State,yes)
                                                   R1 → above head(State,no),
    R8 → hmov(State,right),
                                                          over torso(State,yes)
          vmov(State,down)
                                                   R3 → hmov(State,right),
    ...
                                                          vmov(State,down)




Relational grammars help to find similarities between different gestures

                       ´
 (Robotics Lab INAOE, Mexico)                                        CIARP 09 November 18, 2009   21 / 23
Conclusions


                               Conclusions


◮   We have introduced an algorithm called FOSeq, that takes
    sequences of states and actions and induces a grammar able to
    parse and reproduce the sequences.

◮   FOSeq learns a grammar for each sequence, followed by a
    generalization process between the best evaluated grammar and
    other grammars to produce a generalized grammar covering most
    of the sequences.

◮   FOSeq has been applied to learn navigation tasks and to learn
    grammars from gesture sequences with very competitive results.




                      ´
(Robotics Lab INAOE, Mexico)                  CIARP 09 November 18, 2009   22 / 23
Future work


                                    Future work


◮   Learn more TRPs to solve other robotic tasks,

◮   extend the experiments with gestures to obtain a general grammar
    for a gesture performed by more than one person,

◮   reproduce gestures with a manipulator.



                               Thank you for your attention




                      ´
(Robotics Lab INAOE, Mexico)                             CIARP 09 November 18, 2009   23 / 23

Contenu connexe

En vedette

Resumen Unit 2 Patricia (2)
Resumen Unit 2 Patricia (2)Resumen Unit 2 Patricia (2)
Resumen Unit 2 Patricia (2)mjgvalcarce
 
Tema # 2 the copenhagen school
Tema # 2 the copenhagen schoolTema # 2 the copenhagen school
Tema # 2 the copenhagen schoolJohana Hernández
 
The Chomskyan Revolution - Prof. Fredreck J. Newmeyer
The Chomskyan Revolution - Prof. Fredreck J. NewmeyerThe Chomskyan Revolution - Prof. Fredreck J. Newmeyer
The Chomskyan Revolution - Prof. Fredreck J. NewmeyerPhoenix Tree Publishing Inc
 
Introduction to linguistics lec 1
Introduction to linguistics lec 1Introduction to linguistics lec 1
Introduction to linguistics lec 1Hina Honey
 

En vedette (6)

Resumen Unit 2 Patricia (2)
Resumen Unit 2 Patricia (2)Resumen Unit 2 Patricia (2)
Resumen Unit 2 Patricia (2)
 
Tema # 2 the copenhagen school
Tema # 2 the copenhagen schoolTema # 2 the copenhagen school
Tema # 2 the copenhagen school
 
Tl2 school ofprague
Tl2 school ofpragueTl2 school ofprague
Tl2 school ofprague
 
The Chomskyan Revolution - Prof. Fredreck J. Newmeyer
The Chomskyan Revolution - Prof. Fredreck J. NewmeyerThe Chomskyan Revolution - Prof. Fredreck J. Newmeyer
The Chomskyan Revolution - Prof. Fredreck J. Newmeyer
 
Hielmslev
HielmslevHielmslev
Hielmslev
 
Introduction to linguistics lec 1
Introduction to linguistics lec 1Introduction to linguistics lec 1
Introduction to linguistics lec 1
 

Similaire à Learning Relational Grammars from Sequences of Actions

LISP: How I Learned To Stop Worrying And Love Parantheses
LISP: How I Learned To Stop Worrying And Love ParanthesesLISP: How I Learned To Stop Worrying And Love Parantheses
LISP: How I Learned To Stop Worrying And Love ParanthesesDominic Graefen
 
"APE: Learning User's Habits to Automate Repetitive Tasks"
"APE: Learning User's Habits to Automate Repetitive Tasks""APE: Learning User's Habits to Automate Repetitive Tasks"
"APE: Learning User's Habits to Automate Repetitive Tasks"butest
 
Deep learning from a novice perspective
Deep learning from a novice perspectiveDeep learning from a novice perspective
Deep learning from a novice perspectiveAnirban Santara
 
The Rise of Dynamic Languages
The Rise of Dynamic LanguagesThe Rise of Dynamic Languages
The Rise of Dynamic Languagesgreenwop
 
[IROS2017] Online Spatial Concept and Lexical Acquisition with Simultaneous L...
[IROS2017] Online Spatial Concept and Lexical Acquisition with Simultaneous L...[IROS2017] Online Spatial Concept and Lexical Acquisition with Simultaneous L...
[IROS2017] Online Spatial Concept and Lexical Acquisition with Simultaneous L...Akira Taniguchi
 
A tutorial on deep learning at icml 2013
A tutorial on deep learning at icml 2013A tutorial on deep learning at icml 2013
A tutorial on deep learning at icml 2013Philip Zheng
 
Tool Use Learning for a Real Robot
Tool Use Learning for a Real RobotTool Use Learning for a Real Robot
Tool Use Learning for a Real RobotIJECEIAES
 
Induced Intentional Software Views
Induced Intentional Software ViewsInduced Intentional Software Views
Induced Intentional Software ViewsESUG
 
Parameterizing and Assembling IR-based Solutions for SE Tasks using Genetic A...
Parameterizing and Assembling IR-based Solutions for SE Tasks using Genetic A...Parameterizing and Assembling IR-based Solutions for SE Tasks using Genetic A...
Parameterizing and Assembling IR-based Solutions for SE Tasks using Genetic A...Annibale Panichella
 
victores2013towards-presentation
victores2013towards-presentationvictores2013towards-presentation
victores2013towards-presentationJuan G. Victores
 
An Introduction to C# and .NET Framework (Basic)
An Introduction to C# and .NET Framework (Basic)An Introduction to C# and .NET Framework (Basic)
An Introduction to C# and .NET Framework (Basic)Khubaib Ahmad Kunjahi
 

Similaire à Learning Relational Grammars from Sequences of Actions (20)

ASE02.ppt
ASE02.pptASE02.ppt
ASE02.ppt
 
LISP: How I Learned To Stop Worrying And Love Parantheses
LISP: How I Learned To Stop Worrying And Love ParanthesesLISP: How I Learned To Stop Worrying And Love Parantheses
LISP: How I Learned To Stop Worrying And Love Parantheses
 
Ase02.ppt
Ase02.pptAse02.ppt
Ase02.ppt
 
"APE: Learning User's Habits to Automate Repetitive Tasks"
"APE: Learning User's Habits to Automate Repetitive Tasks""APE: Learning User's Habits to Automate Repetitive Tasks"
"APE: Learning User's Habits to Automate Repetitive Tasks"
 
Deep learning from a novice perspective
Deep learning from a novice perspectiveDeep learning from a novice perspective
Deep learning from a novice perspective
 
W.doc
W.docW.doc
W.doc
 
oop Lecture19
oop Lecture19oop Lecture19
oop Lecture19
 
The Rise of Dynamic Languages
The Rise of Dynamic LanguagesThe Rise of Dynamic Languages
The Rise of Dynamic Languages
 
[IROS2017] Online Spatial Concept and Lexical Acquisition with Simultaneous L...
[IROS2017] Online Spatial Concept and Lexical Acquisition with Simultaneous L...[IROS2017] Online Spatial Concept and Lexical Acquisition with Simultaneous L...
[IROS2017] Online Spatial Concept and Lexical Acquisition with Simultaneous L...
 
A tutorial on deep learning at icml 2013
A tutorial on deep learning at icml 2013A tutorial on deep learning at icml 2013
A tutorial on deep learning at icml 2013
 
Tool Use Learning for a Real Robot
Tool Use Learning for a Real RobotTool Use Learning for a Real Robot
Tool Use Learning for a Real Robot
 
Induced Intentional Software Views
Induced Intentional Software ViewsInduced Intentional Software Views
Induced Intentional Software Views
 
RIPS RoboCup@home 2013, The Netherlands
RIPS RoboCup@home 2013, The NetherlandsRIPS RoboCup@home 2013, The Netherlands
RIPS RoboCup@home 2013, The Netherlands
 
Robotics my seminar
Robotics my seminarRobotics my seminar
Robotics my seminar
 
Parameterizing and Assembling IR-based Solutions for SE Tasks using Genetic A...
Parameterizing and Assembling IR-based Solutions for SE Tasks using Genetic A...Parameterizing and Assembling IR-based Solutions for SE Tasks using Genetic A...
Parameterizing and Assembling IR-based Solutions for SE Tasks using Genetic A...
 
victores2013towards-presentation
victores2013towards-presentationvictores2013towards-presentation
victores2013towards-presentation
 
Javascript
JavascriptJavascript
Javascript
 
Java For Automation
Java   For AutomationJava   For Automation
Java For Automation
 
An Introduction to C# and .NET Framework (Basic)
An Introduction to C# and .NET Framework (Basic)An Introduction to C# and .NET Framework (Basic)
An Introduction to C# and .NET Framework (Basic)
 
Basics of Java
Basics of JavaBasics of Java
Basics of Java
 

Plus de Blanca Alicia Vargas Govea

Una Breve Historia de la Ingeniería de Software
Una Breve Historia de la Ingeniería de SoftwareUna Breve Historia de la Ingeniería de Software
Una Breve Historia de la Ingeniería de SoftwareBlanca Alicia Vargas Govea
 
Aprendizaje de Programas Teleo-Reactivos para Robótica Móvil
Aprendizaje de Programas Teleo-Reactivos para Robótica MóvilAprendizaje de Programas Teleo-Reactivos para Robótica Móvil
Aprendizaje de Programas Teleo-Reactivos para Robótica MóvilBlanca Alicia Vargas Govea
 
Aprendizaje de reglas para un sistema de recomendación contextual
Aprendizaje de reglas para un sistema de recomendación  contextualAprendizaje de reglas para un sistema de recomendación  contextual
Aprendizaje de reglas para un sistema de recomendación contextualBlanca Alicia Vargas Govea
 
Aprendizaje de reglas para sistemas de recomendación
Aprendizaje de reglas para sistemas de recomendaciónAprendizaje de reglas para sistemas de recomendación
Aprendizaje de reglas para sistemas de recomendaciónBlanca Alicia Vargas Govea
 
Effects of relevant contextual features in the performance of a restaurant re...
Effects of relevant contextual features in the performance of a restaurant re...Effects of relevant contextual features in the performance of a restaurant re...
Effects of relevant contextual features in the performance of a restaurant re...Blanca Alicia Vargas Govea
 
Effects of relevant contextual features in the performance of a restaurant re...
Effects of relevant contextual features in the performance of a restaurant re...Effects of relevant contextual features in the performance of a restaurant re...
Effects of relevant contextual features in the performance of a restaurant re...Blanca Alicia Vargas Govea
 
Sistemas de recomendación: tipos y evaluación
Sistemas de recomendación: tipos y evaluaciónSistemas de recomendación: tipos y evaluación
Sistemas de recomendación: tipos y evaluaciónBlanca Alicia Vargas Govea
 

Plus de Blanca Alicia Vargas Govea (12)

Introducción a R - con minería de datos
Introducción a R - con minería de datosIntroducción a R - con minería de datos
Introducción a R - con minería de datos
 
Una Breve Historia de la Ingeniería de Software
Una Breve Historia de la Ingeniería de SoftwareUna Breve Historia de la Ingeniería de Software
Una Breve Historia de la Ingeniería de Software
 
In10years
In10yearsIn10years
In10years
 
Aprendizaje de Programas Teleo-Reactivos para Robótica Móvil
Aprendizaje de Programas Teleo-Reactivos para Robótica MóvilAprendizaje de Programas Teleo-Reactivos para Robótica Móvil
Aprendizaje de Programas Teleo-Reactivos para Robótica Móvil
 
Taller weka
Taller wekaTaller weka
Taller weka
 
Aprendizaje de reglas para un sistema de recomendación contextual
Aprendizaje de reglas para un sistema de recomendación  contextualAprendizaje de reglas para un sistema de recomendación  contextual
Aprendizaje de reglas para un sistema de recomendación contextual
 
Aprendizaje de reglas para sistemas de recomendación
Aprendizaje de reglas para sistemas de recomendaciónAprendizaje de reglas para sistemas de recomendación
Aprendizaje de reglas para sistemas de recomendación
 
Effects of relevant contextual features in the performance of a restaurant re...
Effects of relevant contextual features in the performance of a restaurant re...Effects of relevant contextual features in the performance of a restaurant re...
Effects of relevant contextual features in the performance of a restaurant re...
 
Evaluando sistemas de recomendación
Evaluando sistemas de recomendaciónEvaluando sistemas de recomendación
Evaluando sistemas de recomendación
 
R: Taller de Introducción
R: Taller de IntroducciónR: Taller de Introducción
R: Taller de Introducción
 
Effects of relevant contextual features in the performance of a restaurant re...
Effects of relevant contextual features in the performance of a restaurant re...Effects of relevant contextual features in the performance of a restaurant re...
Effects of relevant contextual features in the performance of a restaurant re...
 
Sistemas de recomendación: tipos y evaluación
Sistemas de recomendación: tipos y evaluaciónSistemas de recomendación: tipos y evaluación
Sistemas de recomendación: tipos y evaluación
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Dernier (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Learning Relational Grammars from Sequences of Actions

  • 1. Learning Relational Grammars from Sequences of Actions Blanca A. Vargas-Govea and Eduardo F. Morales {blanca,emorales}@inaoep.mx Robotics Lab ´ INAOE, Mexico CIARP 09 November 18, 2009 ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 1 / 23
  • 2. Outline Outline Introduction Grammar learning Induction Evaluation Generalization Experiments Navigation Gesture recognition Conclusions Future work ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 2 / 23
  • 3. Introduction Motivation Robot, go to the living room Increasing demand of service robots ◮ a robot has to be programmed according to the task to be accomplished ◮ programming abilities to perform tasks is difficult and usually, users are not programmers or robotic experts ◮ a possibility is that the user shows the robot what to do A mobile robot that learns to navigate and to identify gestures ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 3 / 23
  • 4. Introduction Motivation Sequences are used to describe different problems in many fields ◮ The robot can learn from Goal dynamic obstacle sequences of actions generated turn-right by the user turn-left orient go-forward ◮ In this work the idea is to learn leave-a- grammars from sequences of orient trap actions that can be used to execute tasks or as classifiers Grammars are used as control programs and as classifiers ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 4 / 23
  • 5. Grammar learning Grammar learning FOSeq (First Order Sequence learning) Input: a set of sequences of first order state-action pairs. FOSeq: 1. Induces a grammar for each sequence, identifying repeated elements (n-grams e.g., sub-sequences of n-items, in our case n-predicates) . 2. Evaluates the sequences with each learned grammar. 3. Selects the best evaluated grammar and a list of candidates to improve the evaluation of the best grammar. 4. Applies a generalization process to the best grammar. Output: A grammar that can be applied as controller or as classifier. ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 5 / 23
  • 6. Grammar learning Input The user steers the robot to execute the task. Raw data from the sensors are transformed into predicates The input is a sequence of first order state-action pairs like the following: pred1(State1,action1),pred2(State2,action1),pred1(State3,action2),. . . ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 6 / 23
  • 7. Grammar learning Induction Induction ◮ The algorithm looks for n-grams that appear at least twice in the sequence. ◮ The candidate n-grams are incrementally searched by their length. ◮ The n-gram with the highest frequency of each iteration is selected, generating a new grammar rule and replacing in the sequence, all occurrences of the n-gram with a new non-terminal symbol. ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 7 / 23
  • 8. Grammar learning Evaluation Induction: example S→a b c b c b c b a b c b d b e b c S2 → R2 d b e R1 b c (5) R1 → b c Add: R1 → b c R2 → a R1 b S1 → a R1 R1 R1 b a R1 b d b e R1 Removing repeated items: S1 → a R1 b a R1 b d b e R1 R1 b (2) a R1 (2) R2 d b e R1 a R1 b (2) Add: R2 → a R1 b a R1 b b c S2 → R2 R2 d b e R1 Removing repeated items: b c S2 → R2 d b e R1 ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 8 / 23
  • 9. Grammar learning Evaluation Induction: predicates When the items of the sequence are first order predicates, the learned grammar is a definite clause grammar (DCG). DCGs: ◮ are an extension of context free grammars, ◮ can have arguments, and ◮ are expressed and executed in Prolog. ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 9 / 23
  • 10. Grammar learning Evaluation Evaluation ◮ Every learned grammar is used to parse all the sequences in the set of traces provided by the user. ◮ For each parsed sequence, each grammar is evaluated using the following function: n cj eval(Gi ) = (1) cj + fj j=1 where Gi is the grammar being evaluated, cj and fj are the number of items that the grammar is able or unable to parse respectively. ◮ The best evaluated grammar is selected. ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 10 / 23
  • 11. Grammar learning Generalization Generalization The key idea is to obtain a new grammar that improves the covering of the best grammar. 1. Select the grammar that provides the largest number of different instantiations of predicates. 2. Compute the lgg* between both grammars. 3. Accept the new grammar rule if it improves the original coverage, otherwise discard it. 4. The process continues until a coverage threshold is reached or there is no longer improvement with the generalization process. *Least general generalization (lgg) [Plotkin,1970] ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 11 / 23
  • 12. Grammar learning Generalization lgg example c1 = pred(State,action1) ← c2 = pred(State,action3) ← cond1(State,action1), cond1(State,action1), cond2(State,action2). cond2(State,action3). Computing lgg(c1,c2), the clause: pred(State,Action) ← cond1(State,action1), cond2(State,Action). where the constants action2 and action3 of predicate cond2 are replaced by the variable Action. ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 12 / 23
  • 13. Experiments Experiments Learning navigation tasks Classification of dynamic gestures Stop Left ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 13 / 23
  • 14. Experiments Navigation Learning navigation tasks: goto (wander + orient) Input: sequences of basic TRPs: wander and orient. orient(State,turn-left),wander(State,turn-left), wander(State,turn-right), wander(State,go-forward),orient(State,turn-left),wander(State,go-forward),.. . ... Output: goto(State,nil) ← in-goal(State). goto(State,Action) ← orient(State,none), wander(State,Action). ´ goto(State,Accion) ← wander(State,go-forward), orient(State,Action). goto(State,Action) ← wander(State,Action). ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 14 / 23
  • 15. Experiments Navigation Navigation experiments: simulation TRP seq Tasks Acc wander + orient 8 30 86.67 % (goto) wander + orient + 12 30 93.33 % leave-trap follow + wander 10 40 90.00 % Goto follow + wander + 14 40 100.00 % leave-trap visiting 5 places* - 30 96.67 % Visiting different places ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 15 / 23
  • 16. Experiments Navigation Navigation experiments: Markovito (1/2) A service ActivMedia robot equipped with a sonar ring, a Laser SICK LMS200 and a vision stereo system. ◮ Navigating to several places in the environment. Each place has a previously defined name (e.g., kitchen, sofa). ◮ following a human under user commands, ◮ finding one of a set of different objects in a house, and ◮ delivering messages and/or objects between different people. ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 16 / 23
  • 17. Experiments Navigation Navigation experiments: Markovito (2/2) Tasks Interv. Acc Goto 120 20 85.00 % Follow 20 3 90.00 % a person ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 17 / 23
  • 18. Experiments Gesture recognition Learning gesture grammars Goal: learn grammars from sequences of dynamic gestures and use them to classify new sequences. (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) (a) initial/final position, (b) atenttion, (c) come, (d) left, (e) right, (f) stop, (g) turn-right, (h) turn-left, (i) waving-hand, (j) point ´ [Aviles,2006] ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 18 / 23
  • 19. Experiments Gesture recognition Representation Each sequence is a vector with sets of seven attributes describing the executed gesture. An example of a sequence is: (+ + −− T F F),(+ + −+ T F F),(+ + +0 T F F),(+ + ++T F F)... Motion features Posture features ◮ ∆area ◮ form : horizontal(−), vertical(+), tilted (0). ◮ ∆x ◮ above (the head). ◮ ∆y ◮ right (to the head). These features take one of three possible values: {+,−,0} ◮ torso (hand over the torso). indicating increment, decrement or no change. hmov(State,right), vmov(State,up), size(State,inc), forma(State,vertical), right(State,yes), above face(State,no),. . . ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 19 / 23
  • 20. Experiments Gesture recognition Overall accuracy FOSeq/HMMs 2 sequences 10 sequences FOSeq HMMs FOSeq HMMs 95.17 % 94.85 % 97.34 % 97.56 % Confusion matrix for 10 sequences Prediction 1 2 3 4 5 6 7 8 9 Total 1 99.33 0.67 300 2 97.24 2.76 290 3 100.00 290 Real class 4 13.10 1.72 85.17 290 5 100.00 300 6 1.03 97.59 1.38 290 7 2.07 96.55 1.38 290 8 100.00 290 9 100.00 290 Total 301 320 295 255 306 283 280 292 298 2630 1) attention, 2) come, 3) left, 4) point, 5) right, 6) stop, 7) turn-left, 8) turn-right, 9) waving. Best classified gestures: left, right, turn-right and waving. Worst classified gesture: point, (13 % were classified as come). ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 20 / 23
  • 21. Experiments Gesture recognition Example of gesture grammars Come Point S → ...R8,size(dec),R6,R1,R12,R7 S → ... R3,size(dec),form(horizontal), R1 → above head(State,no), right(si),above head(no),over torso(no) over torso(State,yes) R1 → above head(State,no), R8 → hmov(State,right), over torso(State,yes) vmov(State,down) R3 → hmov(State,right), ... vmov(State,down) Relational grammars help to find similarities between different gestures ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 21 / 23
  • 22. Conclusions Conclusions ◮ We have introduced an algorithm called FOSeq, that takes sequences of states and actions and induces a grammar able to parse and reproduce the sequences. ◮ FOSeq learns a grammar for each sequence, followed by a generalization process between the best evaluated grammar and other grammars to produce a generalized grammar covering most of the sequences. ◮ FOSeq has been applied to learn navigation tasks and to learn grammars from gesture sequences with very competitive results. ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 22 / 23
  • 23. Future work Future work ◮ Learn more TRPs to solve other robotic tasks, ◮ extend the experiments with gestures to obtain a general grammar for a gesture performed by more than one person, ◮ reproduce gestures with a manipulator. Thank you for your attention ´ (Robotics Lab INAOE, Mexico) CIARP 09 November 18, 2009 23 / 23