DAFne (Disseny d'Agents Físics)
 
Josep Lluís de la Rosa

y componentes del Rogi Team y del equipo de supervisión
Universidad de Girona & LEA-SICA 
peplluis@eia.udg.es

ANEXO 1

Inteligencia Artificial Distribuida (DAI)

La DAI tiene diferentes campos que son:

  • Solución distribuida de problemas.
  • Agentes y técnicas de agentes: La distribución se hace porque se quiere modularizar los agentes y éstos son intrínsecamente distribuidos.
  • Multiagente: Se encarga de estudiar sociedades de agentes.
  • Ejemplo: Las hormigas son un claro ejemplo para representarlas como agentes simples, a las que se le atribuyen movimientos simples como comer, moverse, evitar obstáculos, etc. Cuando se deja evolucionar a los agentes puede estudiarse su comportamiento en sociedad.   Definición de Agente

    El campo de los agentes es relativamente nuevo y no existe una definición concreta de los mismos.

    Hay dos clases de agentes:

  • Reactivos: son agentes simples que sólo reaccionan ante una situación. "No piensan".
  • Deliberativos: hacen deliberaciones, reflexiones sobre sí mismos.

  • Lo que se puede dar es una lista de características que los mismos deben cumplir:

  • Propiedades en nociones débiles de agentes:
    Ejemplo:

    Conocimiento: Hace sol -> K p = conoces p
    Creencia: Mañana hará sol -> B p = crees p

    B p ^ p -> K p Si se cree p y hace p entonces se conoce p

    Se habla de conocimiento, no de variables.
     
  • Pro actitudes: (guía de acciones de agentes)
  • Símbolo: ( a b c d )
    ( (f a b c ) ) donde f es una función
    ( + 3 4 ) Esta función retorna 7 ( * 2 ( + 3 4 ) ) Esto realiza la suma de 3 y cuatro y después la multiplica por 2.
    defun suma_dos(x)
    ( + x 2 ) Esta función retorna la suma
     
  • PROLOG: Programación Lógica
  • Es un lenguaje de reglas variables de 1er orden (basado en lógica de 1er orden) más algunos constructores para salvar problemas.


    Agentes
     

  • Teorías: fundamentos teóricos, especificaciones. Teorías lógicas.
  • Arquitecturas: implementación.
  • Lenguajes: programación

  • Sistemas intencionales
     

  • Sistemas complejos: anímicos, explicaciones intencionales, abstracción versus interpretaciones mecánicas.
  • Actitudes informativas: conocimientos y creencias.
  • Pro actitudes: deseo, intención, obligación, compromiso, elección, ....

  • Soluciones
     

  • Sintáctica:
  • Lenguaje modal.
  • Meta-lenguaje.Semántica:
  • Mundos posibles.
  • Ejemplo: : El agente a cree en el tiempo 3, que el agente b cree en el tiempo 10 que al agente a le gusta el agente b en el tiempo 7. Ejemplo: :El robot sabe en el tiempo 5 que puede abrir la puerta en el tiempo 8.


    La versión inmediata de CAN es ABLE y la diferencia reside en que ABLE es al mismo tiempo, por ejemplo:

    : El robot sabe en el tiempo 5 que

    puede abrir la puerta en el tiempo 5 ( en el mismo tiempo).


    Propiedades
     

  • Consistencia Interna: las creencias y obligaciones son internamente consistentes. No hay contradicciones entre ellas.
  • Buena Voluntad: los agentes se comprometen a hacer sólo lo que se creen capaces de.
  • Introspección.
  • Persistencia del estado mental.

  • INTERPRETE GENERAL DE AGENTES

    Un agente estaría compuesto por:

  • Un lazo básico:
     
    ANEXO 2

    Ejemplo de tres agentes transportando mesas

    Implementación en AGENT0 sobre PROLOG.

    Conditions

  • there_is_table ()
  • I_have_a_mate ()
  • I_have_a_mate ()
  • I_am_at_the_store()
  • Actions
  • fetch_table
  • transport_table
  • deliver_table

  • agent name a1

    initial beliefs
    beliefs that there_is_table at 0
    beliefs that not I_have_table(a1) at 0
    beliefs that not I_have_a_mate(a1) at 0

    capabilities
    can dofetch_tableif beliefs that not I_have_table(a1) at T
    can dotransport_table if beliefs that I_have_a_mate(a1) at T
    can dodeliver_table if beliefs that I_am_at_the_store(a1) at T

    commitment rule 1
    message conditions
    informed by A that not I_have_a_mate(A) at T
    mental conditions
    beliefs that not I_have_a_mate(a1) at T and
    differents(A,a1)

    actions
    in time T
    inform A that I_have_a_mate(A) at T and
    inform a1 that I_have_a_mate(a1) at T

    commitment rule 2
    message conditions
    true
    mental conditions
    beliefs that there_is_table at T and
    beliefs that not I_have_table(a1) at T

    actions
    in time T
    dofetch_tableand
    inform everybody that I_have_table(a1) at T

    commitment rule 3
    message conditions
    true
    mental conditions
    beliefs that I_have_table(a1) at T and
    beliefs that not I_have_a_mate(a1) at T
    actions
    in time T
    inform others that not I_have_a_mate(a1) at T

    commitment rule 4
    message conditions
    true
    mental conditions
    beliefs that I_have_a_mate(a1) at T
    actions
    in time T dotransport_table and
    inform a1 that not I_have_a_mate(a1) at T and
    inform a1 that not I_have_table(a1) at T
    end a1

    agent name a2

    initial beliefs
    beliefs that there_is_table at 0
    beliefs that not I_have_table(a2) at 0
    beliefs that not I_have_a_mate(a2) at 0
    capabilities
    can dofetch_tableif beliefs that not I_have_table(a2) at T
    can dotransport_table if beliefs that I_have_a_mate(a2) at T
    can dodeliver_table if beliefs that I_am_at_the_store(a2) at T

    commitment rule 1
    message conditions
    informed by A that not I_have_a_mate(A) at T
    mental conditions
    beliefs that not I_have_a_mate(a2) at T and
    differents(A,a2)
    actions
    in time T
    inform A that I_have_a_mate(A) at T and
    inform a2 that I_have_a_mate(a2) at T

    commitment rule 2
    message conditions
    true
    mental conditions
    beliefs that there_is_table at T and
    beliefs that not I_have_table(a2) at T
    actions
    in time T
    dofetch_tableand
    inform everybody that I_have_table(a2) at T

    commitment rule 3
    message conditions
    true
    mental conditions
    beliefs that I_have_table(a2) at T and
    beliefs that not I_have_a_mate(a2) at T
    actions
    in time T
    inform others that not I_have_a_mate(a2) at T

    commitment rule 4
    message conditions
    true
    mental conditions
    beliefs that I_have_a_mate(a2) at T
    actions
    in time T dotransport_table and
    inform a2 that not I_have_a_mate(a2) at T and
    inform a2 that not I_have_table(a2) at T
    end a2

    agent name a3

    initial beliefs
    beliefs that there_is_table at 0
    beliefs that not I_have_table(a3) at 0
    beliefs that not I_have_a_mate(a3) at 0
    capabilities
    can dofetch_tableif beliefs that not I_have_table(a3) at T
    can dotransport_table if beliefs that I_have_a_mate(a3) at T
    can dodeliver_table if beliefs that I_am_at_the_store(a3) at T

    commitment rule 1
    message conditions
    informed by A that not I_have_a_mate(A) at T
    mental conditions
    beliefs that not I_have_a_mate(a3) at T and
    differents(A,a3)
    actions
    in time T
    inform A that I_have_a_mate(A) at T and
    inform a3 that I_have_a_mate(a3) at T

    commitment rule 2

    message conditions
    true
    mental conditions
    beliefs that there_is_table at T and
    beliefs that not I_have_table(a3) at T
    actions
    in time T
    dofetch_tableand
    inform everybody that I_have_table(a3) at T
    commitment rule 3
    message conditions
    true
    mental conditions
    beliefs that I_have_table(a3) at T and
    beliefs that not I_have_a_mate(a3) at T
    actions
    in time T
    inform others that not I_have_a_mate(a3) at T
    commitment rule 4
    message conditions
    true
    mental conditions
    beliefs that I_have_a_mate(a3) at T
    actions
    in time T dotransport_table and
    inform a3 that not I_have_a_mate(a3) at T and
    inform a3 that not I_have_table(a3) at T
    end a3
    Execution trace

    | ?- reset_time.

    yes
    | ?- cycle.
    Asserting cmt(a1,a1,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a1))))
    Retracting cmt(a1,a1,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a1))))
    Asserting m(a1,a1,inform(fact(0,I_have_table(a1))))
    Asserting m(a2,a1,inform(fact(0,I_have_table(a1))))
    Asserting m(a3,a1,inform(fact(0,I_have_table(a1))))
    Asserting b(a2,fact(0,I_have_table(a1)))
    Asserting cmt(a2,a2,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a2))))
    Retracting m(a2,a1,inform(fact(0,I_have_table(a1))))
    Retracting cmt(a2,a2,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a2))))
    Asserting m(a1,a2,inform(fact(0,I_have_table(a2))))
    Asserting m(a2,a2,inform(fact(0,I_have_table(a2))))
    Asserting m(a3,a2,inform(fact(0,I_have_table(a2))))
    Asserting b(a3,fact(0,I_have_table(a1)))
    Asserting b(a3,fact(0,I_have_table(a2)))
    Asserting cmt(a3,a3,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a3))))
    Retracting m(a3,a1,inform(fact(0,I_have_table(a1))))
    Retracting m(a3,a2,inform(fact(0,I_have_table(a2))))
    Retracting cmt(a3,a3,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a3))))
    Asserting m(a1,a3,inform(fact(0,I_have_table(a3))))
    Asserting m(a2,a3,inform(fact(0,I_have_table(a3))))
    Asserting m(a3,a3,inform(fact(0,I_have_table(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,not I_have_table(a1)))
    Asserting b(a1,fact(0,I_have_table(a1)))
    Asserting b(a1,fact(0,I_have_table(a2)))
    Asserting b(a1,fact(0,I_have_table(a3)))
    Asserting cmt(a1,a1,0,inform(others,fact(0,not I_have_a_mate(a1))))
    Retractingm(a1,a1,inform(fact(0,I_have_table(a1))))
    Retracting m(a1,a2,inform(fact(0,I_have_table(a2))))
    Retracting m(a1,a3,inform(fact(0,I_have_table(a3))))
    Retracting cmt(a1,a1,0,inform(others,fact(0,not I_have_a_mate(a1))))
    Asserting m(a2,a1,inform(fact(0,not I_have_a_mate(a1))))
    Asserting m(a3,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting b(a2,fact(0,not I_have_table(a2)))
    Asserting b(a2,fact(0,I_have_table(a2)))
    Asserting b(a2,fact(0,I_have_table(a3)))
    Asserting b(a2,fact(0,not I_have_a_mate(a1)))
    Asserting cmt(a2,a2,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a2,fact(0,I_have_a_mate(a2))))
    Asserting cmt(a2,a2,0,inform(others,fact(0,not I_have_a_mate(a2))))
    Retracting m(a2,a2,inform(fact(0,I_have_table(a2))))
    Retracting m(a2,a3,inform(fact(0,I_have_table(a3))))
    Retracting m(a2,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting cmt(a2,a2,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a2,fact(0,I_have_a_mate(a2))))
    Asserting m(a1,a2,inform(fact(0,I_have_a_mate(a1))))
    Asserting m(a2,a2,inform(fact(0,I_have_a_mate(a2))))
    Retracting cmt(a2,a2,0,inform(others,fact(0,not I_have_a_mate(a2))))
    Asserting m(a1,a2,inform(fact(0,not I_have_a_mate(a2))))
    Asserting m(a3,a2,inform(fact(0,not I_have_a_mate(a2))))
    Retracting b(a3,fact(0,not I_have_table(a3)))
    Asserting b(a3,fact(0,I_have_table(a3)))
    Asserting b(a3,fact(0,not I_have_a_mate(a1)))
    Asserting b(a3,fact(0,not I_have_a_mate(a2)))
    Asserting cmt(a3,a3,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting cmt(a3,a3,0,inform(a2,fact(0,I_have_a_mate(a2))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting cmt(a3,a3,0,inform(others,fact(0,not I_have_a_mate(a3))))
    Retracting m(a3,a3,inform(fact(0,I_have_table(a3))))
    Retracting m(a3,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting m(a3,a2,inform(fact(0,not I_have_a_mate(a2))))
    Retracting cmt(a3,a3,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting m(a1,a3,inform(fact(0,I_have_a_mate(a1))))
    Asserting m(a3,a3,inform(fact(0,I_have_a_mate(a3))))
    Retracting cmt(a3,a3,0,inform(a2,fact(0,I_have_a_mate(a2))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting m(a2,a3,inform(fact(0,I_have_a_mate(a2))))
    Asserting m(a3,a3,inform(fact(0,I_have_a_mate(a3))))
    Retracting cmt(a3,a3,0,inform(others,fact(0,not I_have_a_mate(a3))))
    Asserting m(a1,a3,inform(fact(0,not I_have_a_mate(a3))))
    Asserting m(a2,a3,inform(fact(0,not I_have_a_mate(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,not I_have_a_mate(a1)))
    Asserting b(a1,fact(0,I_have_a_mate(a1)))
    Asserting b(a1,fact(0,not I_have_a_mate(a2)))
    Asserting b(a1,fact(0,not I_have_a_mate(a3)))
    Asserting cmt(a1,a1,0,do(transport_table) and inform(a1,fact(0,not I_have_a_mate(a1))) and inform(a1,fact(0,not I_have_table(a1))))
    Retracting m(a1,a2,inform(fact(0,I_have_a_mate(a1))))
    Retracting m(a1,a2,inform(fact(0,not I_have_a_mate(a2))))
    Retracting m(a1,a3,inform(fact(0,I_have_a_mate(a1))))
    Retracting m(a1,a3,inform(fact(0,not I_have_a_mate(a3))))
    Retracting cmt(a1,a1,0,do(transport_table) and inform(a1,fact(0,not I_have_a_mate(a1))) and inform(a1,fact(0,not I_have_table(a1))))
    Asserting m(a1,a1,inform(fact(0,not I_have_a_mate(a1))))
    Asserting m(a1,a1,inform(fact(0,not I_have_table(a1))))
    Retracting b(a2,fact(0,not I_have_a_mate(a2)))
    Asserting b(a2,fact(0,I_have_a_mate(a2)))
    Asserting b(a2,fact(0,not I_have_a_mate(a3)))
    Asserting cmt(a2,a2,0,do(transport_table) and inform(a2,fact(0,not I_have_a_mate(a2))) and inform(a2,fact(0,not I_have_table(a2))))
    Retracting m(a2,a2,inform(fact(0,I_have_a_mate(a2))))
    Retracting m(a2,a3,inform(fact(0,I_have_a_mate(a2))))
    Retracting m(a2,a3,inform(fact(0,not I_have_a_mate(a3))))
    Retracting cmt(a2,a2,0,do(transport_table) and inform(a2,fact(0,not I_have_a_mate(a2))) and inform(a2,fact(0,not I_have_table(a2))))
    Asserting m(a2,a2,inform(fact(0,not I_have_a_mate(a2))))
    Asserting m(a2,a2,inform(fact(0,not I_have_table(a2))))
    Retracting b(a3,fact(0,not I_have_a_mate(a3)))
    Asserting b(a3,fact(0,I_have_a_mate(a3)))
    Asserting cmt(a3,a3,0,do(transport_table) and inform(a3,fact(0,not I_have_a_mate(a3))) and inform(a3,fact(0,not I_have_table(a3))))
    Retracting m(a3,a3,inform(fact(0,I_have_a_mate(a3))))
    Retracting m(a3,a3,inform(fact(0,I_have_a_mate(a3))))
    Retracting cmt(a3,a3,0,do(transport_table) and inform(a3,fact(0,not I_have_a_mate(a3))) and inform(a3,fact(0,not I_have_table(a3))))
    Asserting m(a3,a3,inform(fact(0,not I_have_a_mate(a3))))
    Asserting m(a3,a3,inform(fact(0,not I_have_table(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,I_have_a_mate(a1)))
    Asserting b(a1,fact(0,not I_have_a_mate(a1)))
    Retracting b(a1,fact(0,I_have_table(a1)))
    Asserting b(a1,fact(0,not I_have_table(a1)))
    Asserting cmt(a1,a1,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a1))))
    Retracting m(a1,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting m(a1,a1,inform(fact(0,not I_have_table(a1))))
    Retracting cmt(a1,a1,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a1))))
    Asserting m(a1,a1,inform(fact(0,I_have_table(a1))))
    Asserting m(a2,a1,inform(fact(0,I_have_table(a1))))
    Asserting m(a3,a1,inform(fact(0,I_have_table(a1))))
    Retracting b(a2,fact(0,I_have_a_mate(a2)))
    Asserting b(a2,fact(0,not I_have_a_mate(a2)))
    Retracting b(a2,fact(0,I_have_table(a2)))
    Asserting b(a2,fact(0,not I_have_table(a2)))
    Asserting cmt(a2,a2,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a2))))
    Retracting m(a2,a2,inform(fact(0,not I_have_a_mate(a2))))
    Retracting m(a2,a2,inform(fact(0,not I_have_table(a2))))
    Retracting m(a2,a1,inform(fact(0,I_have_table(a1))))
    Retracting cmt(a2,a2,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a2))))
    Asserting m(a1,a2,inform(fact(0,I_have_table(a2))))
    Asserting m(a2,a2,inform(fact(0,I_have_table(a2))))
    Asserting m(a3,a2,inform(fact(0,I_have_table(a2))))
    Retracting b(a3,fact(0,I_have_a_mate(a3)))
    Asserting b(a3,fact(0,not I_have_a_mate(a3)))
    Retracting b(a3,fact(0,I_have_table(a3)))
    Asserting b(a3,fact(0,not I_have_table(a3)))
    Asserting cmt(a3,a3,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a3))))
    Retracting m(a3,a3,inform(fact(0,not I_have_a_mate(a3))))
    Retracting m(a3,a3,inform(fact(0,not I_have_table(a3))))
    Retracting m(a3,a1,inform(fact(0,I_have_table(a1))))
    Retracting m(a3,a2,inform(fact(0,I_have_table(a2))))
    Retracting cmt(a3,a3,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a3))))
    Asserting m(a1,a3,inform(fact(0,I_have_table(a3))))
    Asserting m(a2,a3,inform(fact(0,I_have_table(a3))))
    Asserting m(a3,a3,inform(fact(0,I_have_table(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,not I_have_table(a1)))
    Asserting b(a1,fact(0,I_have_table(a1)))
    Asserting cmt(a1,a1,0,inform(others,fact(0,not I_have_a_mate(a1))))
    Retracting m(a1,a1,inform(fact(0,I_have_table(a1))))
    Retracting m(a1,a2,inform(fact(0,I_have_table(a2))))
    Retracting m(a1,a3,inform(fact(0,I_have_table(a3))))
    Retracting cmt(a1,a1,0,inform(others,fact(0,not I_have_a_mate(a1))))
    Asserting m(a2,a1,inform(fact(0,not I_have_a_mate(a1))))
    Asserting m(a3,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting b(a2,fact(0,not I_have_table(a2)))
    Asserting b(a2,fact(0,I_have_table(a2)))
    Asserting cmt(a2,a2,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a2,fact(0,I_have_a_mate(a2))))
    Asserting cmt(a2,a2,0,inform(others,fact(0,not I_have_a_mate(a2))))
    Retracting m(a2,a2,inform(fact(0,I_have_table(a2))))
    Retracting m(a2,a3,inform(fact(0,I_have_table(a3))))
    Retracting m(a2,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting cmt(a2,a2,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a2,fact(0,I_have_a_mate(a2))))
    Asserting m(a1,a2,inform(fact(0,I_have_a_mate(a1))))
    Asserting m(a2,a2,inform(fact(0,I_have_a_mate(a2))))
    Retracting cmt(a2,a2,0,inform(others,fact(0,not I_have_a_mate(a2))))
    Asserting m(a1,a2,inform(fact(0,not I_have_a_mate(a2))))
    Asserting m(a3,a2,inform(fact(0,not I_have_a_mate(a2))))
    Retracting b(a3,fact(0,not I_have_table(a3)))
    Asserting b(a3,fact(0,I_have_table(a3)))
    Asserting cmt(a3,a3,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting cmt(a3,a3,0,inform(a2,fact(0,I_have_a_mate(a2))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting cmt(a3,a3,0,inform(others,fact(0,not I_have_a_mate(a3))))
    Retracting m(a3,a3,inform(fact(0,I_have_table(a3))))
    Retracting m(a3,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting m(a3,a2,inform(fact(0,not I_have_a_mate(a2))))
    Retracting cmt(a3,a3,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting m(a1,a3,inform(fact(0,I_have_a_mate(a1))))
    Asserting m(a3,a3,inform(fact(0,I_have_a_mate(a3))))
    Retracting cmt(a3,a3,0,inform(a2,fact(0,I_have_a_mate(a2))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting m(a2,a3,inform(fact(0,I_have_a_mate(a2))))
    Asserting m(a3,a3,inform(fact(0,I_have_a_mate(a3))))
    Retracting cmt(a3,a3,0,inform(others,fact(0,not I_have_a_mate(a3))))
    Asserting m(a1,a3,inform(fact(0,not I_have_a_mate(a3))))
    Asserting m(a2,a3,inform(fact(0,not I_have_a_mate(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,not I_have_a_mate(a1)))
    Asserting b(a1,fact(0,I_have_a_mate(a1)))
    Asserting cmt(a1,a1,0,do(transport_table) and inform(a1,fact(0,not I_have_a_mate(a1))) and inform(a1,fact(0,not I_have_table(a1))))
    Retracting m(a1,a2,inform(fact(0,I_have_a_mate(a1))))
    Retracting m(a1,a2,inform(fact(0,not I_have_a_mate(a2))))
    Retracting m(a1,a3,inform(fact(0,I_have_a_mate(a1))))
    Retracting m(a1,a3,inform(fact(0,not I_have_a_mate(a3))))
    Retracting cmt(a1,a1,0,do(transport_table) and inform(a1,fact(0,not I_have_a_mate(a1))) and inform(a1,fact(0,not I_have_table(a1))))
    Asserting m(a1,a1,inform(fact(0,not I_have_a_mate(a1))))
    Asserting m(a1,a1,inform(fact(0,not I_have_table(a1))))
    Retracting b(a2,fact(0,not I_have_a_mate(a2)))
    Asserting b(a2,fact(0,I_have_a_mate(a2)))
    Asserting cmt(a2,a2,0,do(transport_table) and inform(a2,fact(0,not I_have_a_mate(a2))) and inform(a2,fact(0,not I_have_table(a2))))
    Retracting m(a2,a2,inform(fact(0,I_have_a_mate(a2))))
    Retracting m(a2,a3,inform(fact(0,I_have_a_mate(a2))))
    Retracting m(a2,a3,inform(fact(0,not I_have_a_mate(a3))))
    Retracting cmt(a2,a2,0,do(transport_table) and inform(a2,fact(0,not I_have_a_mate(a2))) and inform(a2,fact(0,not I_have_table(a2))))
    Asserting m(a2,a2,inform(fact(0,not I_have_a_mate(a2))))
    Asserting m(a2,a2,inform(fact(0,not I_have_table(a2))))
    Retracting b(a3,fact(0,not I_have_a_mate(a3)))
    Asserting b(a3,fact(0,I_have_a_mate(a3)))
    Asserting cmt(a3,a3,0,do(transport_table) and inform(a3,fact(0,not I_have_a_mate(a3))) and inform(a3,fact(0,not I_have_table(a3))))
    Retracting m(a3,a3,inform(fact(0,I_have_a_mate(a3))))
    Retracting m(a3,a3,inform(fact(0,I_have_a_mate(a3))))
    Retracting cmt(a3,a3,0,do(transport_table) and inform(a3,fact(0,not I_have_a_mate(a3))) and inform(a3,fact(0,not I_have_table(a3))))
    Asserting m(a3,a3,inform(fact(0,not I_have_a_mate(a3))))
    Asserting m(a3,a3,inform(fact(0,not I_have_table(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,I_have_a_mate(a1)))
    Asserting b(a1,fact(0,not I_have_a_mate(a1)))
    Retracting b(a1,fact(0,I_have_table(a1)))
    Asserting b(a1,fact(0,not I_have_table(a1)))
    Asserting cmt(a1,a1,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a1))))
    Retracting m(a1,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting m(a1,a1,inform(fact(0,not I_have_table(a1))))
    Retracting cmt(a1,a1,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a1))))
    Asserting m(a1,a1,inform(fact(0,I_have_table(a1))))
    Asserting m(a2,a1,inform(fact(0,I_have_table(a1))))
    Asserting m(a3,a1,inform(fact(0,I_have_table(a1))))
    Retracting b(a2,fact(0,I_have_a_mate(a2)))
    Asserting b(a2,fact(0,not I_have_a_mate(a2)))
    Retracting b(a2,fact(0,I_have_table(a2)))
    Asserting b(a2,fact(0,not I_have_table(a2)))
    Asserting cmt(a2,a2,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a2))))
    Retracting m(a2,a2,inform(fact(0,not I_have_a_mate(a2))))
    Retracting m(a2,a2,inform(fact(0,not I_have_table(a2))))
    Retracting m(a2,a1,inform(fact(0,I_have_table(a1))))
    Retracting cmt(a2,a2,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a2))))
    Asserting m(a1,a2,inform(fact(0,I_have_table(a2))))
    Asserting m(a2,a2,inform(fact(0,I_have_table(a2))))
    Asserting m(a3,a2,inform(fact(0,I_have_table(a2))))
    Retracting b(a3,fact(0,I_have_a_mate(a3)))
    Asserting b(a3,fact(0,not I_have_a_mate(a3)))
    Retracting b(a3,fact(0,I_have_table(a3)))
    Asserting b(a3,fact(0,not I_have_table(a3)))
    Asserting cmt(a3,a3,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a3))))
    Retracting m(a3,a3,inform(fact(0,not I_have_a_mate(a3))))
    Retracting m(a3,a3,inform(fact(0,not I_have_table(a3))))
    Retracting m(a3,a1,inform(fact(0,I_have_table(a1))))
    Retracting m(a3,a2,inform(fact(0,I_have_table(a2))))
    Retracting cmt(a3,a3,0,do(fetch_table) and inform(everybody,fact(0,I_have_table(a3))))
    Asserting m(a1,a3,inform(fact(0,I_have_table(a3))))
    Asserting m(a2,a3,inform(fact(0,I_have_table(a3))))
    Asserting m(a3,a3,inform(fact(0,I_have_table(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,not I_have_table(a1)))
    Asserting b(a1,fact(0,I_have_table(a1)))
    Asserting cmt(a1,a1,0,inform(others,fact(0,not I_have_a_mate(a1))))
    Retracting m(a1,a1,inform(fact(0,I_have_table(a1))))
    Retracting m(a1,a2,inform(fact(0,I_have_table(a2))))
    Retracting m(a1,a3,inform(fact(0,I_have_table(a3))))
    Retracting cmt(a1,a1,0,inform(others,fact(0,not I_have_a_mate(a1))))
    Asserting m(a2,a1,inform(fact(0,not I_have_a_mate(a1))))
    Asserting m(a3,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting b(a2,fact(0,not I_have_table(a2)))
    Asserting b(a2,fact(0,I_have_table(a2)))
    Asserting cmt(a2,a2,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a2,fact(0,I_have_a_mate(a2))))
    Asserting cmt(a2,a2,0,inform(others,fact(0,not I_have_a_mate(a2))))
    Retracting m(a2,a2,inform(fact(0,I_have_table(a2))))
    Retracting m(a2,a3,inform(fact(0,I_have_table(a3))))
    Retracting m(a2,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting cmt(a2,a2,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a2,fact(0,I_have_a_mate(a2))))
    Asserting m(a1,a2,inform(fact(0,I_have_a_mate(a1))))
    Asserting m(a2,a2,inform(fact(0,I_have_a_mate(a2))))
    Retracting cmt(a2,a2,0,inform(others,fact(0,not I_have_a_mate(a2))))
    Asserting m(a1,a2,inform(fact(0,not I_have_a_mate(a2))))
    Asserting m(a3,a2,inform(fact(0,not I_have_a_mate(a2))))
    Retracting b(a3,fact(0,not I_have_table(a3)))
    Asserting b(a3,fact(0,I_have_table(a3)))
    Asserting cmt(a3,a3,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting cmt(a3,a3,0,inform(a2,fact(0,I_have_a_mate(a2))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting cmt(a3,a3,0,inform(others,fact(0,not I_have_a_mate(a3))))
    Retracting m(a3,a3,inform(fact(0,I_have_table(a3))))
    Retracting m(a3,a1,inform(fact(0,not I_have_a_mate(a1))))
    Retracting m(a3,a2,inform(fact(0,not I_have_a_mate(a2))))
    Retracting cmt(a3,a3,0,inform(a1,fact(0,I_have_a_mate(a1))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting m(a1,a3,inform(fact(0,I_have_a_mate(a1))))
    Asserting m(a3,a3,inform(fact(0,I_have_a_mate(a3))))
    Retracting cmt(a3,a3,0,inform(a2,fact(0,I_have_a_mate(a2))) and inform(a3,fact(0,I_have_a_mate(a3))))
    Asserting m(a2,a3,inform(fact(0,I_have_a_mate(a2))))
    Asserting m(a3,a3,inform(fact(0,I_have_a_mate(a3))))
    Retracting cmt(a3,a3,0,inform(others,fact(0,not I_have_a_mate(a3))))
    Asserting m(a1,a3,inform(fact(0,not I_have_a_mate(a3))))
    Asserting m(a2,a3,inform(fact(0,not I_have_a_mate(a3))))
    yes
    | ?-
    Versión con predicados en catalán i traza original sin traducir al inglés está en este fichero:

    agent name a1

    initial beliefs
    beliefs that hi_ha_taula at 0
    beliefs that not tinc_taula(a1) at 0
    beliefs that not tinc_company(a1) at 0
    capabilities

    can do buscar_taula if beliefs that not tinc_taula(a1) at T
    can do portar_taula if beliefs that tinc_company(a1) at T
    can do deixar_taula if beliefs that soc_al_magatzem(a1) at T
    commitment rule 1
    message conditions
    informed by A that not tinc_company(A) at T
    mental conditions
    beliefs that not tinc_company(a1) at T and
    diferents(A,a1)
    actions
    in time T
    inform A that tinc_company(A) at T and
    inform a1 that tinc_company(a1) at T
    commitment rule 2
    message conditions
    true
    mental conditions
    beliefs that hi_ha_taula at T and
    beliefs that not tinc_taula(a1) at T
    actions
    in time T
    do buscar_taula and
    inform everybody that tinc_taula(a1) at T
    commitment rule 3
    message conditions
    true
    menal conditions
    beliefs that tinc_taula(a1) at T and
    beliefs that not tinc_company(a1) at T
    actions
    in time T
    inform others that not tinc_company(a1) at T
    commitment rule 4
    message conditions
    true
    mental conditions
    beliefs that tinc_company(a1) at T
    actions
    in time T do portar_taula and
    inform a1 that not tinc_company(a1) at T and
    inform a1 that not tinc_taula(a1) at T
    end a1

     

    agent name a2

    initial beliefs

    beliefs that hi_ha_taula at 0
    beliefs that not tinc_taula(a2) at 0
    beliefs that not tinc_company(a2) at 0
    capabilities
    can do buscar_taula if beliefs that not tinc_taula(a2) at T
    can do portar_taula if beliefs that tinc_company(a2) at T
    can do deixar_taula if beliefs that soc_al_magatzem(a2) at T
    commitment rule 1
    message conditions
    informed by A that not tinc_company(A) at T
    mental conditions
    beliefs that not tinc_company(a2) at T and
    diferents(A,a2)
    actions
    in time T
    inform A that tinc_company(A) at T and
    inform a2 that tinc_company(a2) at T
    commitment rule 2
    message conditions
    true
    mental conditions
    beliefs that hi_ha_taula at T and
    beliefs that not tinc_taula(a2) at T
    actions
    in time T
    do buscar_taula and
    inform everybody that tinc_taula(a2) at T
    commitment rule 3
    message conditions
    true
    mental conditions
    beliefs that tinc_taula(a2) at T and
    beliefs that not tinc_company(a2) at T
    actions
    in time T
    inform others that not tinc_company(a2) at T
    commitment rule 4
    message conditions
    true
    mental conditions
    beliefs that tinc_company(a2) at T
    actions
    in time T do portar_taula and
    inform a2 that not tinc_company(a2) at T and
    inform a2 that not tinc_taula(a2) at T
    end a2
    agent name a3

    initial beliefs

    beliefs that hi_ha_taula at 0
    beliefs that not tinc_taula(a3) at 0
    beliefs that not tinc_company(a3) at 0
    capabilities
    can do buscar_taula if beliefs that not tinc_taula(a3) at T
    can do portar_taula if beliefs that tinc_company(a3) at T
    can do deixar_taula if beliefs that soc_al_magatzem(a3) at T
    commitment rule 1
    message conditions
    informed by A that not tinc_company(A) at T
    mental conditions
    beliefs that not tinc_company(a3) at T and
    diferents(A,a3)
    actions
    in time T
    inform A that tinc_company(A) at T and
    inform a3 that tinc_company(a3) at T
    commitment rule 2
    message conditions
    true
    mental conditions
    beliefs that hi_ha_taula at T and
    beliefs that not tinc_taula(a3) at T
    actions
    in time T
    do buscar_taula and
    inform everybody that tinc_taula(a3) at T
    commitment rule 3
    message conditions
    true
    mental conditions
    beliefs that tinc_taula(a3) at T and
    beliefs that not tinc_company(a3) at T
    actions
    in time T
    inform others that not tinc_company(a3) at T
    commitment rule 4
    message conditions
    true
    mental conditions
    beliefs that tinc_company(a3) at T
    actions
    in time T do portar_taula and
    inform a3 that not tinc_company(a3) at T and
    inform a3 that not tinc_taula(a3) at T
    end a3
    Traza de la ejecución
    | ?- reset_time.

    yes
    | ?- cycle.
    Asserting cmt(a1,a1,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a1))))
    Retracting cmt(a1,a1,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a1))))
    Asserting m(a1,a1,inform(fact(0,tinc_taula(a1))))
    Asserting m(a2,a1,inform(fact(0,tinc_taula(a1))))
    Asserting m(a3,a1,inform(fact(0,tinc_taula(a1))))
    Asserting b(a2,fact(0,tinc_taula(a1)))
    Asserting cmt(a2,a2,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a2))))
    Retracting m(a2,a1,inform(fact(0,tinc_taula(a1))))
    Retracting cmt(a2,a2,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a2))))
    Asserting m(a1,a2,inform(fact(0,tinc_taula(a2))))
    Asserting m(a2,a2,inform(fact(0,tinc_taula(a2))))
    Asserting m(a3,a2,inform(fact(0,tinc_taula(a2))))
    Asserting b(a3,fact(0,tinc_taula(a1)))
    Asserting b(a3,fact(0,tinc_taula(a2)))
    Asserting cmt(a3,a3,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a3))))
    Retracting m(a3,a1,inform(fact(0,tinc_taula(a1))))
    Retracting m(a3,a2,inform(fact(0,tinc_taula(a2))))
    Retracting cmt(a3,a3,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a3))))
    Asserting m(a1,a3,inform(fact(0,tinc_taula(a3))))
    Asserting m(a2,a3,inform(fact(0,tinc_taula(a3))))
    Asserting m(a3,a3,inform(fact(0,tinc_taula(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,not tinc_taula(a1)))
    Asserting b(a1,fact(0,tinc_taula(a1)))
    Asserting b(a1,fact(0,tinc_taula(a2)))
    Asserting b(a1,fact(0,tinc_taula(a3)))
    Asserting cmt(a1,a1,0,inform(others,fact(0,not tinc_company(a1))))
    Retracting m(a1,a1,inform(fact(0,tinc_taula(a1))))
    Retracting m(a1,a2,inform(fact(0,tinc_taula(a2))))
    Retracting m(a1,a3,inform(fact(0,tinc_taula(a3))))
    Retracting cmt(a1,a1,0,inform(others,fact(0,not tinc_company(a1))))
    Asserting m(a2,a1,inform(fact(0,not tinc_company(a1))))
    Asserting m(a3,a1,inform(fact(0,not tinc_company(a1))))
    Retracting b(a2,fact(0,not tinc_taula(a2)))
    Asserting b(a2,fact(0,tinc_taula(a2)))
    Asserting b(a2,fact(0,tinc_taula(a3)))
    Asserting b(a2,fact(0,not tinc_company(a1)))
    Asserting cmt(a2,a2,0,inform(a1,fact(0,tinc_company(a1))) and inform(a2,fact(0,tinc_company(a2))))
    Asserting cmt(a2,a2,0,inform(others,fact(0,not tinc_company(a2))))
    Retracting m(a2,a2,inform(fact(0,tinc_taula(a2))))
    Retracting m(a2,a3,inform(fact(0,tinc_taula(a3))))
    Retracting m(a2,a1,inform(fact(0,not tinc_company(a1))))
    Retracting cmt(a2,a2,0,inform(a1,fact(0,tinc_company(a1))) and inform(a2,fact(0,tinc_company(a2))))
    Asserting m(a1,a2,inform(fact(0,tinc_company(a1))))
    Asserting m(a2,a2,inform(fact(0,tinc_company(a2))))
    Retracting cmt(a2,a2,0,inform(others,fact(0,not tinc_company(a2))))
    Asserting m(a1,a2,inform(fact(0,not tinc_company(a2))))
    Asserting m(a3,a2,inform(fact(0,not tinc_company(a2))))
    Retracting b(a3,fact(0,not tinc_taula(a3)))
    Asserting b(a3,fact(0,tinc_taula(a3)))
    Asserting b(a3,fact(0,not tinc_company(a1)))
    Asserting b(a3,fact(0,not tinc_company(a2)))
    Asserting cmt(a3,a3,0,inform(a1,fact(0,tinc_company(a1))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting cmt(a3,a3,0,inform(a2,fact(0,tinc_company(a2))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting cmt(a3,a3,0,inform(others,fact(0,not tinc_company(a3))))
    Retracting m(a3,a3,inform(fact(0,tinc_taula(a3))))
    Retracting m(a3,a1,inform(fact(0,not tinc_company(a1))))
    Retracting m(a3,a2,inform(fact(0,not tinc_company(a2))))
    Retracting cmt(a3,a3,0,inform(a1,fact(0,tinc_company(a1))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting m(a1,a3,inform(fact(0,tinc_company(a1))))
    Asserting m(a3,a3,inform(fact(0,tinc_company(a3))))
    Retracting cmt(a3,a3,0,inform(a2,fact(0,tinc_company(a2))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting m(a2,a3,inform(fact(0,tinc_company(a2))))
    Asserting m(a3,a3,inform(fact(0,tinc_company(a3))))
    Retracting cmt(a3,a3,0,inform(others,fact(0,not tinc_company(a3))))
    Asserting m(a1,a3,inform(fact(0,not tinc_company(a3))))
    Asserting m(a2,a3,inform(fact(0,not tinc_company(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,not tinc_company(a1)))
    Asserting b(a1,fact(0,tinc_company(a1)))
    Asserting b(a1,fact(0,not tinc_company(a2)))
    Asserting b(a1,fact(0,not tinc_company(a3)))
    Asserting cmt(a1,a1,0,do(portar_taula) and inform(a1,fact(0,not tinc_company(a1))) and inform(a1,fact(0,not tinc_taula(a1))))
    Retracting m(a1,a2,inform(fact(0,tinc_company(a1))))
    Retracting m(a1,a2,inform(fact(0,not tinc_company(a2))))
    Retracting m(a1,a3,inform(fact(0,tinc_company(a1))))
    Retracting m(a1,a3,inform(fact(0,not tinc_company(a3))))
    Retracting cmt(a1,a1,0,do(portar_taula) and inform(a1,fact(0,not tinc_company(a1))) and inform(a1,fact(0,not tinc_taula(a1))))
    Asserting m(a1,a1,inform(fact(0,not tinc_company(a1))))
    Asserting m(a1,a1,inform(fact(0,not tinc_taula(a1))))
    Retracting b(a2,fact(0,not tinc_company(a2)))
    Asserting b(a2,fact(0,tinc_company(a2)))
    Asserting b(a2,fact(0,not tinc_company(a3)))
    Asserting cmt(a2,a2,0,do(portar_taula) and inform(a2,fact(0,not tinc_company(a2))) and inform(a2,fact(0,not tinc_taula(a2))))
    Retracting m(a2,a2,inform(fact(0,tinc_company(a2))))
    Retracting m(a2,a3,inform(fact(0,tinc_company(a2))))
    Retracting m(a2,a3,inform(fact(0,not tinc_company(a3))))
    Retracting cmt(a2,a2,0,do(portar_taula) and inform(a2,fact(0,not tinc_company(a2))) and inform(a2,fact(0,not tinc_taula(a2))))
    Asserting m(a2,a2,inform(fact(0,not tinc_company(a2))))
    Asserting m(a2,a2,inform(fact(0,not tinc_taula(a2))))
    Retracting b(a3,fact(0,not tinc_company(a3)))
    Asserting b(a3,fact(0,tinc_company(a3)))
    Asserting cmt(a3,a3,0,do(portar_taula) and inform(a3,fact(0,not tinc_company(a3))) and inform(a3,fact(0,not tinc_taula(a3))))
    Retracting m(a3,a3,inform(fact(0,tinc_company(a3))))
    Retracting m(a3,a3,inform(fact(0,tinc_company(a3))))
    Retracting cmt(a3,a3,0,do(portar_taula) and inform(a3,fact(0,not tinc_company(a3))) and inform(a3,fact(0,not tinc_taula(a3))))
    Asserting m(a3,a3,inform(fact(0,not tinc_company(a3))))
    Asserting m(a3,a3,inform(fact(0,not tinc_taula(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,tinc_company(a1)))
    Asserting b(a1,fact(0,not tinc_company(a1)))
    Retracting b(a1,fact(0,tinc_taula(a1)))
    Asserting b(a1,fact(0,not tinc_taula(a1)))
    Asserting cmt(a1,a1,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a1))))
    Retracting m(a1,a1,inform(fact(0,not tinc_company(a1))))
    Retracting m(a1,a1,inform(fact(0,not tinc_taula(a1))))
    Retracting cmt(a1,a1,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a1))))
    Asserting m(a1,a1,inform(fact(0,tinc_taula(a1))))
    Asserting m(a2,a1,inform(fact(0,tinc_taula(a1))))
    Asserting m(a3,a1,inform(fact(0,tinc_taula(a1))))
    Retracting b(a2,fact(0,tinc_company(a2)))
    Asserting b(a2,fact(0,not tinc_company(a2)))
    Retracting b(a2,fact(0,tinc_taula(a2)))
    Asserting b(a2,fact(0,not tinc_taula(a2)))
    Asserting cmt(a2,a2,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a2))))
    Retracting m(a2,a2,inform(fact(0,not tinc_company(a2))))
    Retracting m(a2,a2,inform(fact(0,not tinc_taula(a2))))
    Retracting m(a2,a1,inform(fact(0,tinc_taula(a1))))
    Retracting cmt(a2,a2,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a2))))
    Asserting m(a1,a2,inform(fact(0,tinc_taula(a2))))
    Asserting m(a2,a2,inform(fact(0,tinc_taula(a2))))
    Asserting m(a3,a2,inform(fact(0,tinc_taula(a2))))
    Retracting b(a3,fact(0,tinc_company(a3)))
    Asserting b(a3,fact(0,not tinc_company(a3)))
    Retracting b(a3,fact(0,tinc_taula(a3)))
    Asserting b(a3,fact(0,not tinc_taula(a3)))
    Asserting cmt(a3,a3,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a3))))
    Retracting m(a3,a3,inform(fact(0,not tinc_company(a3))))
    Retracting m(a3,a3,inform(fact(0,not tinc_taula(a3))))
    Retracting m(a3,a1,inform(fact(0,tinc_taula(a1))))
    Retracting m(a3,a2,inform(fact(0,tinc_taula(a2))))
    Retracting cmt(a3,a3,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a3))))
    Asserting m(a1,a3,inform(fact(0,tinc_taula(a3))))
    Asserting m(a2,a3,inform(fact(0,tinc_taula(a3))))
    Asserting m(a3,a3,inform(fact(0,tinc_taula(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,not tinc_taula(a1)))
    Asserting b(a1,fact(0,tinc_taula(a1)))
    Asserting cmt(a1,a1,0,inform(others,fact(0,not tinc_company(a1))))
    Retracting m(a1,a1,inform(fact(0,tinc_taula(a1))))
    Retracting m(a1,a2,inform(fact(0,tinc_taula(a2))))
    Retracting m(a1,a3,inform(fact(0,tinc_taula(a3))))
    Retracting cmt(a1,a1,0,inform(others,fact(0,not tinc_company(a1))))
    Asserting m(a2,a1,inform(fact(0,not tinc_company(a1))))
    Asserting m(a3,a1,inform(fact(0,not tinc_company(a1))))
    Retracting b(a2,fact(0,not tinc_taula(a2)))
    Asserting b(a2,fact(0,tinc_taula(a2)))
    Asserting cmt(a2,a2,0,inform(a1,fact(0,tinc_company(a1))) and inform(a2,fact(0,tinc_company(a2))))
    Asserting cmt(a2,a2,0,inform(others,fact(0,not tinc_company(a2))))
    Retracting m(a2,a2,inform(fact(0,tinc_taula(a2))))
    Retracting m(a2,a3,inform(fact(0,tinc_taula(a3))))
    Retracting m(a2,a1,inform(fact(0,not tinc_company(a1))))
    Retracting cmt(a2,a2,0,inform(a1,fact(0,tinc_company(a1))) and inform(a2,fact(0,tinc_company(a2))))
    Asserting m(a1,a2,inform(fact(0,tinc_company(a1))))
    Asserting m(a2,a2,inform(fact(0,tinc_company(a2))))
    Retracting cmt(a2,a2,0,inform(others,fact(0,not tinc_company(a2))))
    Asserting m(a1,a2,inform(fact(0,not tinc_company(a2))))
    Asserting m(a3,a2,inform(fact(0,not tinc_company(a2))))
    Retracting b(a3,fact(0,not tinc_taula(a3)))
    Asserting b(a3,fact(0,tinc_taula(a3)))
    Asserting cmt(a3,a3,0,inform(a1,fact(0,tinc_company(a1))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting cmt(a3,a3,0,inform(a2,fact(0,tinc_company(a2))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting cmt(a3,a3,0,inform(others,fact(0,not tinc_company(a3))))
    Retracting m(a3,a3,inform(fact(0,tinc_taula(a3))))
    Retracting m(a3,a1,inform(fact(0,not tinc_company(a1))))
    Retracting m(a3,a2,inform(fact(0,not tinc_company(a2))))
    Retracting cmt(a3,a3,0,inform(a1,fact(0,tinc_company(a1))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting m(a1,a3,inform(fact(0,tinc_company(a1))))
    Asserting m(a3,a3,inform(fact(0,tinc_company(a3))))
    Retracting cmt(a3,a3,0,inform(a2,fact(0,tinc_company(a2))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting m(a2,a3,inform(fact(0,tinc_company(a2))))
    Asserting m(a3,a3,inform(fact(0,tinc_company(a3))))
    Retracting cmt(a3,a3,0,inform(others,fact(0,not tinc_company(a3))))
    Asserting m(a1,a3,inform(fact(0,not tinc_company(a3))))
    Asserting m(a2,a3,inform(fact(0,not tinc_company(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,not tinc_company(a1)))
    Asserting b(a1,fact(0,tinc_company(a1)))
    Asserting cmt(a1,a1,0,do(portar_taula) and inform(a1,fact(0,not tinc_company(a1))) and inform(a1,fact(0,not tinc_taula(a1))))
    Retracting m(a1,a2,inform(fact(0,tinc_company(a1))))
    Retracting m(a1,a2,inform(fact(0,not tinc_company(a2))))
    Retracting m(a1,a3,inform(fact(0,tinc_company(a1))))
    Retracting m(a1,a3,inform(fact(0,not tinc_company(a3))))
    Retracting cmt(a1,a1,0,do(portar_taula) and inform(a1,fact(0,not tinc_company(a1))) and inform(a1,fact(0,not tinc_taula(a1))))
    Asserting m(a1,a1,inform(fact(0,not tinc_company(a1))))
    Asserting m(a1,a1,inform(fact(0,not tinc_taula(a1))))
    Retracting b(a2,fact(0,not tinc_company(a2)))
    Asserting b(a2,fact(0,tinc_company(a2)))
    Asserting cmt(a2,a2,0,do(portar_taula) and inform(a2,fact(0,not tinc_company(a2))) and inform(a2,fact(0,not tinc_taula(a2))))
    Retracting m(a2,a2,inform(fact(0,tinc_company(a2))))
    Retracting m(a2,a3,inform(fact(0,tinc_company(a2))))
    Retracting m(a2,a3,inform(fact(0,not tinc_company(a3))))
    Retracting cmt(a2,a2,0,do(portar_taula) and inform(a2,fact(0,not tinc_company(a2))) and inform(a2,fact(0,not tinc_taula(a2))))
    Asserting m(a2,a2,inform(fact(0,not tinc_company(a2))))
    Asserting m(a2,a2,inform(fact(0,not tinc_taula(a2))))
    Retracting b(a3,fact(0,not tinc_company(a3)))
    Asserting b(a3,fact(0,tinc_company(a3)))
    Asserting cmt(a3,a3,0,do(portar_taula) and inform(a3,fact(0,not tinc_company(a3))) and inform(a3,fact(0,not tinc_taula(a3))))
    Retracting m(a3,a3,inform(fact(0,tinc_company(a3))))
    Retracting m(a3,a3,inform(fact(0,tinc_company(a3))))
    Retracting cmt(a3,a3,0,do(portar_taula) and inform(a3,fact(0,not tinc_company(a3))) and inform(a3,fact(0,not tinc_taula(a3))))
    Asserting m(a3,a3,inform(fact(0,not tinc_company(a3))))
    Asserting m(a3,a3,inform(fact(0,not tinc_taula(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,tinc_company(a1)))
    Asserting b(a1,fact(0,not tinc_company(a1)))
    Retracting b(a1,fact(0,tinc_taula(a1)))
    Asserting b(a1,fact(0,not tinc_taula(a1)))
    Asserting cmt(a1,a1,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a1))))
    Retracting m(a1,a1,inform(fact(0,not tinc_company(a1))))
    Retracting m(a1,a1,inform(fact(0,not tinc_taula(a1))))
    Retracting cmt(a1,a1,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a1))))
    Asserting m(a1,a1,inform(fact(0,tinc_taula(a1))))
    Asserting m(a2,a1,inform(fact(0,tinc_taula(a1))))
    Asserting m(a3,a1,inform(fact(0,tinc_taula(a1))))
    Retracting b(a2,fact(0,tinc_company(a2)))
    Asserting b(a2,fact(0,not tinc_company(a2)))
    Retracting b(a2,fact(0,tinc_taula(a2)))
    Asserting b(a2,fact(0,not tinc_taula(a2)))
    Asserting cmt(a2,a2,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a2))))
    Retracting m(a2,a2,inform(fact(0,not tinc_company(a2))))
    Retracting m(a2,a2,inform(fact(0,not tinc_taula(a2))))
    Retracting m(a2,a1,inform(fact(0,tinc_taula(a1))))
    Retracting cmt(a2,a2,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a2))))
    Asserting m(a1,a2,inform(fact(0,tinc_taula(a2))))
    Asserting m(a2,a2,inform(fact(0,tinc_taula(a2))))
    Asserting m(a3,a2,inform(fact(0,tinc_taula(a2))))
    Retracting b(a3,fact(0,tinc_company(a3)))
    Asserting b(a3,fact(0,not tinc_company(a3)))
    Retracting b(a3,fact(0,tinc_taula(a3)))
    Asserting b(a3,fact(0,not tinc_taula(a3)))
    Asserting cmt(a3,a3,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a3))))
    Retracting m(a3,a3,inform(fact(0,not tinc_company(a3))))
    Retracting m(a3,a3,inform(fact(0,not tinc_taula(a3))))
    Retracting m(a3,a1,inform(fact(0,tinc_taula(a1))))
    Retracting m(a3,a2,inform(fact(0,tinc_taula(a2))))
    Retracting cmt(a3,a3,0,do(buscar_taula) and inform(everybody,fact(0,tinc_taula(a3))))
    Asserting m(a1,a3,inform(fact(0,tinc_taula(a3))))
    Asserting m(a2,a3,inform(fact(0,tinc_taula(a3))))
    Asserting m(a3,a3,inform(fact(0,tinc_taula(a3))))
    yes
    | ?- cycle.
    Retracting b(a1,fact(0,not tinc_taula(a1)))
    Asserting b(a1,fact(0,tinc_taula(a1)))
    Asserting cmt(a1,a1,0,inform(others,fact(0,not tinc_company(a1))))
    Retracting m(a1,a1,inform(fact(0,tinc_taula(a1))))
    Retracting m(a1,a2,inform(fact(0,tinc_taula(a2))))
    Retracting m(a1,a3,inform(fact(0,tinc_taula(a3))))
    Retracting cmt(a1,a1,0,inform(others,fact(0,not tinc_company(a1))))
    Asserting m(a2,a1,inform(fact(0,not tinc_company(a1))))
    Asserting m(a3,a1,inform(fact(0,not tinc_company(a1))))
    Retracting b(a2,fact(0,not tinc_taula(a2)))
    Asserting b(a2,fact(0,tinc_taula(a2)))
    Asserting cmt(a2,a2,0,inform(a1,fact(0,tinc_company(a1))) and inform(a2,fact(0,tinc_company(a2))))
    Asserting cmt(a2,a2,0,inform(others,fact(0,not tinc_company(a2))))
    Retracting m(a2,a2,inform(fact(0,tinc_taula(a2))))
    Retracting m(a2,a3,inform(fact(0,tinc_taula(a3))))
    Retracting m(a2,a1,inform(fact(0,not tinc_company(a1))))
    Retracting cmt(a2,a2,0,inform(a1,fact(0,tinc_company(a1))) and inform(a2,fact(0,tinc_company(a2))))
    Asserting m(a1,a2,inform(fact(0,tinc_company(a1))))
    Asserting m(a2,a2,inform(fact(0,tinc_company(a2))))
    Retracting cmt(a2,a2,0,inform(others,fact(0,not tinc_company(a2))))
    Asserting m(a1,a2,inform(fact(0,not tinc_company(a2))))
    Asserting m(a3,a2,inform(fact(0,not tinc_company(a2))))
    Retracting b(a3,fact(0,not tinc_taula(a3)))
    Asserting b(a3,fact(0,tinc_taula(a3)))
    Asserting cmt(a3,a3,0,inform(a1,fact(0,tinc_company(a1))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting cmt(a3,a3,0,inform(a2,fact(0,tinc_company(a2))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting cmt(a3,a3,0,inform(others,fact(0,not tinc_company(a3))))
    Retracting m(a3,a3,inform(fact(0,tinc_taula(a3))))
    Retracting m(a3,a1,inform(fact(0,not tinc_company(a1))))
    Retracting m(a3,a2,inform(fact(0,not tinc_company(a2))))
    Retracting cmt(a3,a3,0,inform(a1,fact(0,tinc_company(a1))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting m(a1,a3,inform(fact(0,tinc_company(a1))))
    Asserting m(a3,a3,inform(fact(0,tinc_company(a3))))
    Retracting cmt(a3,a3,0,inform(a2,fact(0,tinc_company(a2))) and inform(a3,fact(0,tinc_company(a3))))
    Asserting m(a2,a3,inform(fact(0,tinc_company(a2))))
    Asserting m(a3,a3,inform(fact(0,tinc_company(a3))))
    Retracting cmt(a3,a3,0,inform(others,fact(0,not tinc_company(a3))))
    Asserting m(a1,a3,inform(fact(0,not tinc_company(a3))))
    Asserting m(a2,a3,inform(fact(0,not tinc_company(a3))))1
    yes
    | ?-
     
     
    ANEXO 5: RoboCup

    RoboCup, The Robot World Cup Initiative, was launched to promote state-of-the-art in robotics and AI research, as well as providing a platform for integrated project oriented education. It has encouraged international joint projects involving over 20 countries and nearly 1,000 researchers. While RoboCup Federation (established in Bern, Switzerland, as a non-profit organisation, with operational headquarter in Tokyo, Japan) itself does not have a research group of its own, each of the participant laboratories and corporations advance toward the common goal. The main function of the RoboCup Federation is to organise annual conferences and competitions, and to foster technical exchange among researchers. One of the effective ways to promote engineering research, apart from specific application developments, is to set a significant long-term goal. When significant social impact is achieved by accomplishing such a goal, the goal is referred to as a grand challenge project. Building a robot to play soccer itself does not generate significant social and economic impact, but the accomplishment will certainly considered a major achievement in the field. We call this kind of project a landmark project. RoboCup is a landmark project. Our ultimate goal is:

    By the mid-21st century, a team of fully autonomous humanoid robot soccer players shall win a game of soccer, complying with the official rules of the FIFA, against the winner of the most recent World Cup. This goal may sound overly ambitious given the state-of-the-art technology today. Nevertheless, we believe it is important that such a long-term goal is to be claimed and identified and pursued. It took only 50 years from the Wright Brother's first aircraft flight to Apollo mission to send man to the moon and safely return them to earth. Also, it took only 50 years, from the invention of the digital computer to the Deep Blue, which beat a human champion at chess. We recognise, however, that building humanoid soccer players requires an equally long period and extensive efforts of a broad range of researchers, and the goal will not be met in the near future. Nevertheless, we believe the goal should be pursued, and we have identified this as the RoboCup challenge. In order to accomplish the mission, a broad range of technologies has to be developed and we believe they will be applied to various social and industrial applications.

    History


    La idea de robots que jugasen al fútbol fue propuesta por primera vez por el profesor Alan Mackworth de la universidad de British Columbia, (Canadá) en 1992 [Mackworth 93]. El proyecto realizado se denominó Dynamo [Sahota 95] y ha sido fuente de inspiración para la RoboCup. Hoy en día el profesor Mackworth sigue trabajando en temas relacionados utilizando su robot Spinoza.

    Independientemente, un grupo de investigadores japoneses organizaron un Workshop denominado ``Grand Challenge in Artificial Intelligence'' en Tokio en Octubre de 1992 para discutir posibles problemas que sirvieran como test para la Inteligencia Artificial. En Junio de 1993 se propuso seriamente utilizar el fútbol para promocionar la ciencia y la tecnología estableciéndose para ello un proyecto denominado originalmente J-League en el que participaban los investigadores Minoru Asada, Yasuo Kuniyoshi e Hiroaki Kitano. Debido al interés despertado fuera de Japón se decidió extenderlo en forma de proyecto internacional, al que se denominó Robot World Cup Initiative, abreviadamente RoboCup. El ElectroTechnical Laboratory (ETL), un centro de investigación perteneciente al gobierno japonés, comenzó entonces la investigación en sistemas multi-agentes utilizando el fútbol, e inició el desarrollo de un simulador de partidos de fútbol.

    En Septiembre de 1993 se realizó el primer anuncio de la iniciativa y comenzó la redacción de las reglas específicas y los aspectos técnicos y organizativos. Al mismo tiempo, varios proyectos relacionados ya habían comenzado, como el grupo del profesor Minoru Asada en la Universidad de Osaka o el de la profesora Manuela Veloso en la Universidad Carnegie Mellon.

    En la National Conference on Artificial Intelligence (AAAI-94) celebrada en Seattle (Estados Unidos) en 1994, se llevó a cabo una discusión más detallada sobre la iniciativa de la RoboCup, incluyendo investigadores de los Estados Unidos, Europa y Japón. El mismo año, el ETL anunciaba la primera versión, realizada en LISP y denominada versión 0, del Soccer Server, el simulador oficial de la RoboCup.

    Durante la International Joint Conference on Artificial Intelligence (IJCAI-95) celebrada en Montreal (Canadá) en Agosto de 1995, se anunció la celebración de los primeros Robot World Cup Soccer Games and Conferences a celebrar durante el IJCAI-97 en Nagoya (Japón). Al mismo tiempo se decidió celebrar una Pre-RoboCup-96 para identificar los problemas potenciales de organizar la RoboCup a gran escala. En la misma conferencia se hizo la primera demostración pública del Soccer Server Version 1.0 (realizada en C++) y que desde entonces se distribuye a través del servidor WWW del http://ci.etl.go.jp/noda/$\sim$soccer/server.html

    La Pre-RoboCup-96 se celebró durante la International Conference on Intelligence Robotics and Systems (IROS-96) celebrada del 4 al 8 de Noviembre de 1996 en Osaka (Japón). Compitieron 8 equipos en la Simulation League y se realizó una demostración de robots reales de la Middle SizeLeague.

    Los primeros juegos oficiales y conferencias de la RoboCup se celebraron en 1997, con la participación de 40 equipos (entre la competición de robots reales y simulados), atrayendo a más de 5000 espectadores en directo. La comunidad de la RoboCup está creciendo rápidamente y se espera que la RoboCup-98, a celebrar en Julio de 1998, congregue a más de 100 equipos, convirtiéndose en el evento de robótica móvil más importante de la historia.

    CALL FOR PAPERS DEL "ADVANCED ROBOTICS JOURNAL", DEADLINE DECEMBER 15,1998: "Advanced Robotics will feature a special issue on RoboCup: The Robot World Cup Soccer Initiative. RoboCup is an attempt to promote robotics and AI research by providing a common task for evaluation of various performance, theories, algorithms, and robot architectures. In order for robots (mainly physical robots) to play a soccer game reasonably well, a wide range of technologies need to be integrated and a number of technical breakthrough must be accomplished. The range of technologies spans both robotics and AI research, including design principles of autonomous agents, multi-agent collaboration, strategy acquisition, machine learning, real-time reasoning and planning, intelligent robotics, sensor- fusion, and so forth. Details of RoboCup are available from RoboCup official home page (http://ww.robocup.org).

    In this special issue, we solicit high quality scientific contributions related to RoboCup of physical agent track. Papers must clearly identify scientific significance. Analysis on the applicability of approaches outside of soccer domain will add significance to papers. Papers, which only describe robot teams, will not be accepted. It is very important that the papers attempt to make a contribution to field(s) outside the RoboCup community.

    A partial list of possible topics are: a new sensing and mechanical devices for RoboCup, implementation of real-time and robust sensing, realisation of stable and high-speed robot control, behavior learning for multi-agent environment, multi-agent architectures, real-time planning, co-operation in dynamic environments, vision system as a part of complete agent, engineering infrastructure, other related topics..."

    [MacWorth 93] MacWorth A. K., "Computer Vision: System, Theory, and Applications, Chapter of On Seeing Robots, pp:1-13. World Scientific Press, Singapore, 1993

    [Sahota 95] Sahota M. K., MacWorth A. K., Barman R. A., and Kingdon S. J., "Real-Time Control of Soccer-Playing Robots using Off-Board Vision: the Dynamite Testbed", IEEE International Conference on Systems, Man and Cybernetics, pp: 3690-3693, 1995.

    El año 1997 pasará a la historia, entre otras muchas cosas, por ser el año en el que por primera vez un ordenador consiguió ganar en un torneo uno contra uno al campeón mundial de ajedrez Gary Kasparov. \index{ajedrez} Este era un objetivo largamente perseguido. De hecho se consideraba como uno de los problemas paradigmáticos dentro de la IA. Por otro lado, puede entenderse como el final de una época, la de resolución de problemas simbólicos (de juguete, para algunos investigadores) y el comienzo de otra nueva, más cercana a los problemas del mundo real. El comienzo de esta nueva época en investigación en IA implica la necesidad de buscar nuevos retos en forma de un nuevo problema en el que la IA pueda comprobar sus avances. La experiencia del uso de juegos parece satisfactoria: permite comparar unas propuestas con otras, le da cierto interés, etc. Ello ha hecho que se generalicen las competiciones también entre los robots. Así, uno de los problemas propuestos como nuevo banco de pruebas ({\em benchmark}) \index{benchmark} es el fútbol \index{fútbol} entre robots.