Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

download Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

of 204

Transcript of Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    1/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    2/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    3/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    4/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    5/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    6/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    7/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    8/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    9/204

    W

    Wp

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    10/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    11/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    12/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    13/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    14/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    15/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    16/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    17/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    18/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    19/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    20/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    21/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    22/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    23/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    24/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    25/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    26/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    27/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    28/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    29/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    30/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    31/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    32/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    33/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    34/204

    Wp

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    35/204

    IOTSs

    IOTS

    L

    L= I O

    (S,I,O,Tr,s0)

    s

    S

    s after =

    {s

    S

    |s ==

    s

    }

    sS out(s) ={oO|s S: s o s} {|s S: s s}

    S S

    out(S) =

    {out(s)|sS}

    sS Straces(s) ={L |s S: s

    == s}

    M after = s0 after

    Straces(M) =Straces(s0)

    I S IOTS I S I iocoS

    Straces(S)

    out(I after )out(S after )

    sr s

    k

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    36/204

    r

    (S,I,O,Tr,s0)

    sS iI (s, i) ={s S|s i/o s T r} (s, i) ={oO|s :s i/o s T r}

    sS I

    (s, .) ={o.((s, ), )|s :s /o s T r}

    s

    s

    s r(1) s

    i

    I

    (s, i) (s, i) =

    k > 1

    s

    k

    s

    s r(k) s

    1j < k

    (s, ) (s, ) =

    Ij

    iI

    s1(s, i) s1(s, i) s1 r(j)s1

    s r s

    k

    s r(k)s

    r

    s

    r s

    k

    s r s

    M1 = (S1, I , O , T r1, s0) M2 = (S2, I , O , T r2, q0)

    S1 S2 = M1 M2 (S1 S2, I , O , T r1

    T r2, s0) M1 M2 r M1r M2 s0r q0 M1 M2

    M1 M2

    x

    x

    x

    ||

    []lk

    k

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    37/204

    l

    l

    k

    []lk = []00 = k1 []k0 = []k1

    []||1 =

    (S,I,O,,,s0)

    (oU, oL)O o|U o|L U

    L

    j {U, L}

    j : (I O) (Ij {} Oj {})

    j() =

    j(i/o ) =

    / j() si iIj o|j =i/ j() si iIj o|j =/oj j() si iIj o|j =oj=i/oj j() si iIj o|j =oj=

    /

    r() = r(i/o ) =

    r() si i= o=i/o r() en cualquier otro caso

    h : S I (I O)

    h(s, ) = h(s,i) =i/(s, i)h((s, i), )

    j {U, L}

    j : S I (I O)

    s

    j

    j(s, ) =r(j(h(s, )))

    sS

    s

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    38/204

    (S,I,O,,,s

    0)

    I

    sS

    2k ||

    []kkIj j(h((s, []k20 ), []k1k1))= (, )

    s Synch(s)

    s

    (S,I,O,,,s0) I

    s1, s2

    S

    j

    {U, L

    }

    s1 s2

    j

    Synch(s1) Synch(s2) j(s1, )=j(s2, )

    s1 s2 j s1

    s2 j s1 s2

    s1 s2 s1ss2

    s1 ss2

    M1 = (S1, I , O , 1, 1, s0) M2 = (S2, I , O , 2, 2, q0)

    S1S2 = M1M2 = (S1S2,I,O,,,s0)

    s S1 (s, i) = 1(s, i) (s, i) = 1(s, i) (s, i) = 2(s, i) (s, i) =2(s, i) M1sM2 s0s q0 M1 M2

    r

    M1 M2

    W

    (S,I,O,,,s0)

    I

    sS

    (s, ) =s

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    39/204

    (s, .) ={

    (s, ).((s, ), )|

    I ,

    I

    }

    W ={I|s1, s2S, s1=s2: (s1, )=(s2, )}

    Ik

    (s1, )= (s2, )

    k

    k

    k

    k

    k

    k

    P

    Z

    m

    n

    Z= (I0.W) (I1.W) . . . (Imn.W)

    T =P.Z

    Wp

    Wp

    +

    W

    W

    Wi

    si

    P

    T =

    iIS

    Pi.Wi IS

    Pi P

    si

    s

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    40/204

    F SM = (S,I,O,,,s0)

    U IO

    s S

    t S, t= s

    (s,in())=(t,in())

    in()

    P

    W

    Wp

    (S,I,O,s0, T r)

    W

    S1, . . . , S z

    SdS

    Sj S Sdj = Sj Sd

    s S

    F(s)

    i/oF(s) iI oO

    Sk r 1 k z i/o

    s

    Sk |S| |Sdk | + 1

    Fi(s) F(s) Fi(s) = {i

    I

    |i/oF(s)}

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    41/204

    T(

    i, F

    i(s))

    i

    Fi(s)

    T =

    sjSd

    T(j , Fi(sj))W

    sjSd j

    Fi(sj)

    r

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    42/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    43/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    44/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    45/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    46/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    47/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    48/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    49/204

    k

    pkij =ij ij

    hNi(ih ih)

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    50/204

    Ni i ij

    i

    j

    ij ij ij = 1/dij

    dij

    ij (1)ij +

    kANTS(k,ij) ij

    i

    j

    (0, 1)

    k,ij

    k

    i

    j

    k,ij =

    Q/Lk si el ciclo de la hormiga k contiene la arista ij

    0 en cualquier otro caso

    Q

    Lk

    x

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    51/204

    a

    b

    c

    e

    d

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    52/204

    T0

    U(0, 1) < eE(s)E(s)

    T

    U(0, 1)

    E(s)

    E(s

    )

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    53/204

    T T

    T T

    [0.8, 0.99] T T01+log(k) k

    T T01+k

    d

    i

    Vi = (vi1), vi2, . . . , vid

    Xi = (xi1, xi2, . . . , xid) i

    Pi = (pi1, pi2, . . . , pid)

    g

    Pg = (pg1, pg2, . . . , pgd)

    xijxij+ vij

    vijvij+ 1 U(0, 1) (pij xij) + 2 U(0, 1) (pgj xgj)

    1 2

    U(0, 1)

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    54/204

    vij vij+ 1 U(0, 1) (pij xij) + 2 U(0, 1) (pgj xgj)

    vijk vij+ 1 U(0, 1) (pij xij) + 2 U(0, 1) (pgj xgj)

    k k k+1= k (0, 1)

    vijK (vij+ 1 U(0, 1) (pij xij) + 2 U(0, 1) (pgj xgj))

    K= 2

    |2(1+2)

    (1+2)24(1+2)|

    d

    P(d) = 1notClimbingFactor notClimbingF actor 1

    0.01

    n

    0.5

    U(0, 1)> P(d)

    Pd(i, j) =

    (i,j)lNi

    (i,l) si jNi0 en cualquier otro caso

    (i, j) = altitud(j)altitud(i)distancia(i,j) Ni i

    U(0, 1)P(d)

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    55/204

    Pd(i, j) =

    (i,j)total si jDi/|(i,j)|

    total si jUi

    total si jFi0 en cualquier otro caso

    Ni= DiUiFi Di i Ui

    i Fi i

    [0, 1]

    [0, 1]

    altitud(i) = altitud(i)erosion(i, j)

    erosion(i, j) = paramErosiontamGotacosteSolucion (i, j)

    altitud(i) =

    altitud(i) +paramSedim tamGota

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    56/204

    +

    +

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    57/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    58/204

    +

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    59/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    60/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    61/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    62/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    63/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    64/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    65/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    66/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    67/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    68/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    69/204

    +

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    70/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    71/204

    +

    +

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    72/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    73/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    74/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    75/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    76/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    77/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    78/204

    +

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    79/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    80/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    81/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    82/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    83/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    84/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    85/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    86/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    87/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    88/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    89/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    90/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    91/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    92/204

    A

    A ={a|a A}

    a= a

    L=A A

    Act = L {}

    P a P

    Q

    a Q

    P|Q P|Q

    K

    P ::= K .P

    iIPi P|P P[f] P\L

    K K

    Act .P

    P

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    93/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    94/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    95/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    96/204

    I = IU

    IL

    I

    U

    IL

    U

    L

    IU IL=

    O= (OU {}) (OL{}) \ {(, )} OU OL

    U

    L

    OU OL=

    : S IS

    : SI S

    : S

    I

    O

    : S I O

    s0S

    (S,Mem,I,O, , , s0, m0)

    S

    M em

    I

    O

    : M em IO M em

    : S P(S)

    : S S

    s0S

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    97/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    98/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    99/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    100/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    101/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    102/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    103/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    104/204

    +

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    105/204

    +

    +

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    106/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    107/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    108/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    109/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    110/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    111/204

    +

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    112/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    113/204

    +

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    114/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    115/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    116/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    117/204

    A formal methodology to specify hierarchical agent-based systems

    Csar Andrs, Carlos Molinero, and Manuel Nez

    Dept. Sistemas Informticos y Computacin

    Facultad de Informtica

    Universidad Complutense de Madrid, 28040 Madrid, Spain

    e-mail: [email protected], [email protected], [email protected]

    Abstract

    In this paper we introduce a formal framework to spec-

    ify agent-based systems where each agent is specialized ina single task that will be fulfilled by making calls to other

    simpler agents. In other words, we are interested in systems

    that can perform a task by subdividing it in easier tasks

    and by using the knowledge about each agent already in-

    troduced in the system. The idea is to prefabricate a basic

    structure that can be reused by either changing the main

    goal or by adding several different specialized agents.

    The main characteristic of our methodology is that each

    complex agent contains a schematic definition of other

    agents. Each agent is thus able to retain and produce cer-

    tain information, such as the time needed to accomplish a

    certain task, taking into account a given set of agents and

    resources. This allows to quickly produce information re-

    garding the necessities in resources and derive the demands

    to other subsystems.

    In order to increase the applicability of our approach,

    we have fully implemented a tool that allows us to graphi-

    cally specify complex systems. In addition, the tool allows

    us to simulate the behavior of the specified systems so that

    some interesting properties, such as starvation and maximal

    progress, can be studied.

    1 Introduction

    The representation and study of communities where in-

    telligent (electronic) agents replace their (human) owners is

    a topic that has attracted a lot of interest. In particular, there

    is ongoing research in technologies able to model users by

    means of agents which autonomously perform electronic

    transactions (see [9] for a survey on the topic). In order

    to increase the power of these agents they must know the

    Research partially supported by the Spanish MEC project WEST-

    /FAST (TIN2006-15578-C02-01) and the Marie Curie project TAROT

    (MRTN-CT-2003-505121).

    preferences of the corresponding user. In this line, the con-

    cept ofutility functionis very useful. Essentially, a utility

    functionreturns a real number for each possible basket of

    goods: The bigger this number is, the happier the owneris with this basket. Intuitively, agents should appropriately

    simulate the systems that they are representing by consid-

    ering the utility function that would establish the expected

    behavior (see e.g. [25, 7, 6, 14, 19, 12]). In fact, there ex-

    ist several proposals showing how agents can be trained to

    learn the preferences of users (see e.g. [2, 6, 26]). Besides, a

    formal definition of the preferences of the user provides the

    agent with some negotiation capacity when interacting with

    other agents [13, 26, 17]. Let us remark that, in most cases,

    utility functions take a very simple form. For instance, they

    may indicate that an agent Ais willing to exchange the itemaby the itemsb andc.

    Even though there are general purpose formalisms to for-

    mally describe complex concurrent systems (such as pro-

    cess algebras [11, 21, 3] or Petri Nets [4, 5]) they are not

    suitable to describe agents since these languages and no-

    tations do not provide specific operators to deal with the

    inherent characteristics of agents. However, there has been

    already several studies to formally describe the use of in-

    telligent electronic agents that are nested into one another

    (see, for example, [15, 16] for two approaches based on

    Petri Nets and automata, [22, 23] for approaches based on

    process algebras, and [24, 20] for approaches based on finite

    state machines). Most of these approaches have been cre-

    ated in favor of comprehensibility. Therefore they facilitateto derive and apprehend new properties.

    Even though there are already several formal approaches

    to describe the systems that we are interested in, our expe-

    rience shows that there is a need for another viewpoint to

    confront this problem. If we try to incorporate the base of

    facts to a system, there will always be a lack of capacity

    to implement every possible structure of the agent, every

    different solution to the same problem, and every combina-

    tion of small pieces that constitute a complex problem. This

    is the reason why we think that there is a need for a new

    2008 IEEE International Conference on Signal Image Technology and Internet Based Systems

    978-0-7695-3493-0/08 $25.00 2008 IEEE

    DOI

    169

    2008 IEEE International Conference on Signal Image Technology and Internet Based Systems

    978-0-7695-3493-0/08 $25.00 2008 IEEE

    DOI

    169

    2008 IEEE International Conference on Signal Image Technology and Internet Based Systems

    978-0-7695-3493-0/08 $25.00 2008 IEEE

    DOI 10.1109/SITIS.2008.70

    169

    2008 IEEE International Conference on Signal Image Technology and Internet Based Systems

    978-0-7695-3493-0/08 $25.00 2008 IEEE

    DOI 10.1109/SITIS.2008.70

    169

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    118/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    119/204

    TYPE CONTENT

    1 Information

    2 Negotiation

    3 Proposal message4 Acceptance message

    5 Hiring message

    6 Job started message

    7 Job finished message

    LetIDbe a set of agent identifiers. Amessageis a tuple(T,s,d,c,t ,D,Z ), where Tis thetypeof message, s I Dis the agent source of the message, d ID {} is theagent destination of the message ( represents a broadcastmessage) c Stringrepresents the string of characters con-taining the message,t is the information regarding the timethat it takes an agent to perform a task,Dis the information

    of the necessary conditions to start the task and Z is thetransformation of resources function that the agent emitting

    the message applies to its set of resources.

    We denote by the empty message. We denote by Mthe set of all messages.

    3 Definition of the formalism

    In this section we present our formal language to spec-

    ify complete systems as well as all the agents taking part in

    them. The main idea consists in having a worldthat is com-

    posed of communication cellules. These components will

    be interconnected in a hierarchical way, that is, the maincommunication cellule will hold the main agent while each

    of the next communication cellules will hold simpler agents.

    This process is iterated until we reach the last level that will

    hold only atomic agents.

    We will make a distinction between generic agents, that

    is, agents fulfilling a complex task (which will be done by

    calling other agents) and atomic agents, which are basic

    agents in charge of executing simple tasks. This distinction

    is merely represented as a different set of variables taken

    from the same general definition of an agent. Agents will

    send messages using communication cellules. These cel-

    lules will forward these messages to other cellules that will

    broadcast them to the agents under their control, until the

    final atomic agent is reached. Then, an atomic portion of

    the global goal will be produced through the transformation

    of resources that this atomic agent performs.

    Each agent will have a different utility function, as de-

    fined in the previous section, depending on the utilitythat

    each of the resources represent for the specific agent. This

    function will take into account different combinations of re-

    sources to decide which task should be performed.

    We will start by defining the simpler element in the sys-

    tem, the agents, and scale up in complexity to define the

    complete system.

    s0

    s1

    sf

    transin1

    transin2

    transin3

    Figure 1. A generic agent.

    Definition 3 We denote by A the agent domain; a1, . . . , anwill be used to denote elements ofA. We consider a setIDcontaining all the agent identifiers.

    An agent is a tuple

    (id,S,s0, sf, R, V, Tex, Tin,ib,ob, )where

    id I Dis theagent identifier.

    Sis theset of states.

    s0 Sis theinitialstate.

    sfSis thefinalor goalstate.

    Ris theset of resourcesof the agent.

    A valuationis a function : R IRm+ , being|R| =m, that returns the current value of each variable. Wedenote by Val(R) the set of all valuations R . V Val(R)is the initial valuation of the agent.

    Tin SI D IR+ S(Val(R)) Val(R)is the set of internal transitions. The set of external

    transitions must fulfill the following restrictions:

    | Tin

    | 1.

    If|Tin|= 1, that is Tin= {(s1, id, t , s2, D , Z )}thenid =id.

    If | Tin| >1 then for all (s1, id, t , s2, D , Z )Tinwe haveid =id.

    Tex M (M) (M) is the set of externaltransitions.

    ib,ob (M) are the input and output buffers, re-spectively. We will use them to receive incoming

    messages (ib) and to send outgoing messages (br).We can use the functions Choose : (M) M,

    171171171171

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    120/204

    Remove : (M) M (M) and Concat :M (M)(M), having the expected meaning,to manage buffers.

    : Val(R)IR+ is the utility function of the agent.

    Intuitively, an internal transition (s1, id, t , s2, D , Z ) Tin is a tuple where s1 is the initial state, s2 is the fi-nal state, id identifies the agent assuming the transition1,t IR+ is the time2 consumed to perform the transition,D Val(R) denotes a subset over the set of valuationsthat denotes which valuations allow the transition to occur,

    that is, the transition can be performed only if the current

    valuation belongs to this set, and Z : Val(R) Val(R)

    is the transformation of resources produced by this tran-sition. We write s1

    id,t,D,Z in s2 as a shorthand of

    (s1, id, t , s2, D , Z ) Tin.

    External transitions are tuples

    (m,oborigin, ibdestination) where m is the messagebeing transmitted containing all the necessary information,

    oborigin is the output buffer of the agent/communicationcellule that originates the message and ibdestination is theincoming buffer of the communication cellule/agent that

    receives the message. Let us remember that a messagedenotes a broadcast message, that is, a message that will be

    transmitted to all agents belonging to the destination cel-

    lule. We writeoboriginmexibdestinationas a shorthand

    of(m,oborigin, ibdestination) Tex.In Figure 1 we show a graphical representation of a

    generic agent. Next, we introduce some auxiliary concepts

    that will be useful to describe the evolution of agents.

    Definition 4 An agent is called atomic if it is in charge

    of executing a single task. Formally, we use a function

    atomic : A Bool, such that for all a = agentwe haveatomic(a) = ( | Tin| = 1).

    In order to have the current state of an agent we specify

    its configuration as an element belonging toS Val(R) (M) (M). Configurations are modified through theperformance of either internal or external steps:

    Internal stepof the system:

    Given a configuration M = (s, V,ib,ob), an internal

    transitions1id,t,D,Z

    ins2 will be triggered ifD(V)andwill modify the configuration to(s2, Z(V),ib,ob).

    External stepof the system:

    1Ifid = id then we are considering an atomic agent that is itself in

    charge of performing the transition2This value will be defined by default only for atomic agents since

    complex agents will calculate the associated time from the information

    collected from the contracts with other agents. In addition to consider the

    sum of all the involved time values, we have to take into account the time

    that it takes to perform communications among agents.

    Given a configuration M = (s, V,ib,ob)and another one M = (s, V, ib, ob) belong-ing to a second agent, an external transition

    (m,oborigin, ibdestination) Tex will modify theconfigurations to M = (s, V,ib, Remove(ob,m)) andM = (s, V, Concat(m,ib), ob).

    Agents are grouped into communicationscellules. These

    structures are useful to organize, connect, and produce in-

    dependent agents of different complexities. The need for

    this kind of organization is clear if we take into account the

    fact that when making a call to find an agent that fulfills

    the considered activity, if they would be grouped into the

    same structure, all agents, either atomic or complex, would

    answer the request, forcing the new agent to consider too

    many possibilities and therefore making the system unus-

    able. The communication cellules allow to first ask morecomplex agents and then if none knows how to answer then

    the request will go on to next level, having agents of a

    greater simplicity.

    Definition 5 A communication cellule is a tuple

    (l,A,ib,ob), where

    l IN denotes the level of the cellule: Higher levelsindicate more complex tasks.

    A A is the set of agents associated with this cellule.

    ib, ob (M)are the incoming and outgoing buffers,

    respectively. We will use the functions introduced in

    Definition 3 to manage them.

    The set of all communication cellules is denoted by C.

    Let us remark that when an agent is added to a cellule,

    the incoming buffer of the agent is connected to the out-

    going buffer of the cellule, while the outgoing buffer of

    the agent is associated with the input buffer of the cellule.

    This means that an agent does not send messages to another

    agent; it sends them to the associated cellule. Similarly, an

    agent receives messages only from the cellule to which it is

    attached. A graphical representation of this can be seen in

    Figure 2 where we can observe several agents connected to

    the celluleC.In the next definition we introduce the concept of world,

    that is, a set of cellules interconnected in the appropriate

    way.

    Definition 6 We say that the tuple W = (CW, FW, SW)is a world ifCW C is a set of cellules, and FW, SW :CW CW{} are two injective functions such that givena celluleCwe have that FW(C)(resp. SW(C)) returns thefather (resp. son) ofC. If a cellule does not have a father(resp. son) then the special symbolwill be returned.

    172172172172

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    121/204

    agent3

    agent1 buffers

    agent2

    transexia3

    transexoa3

    transexoa1

    transexia1

    transexoa2

    transexia2

    Figure 2. Communication cellule.

    C1 C2 C3

    transex

    12

    transex21

    transex

    23

    transex32

    Figure 3. World.

    In order to have meaningful worlds, we suppose that

    for all C, C CWwe haveFW(C) = C if and only ifSW(C

    ) = C. Moreover, we also assume that FW, through

    transitivity, induces a total lineal order.

    Let us remark that the previous conditions on worlds im-

    ply that we have a linearstructure of cellules. In particular,

    SWwill also induce a linear order. Moreover, if our worldcontains more than one cellule, we also have that there are

    exactly two cellules C, C CWsuch that FW(C) =andFS(C) = . In Figure 3 we show a graphical representa-tion of a world including three cellules.

    4 The A\ tool

    In this section we briefly describe the A\ tool. In the

    previous section we have presented a modular frameworkthat has the capability of expressing constraints, specifica-

    tions, agents, cellules, and resources. The A\ tool, facili-tates the definition of systems so that a user of our method-

    ology can abstract most of the mathematical technicalities

    needed to define a system/world. We illustrate the behavior

    of the most relevant phases of the framework by following

    an example from scratch.3 First we will show how we can

    create a new world, assigning resources, agents, cellules,

    etc. Second, we will see the communication among agents,

    in order to obtain resources, subcontract other agents, etc.

    Finally we will show how we achieve the proposed goal.

    In order to start the simulation, a preliminary phase is

    necessary to create the world, the cellules, and the agents.

    We create the world called Complutense and inside it we

    add three different Cellules (C1, C2, C3) with some agentsin them. In Figure 5 we can observe howA\ shows thegenerated world as well as an agent of this world. The set

    of agents that we have introduced in the system is defined

    in Figure 4.

    As we can observe in the table, agent15 is an atomicagent because it is in the lower level of the cellules and,

    according to the definition of level, this cellule can only

    have atomics agents; an atomic actions only goes from sntosn+1. The values that are in the fifth column representthe money and the time. Even though there are other re-

    sources involved in the system we have only represented

    these two resources since they are the most relevant for our

    example.Complutenserepresents a world where agents

    can build houses. We have subdivided the task ofbuilding

    in six states. In Figure 6 we give a description of each of

    these states.

    Once the world is created, we start with the second

    phase. We generate the connections that are in charge of

    3Even though this is a toy example, so that we can concentrate on the

    main features of the tool, we have already tested our tool with some more

    complex examples. However, as we indicate in the last section of the paper,

    we still need to use our tool to specify arealsystem.

    173173173173

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    122/204

    NAME LEVEL INITIAL RESOURCES GOAL

    agent1 1 s1 (410, 290) s6agent2 1 s1 (370, 340) s6

    agent3 2 s1 (175, 151) s3agent4 2 s1 (220, 241) s4agent5 2 s1 (312, 287) s5agent6 2 s2 (149, 150) s4agent7 2 s2 (224, 159) s5agent8 2 s2 (220, 176) s6agent9 2 s3 (231, 148) s6agent10 2 s4 (149, 101) s6

    agent11 3 s1 (70, 100) s2agent12 3 s2 (75, 50) s3agent13 3 s3 (72, 68) s4agent14 3 s4 (72, 35) s5agent15 3 s5 (72, 43) s6

    Figure 4. Agents in the world.

    Figure 5. Phase 1 inA\

    s1 s2 s3 s4 s5 s6t12 t23 t34 t45 t56

    s1 :money.s2 :money+land.s3 :money+land+plan.s4 :money+land+plan+construction materials.s5 :money+land+plan+construction materials+worker.s6 :money+land+plan+construction materials+worker+house.

    Figure 6. Global task.

    Figure 7. Phase 2 inA\

    telling the agent that it has reached a certain state or to al-

    low the agent to move to a new state (and, subsequently,

    call the next agent to perform the new task). We try to let it

    solve a certain task. This phase is presented in Figure 7.

    Firstagent1 andagent2 send a message. Both of themneed to move from state 1 to state 6, but agent1owns moremoney thanagent2 while it has less time to reach its goal.So, we expect thatagent1 will find a faster, although moreexpensive, way to proceed thanagent2.

    We will show the decision that agent1 takes in order to

    obtain a faster path. Theagent2follows a similar process toagent1. The first message fromagent1 has type=1, that is,information, and it is a broadcast message to another com-

    munication cellule. This message is used to look for all

    agents in that cellule that have the same final state. This

    first message is sent fromC1 to C2.

    The agentsagent8,agent9andagent10obtain their goalwhen they reach state s6. All of them answer to the previousmessage by sending information concerning their amounts

    of resources. After receiving the answers, agent1 startsbuilding a tree in order to decide the best path to the goal.

    Nowagent1asks, by sending a broadcastmessage to C2,which agents have as goal state s2,s3 ands4. These mes-

    sages flow throughC2. We have thatagent4, agent6, andagent3 will answer with messages sending s1, s1 and s2.Respectively because the initial state ofagent1iss1, it onlyhas to obtain one possible way fors2.

    In the final step of this phase agent1 sends toC2 a mes-sage asking for agents whose goal is s2. No agents willanswer to it. TheA\ tool has a timeout module whichsends an internal transition foragent1denoting that nobodyis going to answer this last message. When this timeout is

    sent,agent1 starts to decide which path it prefers to followaccording to its utility function.

    In phase 3 we have the situation described in Figure 8.

    174174174174

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    123/204

    Figure 8. Phase 3 inA\

    First, agent1 has all the possible paths to achieve its goal

    already displayed in front of him. By applying its utilityfunction, as an example = 3 money+ 1/timewhichwill give for path agent3+agent9a value of 1218.00and forthe other path (agent4+agent10) a value of 1107.00, there-fore this agent decides that the best way is to step through

    s3. So, it callsagent3 to start its internal processes. Then,agent3 will then restart the whole process until it finallycallsagent11 which is an atomic agent. Therefore, it willstart to transform the resources by taking part of the money

    (ins1) and transforming it into land (reachings2).

    5 Conclusions and future work

    In this paper we have presented a formalism to represent

    complex hierarchical systems where tasks can be distributed

    and/orsubcontractedamong agents. We are aware that our

    formalism is difficult to use since there are a lot of mathe-

    matical machinery underlying the definition of our systems.

    Thus, we have decided to build a tool that fully implements

    our methodology. In this way, a user of our methodology

    does not need to pay attention to the formal details and can

    concentrate on defining the appropriate hierarchical struc-

    ture.

    There are at least two lines for future work. On the

    one hand, there is a lot of room to continue the theoretical

    study. In particular, we can exploit the trace relation be-tween agents so that we can define a conformance relation

    to determine whether a real system correctly implements

    one of our worlds. On the other hand, more practical, we

    have used our tool only with small/medium size examples.

    We are working on the complete definition of a realsystem

    by using our tool. Specifically, we are considering [1] as a

    non-trivial system to be described in our tool.

    175175175175

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    124/204

    References

    [1] C. Andrs, M. Merayo, and M. Nez. Formal development

    of a complex information system. In3rd Int. Conf. on Sys-

    tems, ICONS08, pages 118123. IEEE Computer Society

    Press, 2008.

    [2] F. Bacchus and A. Grove. Graphical models for preference

    and utility. InUncertainty in Artificial Intelligence, UAI95,

    pages 310. Morgan Kaufmann, 1995.

    [3] J. Bergstra, A. Ponse, and S. Smolka, editors. Handbook of

    Process Algebra. North Holland, 2001.

    [4] W. Brauer, W. Reisig, and G. Rozenberg, editors. Petri

    Nets I: Central Models and Their Properties. LNCS 254.

    Springer, 1987.

    [5] W. Brauer, W. Reisig, and G. Rozenberg, editors.Petri Nets

    II: Applications and Relationships to Other Models of Con-

    currency. LNCS 255. Springer, 1987.

    [6] M. Dastani, N. Jacobs, C. Jonker, and J. Treur. Modelling

    user preferences and mediating agents in electronic com-

    merce. InAgent Mediated Electronic Commerce, The Eu-

    ropean AgentLink Perspective, LNCS 1991, pages 163193.

    Springer, 2001.

    [7] T. Eymann. Markets without makers - a framework for de-

    centralized economic coordination in multiagent systems.

    In 2nd Int. Workshop on ELectronic COMmerce, WEL-

    COM01, LNCS 2232, pages 6374. Springer, 2001.

    [8] B. Geisler, V. Ha, and P. Haddawy. Modeling user prefer-

    ences via theory refinement. In5th Int. Conf. on Intelligent

    User Interfaces, IUI01, pages 8790. ACM Press, 2001.

    [9] R. Guttman, A. Moukas, and P. Maes. Agent-mediated elec-

    tronic commerce: A survey. The Knowledge Engineering

    Review, 13(2):147159, 1998.

    [10] V. Ha and P. Haddawy. Similarity of personal preferences:

    Theoretical foundations and empirical analysis. Artificial

    Intelligence, 146(2):149173, 2003.

    [11] C. Hoare. Communicating Sequential Processes. Prentice

    Hall, 1985.

    [12] J. Keppens and Q. Shen. A calculus of partially ordered

    preferences for compositional modelling and configuration.

    In AAAI Workshop on Preferences in AI and CP: Symbolic

    Approaches, pages 3946. AAAI Press, 2002.

    [13] S. Kraus. Negotiation and cooperation in multi-agent sys-

    tems. Artificial Intelligence, 94(1-2):7998, 1997.

    [14] J. Lang, L. v. Torre, and E. Weydert. Utilitarian desires. Au-

    tonomous Agents and Multi-Agent Systems, 5(3):329363,

    2002.

    [15] I. Lomazova. Communities of interacting automata for mod-

    elling distributed systems with dynamic structure. Funda-

    menta Informaticae, 60(1-4):225235, 2004.

    [16] I. Lomazova. Nested Petri Nets for adaptive process mod-

    eling. In Pillars of Computer Science, Essays Dedicated to

    Boris Trakhtenbrot on the Occasion of His 85th Birthday,

    LNCS 4800, pages 460474. Springer, 2008.

    [17] A. Lomuscio, M. Wooldridge, and N. Jennings. A clas-

    sification scheme for negotiation in electronic commerce.

    In Agent Mediated Electronic Commerce, The European

    AgentLink Perspective, LNCS 1991, pages 1933. Springer,

    2001.

    [18] A. Mas-Colell, M. Whinston, and J. Green.Microeconomic

    Theory. Oxford University Press, 1995.

    [19] M. McGeachie and J. Doyle. Utility functions for ceteris

    paribus preferences. InAAAI Workshop on Preferences in AIand CP: Symbolic Approaches, pages 3338. AAAI Press,

    2002.

    [20] M. Merayo, M. Nez, and I. Rodrguez. Formal specifica-

    tion of multi-agent systems by using EUSMs. In2nd IPM

    Int. Symposium on Fundamentals of Software Engineering,

    FSEN07, LNCS 4767, pages 318333. Springer, 2007.

    [21] R. Milner. Communication and Concurrency. Prentice Hall,

    1989.

    [22] M. Nez and I. Rodrguez. PAMR: A process algebra for

    the management of resources in concurrent systems. In

    21st IFIP WG 6.1 Int. Conf. on Formal Techniques for Net-

    worked and Distributed Systems, FORTE01, pages 169

    185. Kluwer Academic Publishers, 2001.

    [23] M. Nez, I. Rodrguez, and F. Rubio. Formal specifica-tion of multi-agent e-barter systems. Science of Computer

    Programming, 57(2):187216, 2005.

    [24] M. Nez, I. Rodrguez, and F. Rubio. Specification and

    testing of autonomous agents in e-commerce systems. Soft-

    ware Testing, Verification and Reliability, 15(4):211233,

    2005.

    [25] L. Rasmusson and S. Janson. Agents, self-interest and

    electronic markets. The Knowledge Engineering Review,

    14(2):143150, 1999.

    [26] T. Sandholm. Agents in electronic commerce: Compo-

    nent technologies for automated negotiation and coalition

    formation. In 2nd Int. Workshop on Cooperative Informa-

    tion Agents, CIA98, LNCS 1435, pages 113134. Springer,

    1998.

    176176176176

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    125/204

    Combining Genetic Algorithms and Mutation Testing to

    Generate Test Sequences

    Carlos Molinero, Manuel Nez, and Csar Andrs

    Dept. Sistemas Informticos y Computacin

    Universidad Complutense de Madrid, 28040 Madrid, Spain

    [email protected], [email protected], [email protected]

    Abstract. The goal of this paper is to provide a method to generate efficient and

    short test suites for Finite State Machines (FSMs) by means of combining Genetic

    Algorithms (GAs) techniques and mutation testing. In our framework, mutation

    testing is used in various ways. First, we use it to produce (faulty) systems for theGAs to learn. Second, it is used to sort the intermediate tests with respect to the

    number of mutants killed. Finally, it is used to measure the fitness of our tests,

    therefore allowing to reduce redundancy. We present an experiment to show how

    our approach outperforms other approaches.

    1 Introduction

    Software testing is an expensive and time consuming task. If a formal approach is used,

    tests are derived from a specification. For derived test sets to be complete, the testerneeds to assume a given set of assumptions and hypotheses, allowing to reduce the

    space of the possible implementations. Our intention is to combine GAs and mutation

    testing to create a new approach capable of deriving a test suite that, with a short amount

    of execution time, finds the 95% of the faulty implementations. We call our methodol-

    ogy GAMuT (Genetic Algorithm and MUtation Testing) and it is composed of 3 main

    phases: Learning through evolution, learning through specialization, selection and re-

    duction of the test cases.

    GAs have shown to have a good performance in search and optimization problems.

    There exists a number of papers where GAs are used in testing (e.g.[4,5,2]). They usu-

    ally represent the test data generation problem as an optimization problem and heuris-tics are used to generate test cases. Mutation Testing has been widely used for checking

    the performance in test suites, by measuring its capability to kill mutants, for details into

    applications developed throughmutation testingsee [3,8] for some formal approaches

    and [1] for a critical discussion on its use. We propose to use mutation as a way to

    provide the GA with enough learning examples in an automated way, by modifying

    the specification and subsequently creating simulations of faulty implementations. We

    compile several populations into acommunity. Therefore, each community has several

    populations, with severalinhabitantseach, and each individual has a DNA that directly

    Research supported by the Spanish projects WEST (TIN2006-15578-C02-01) and MATES(CCG08-UCM/TIC-4124).

    J. Cabestany et al. (Eds.): IWANN 2009, Part I, LNCS 5517, pp. 343350, 2009.

    c Springer-Verlag Berlin Heidelberg 2009

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    126/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    127/204

    Combining Genetic Algorithms and Mutation Testing to Generate Test Sequences 345

    an outputo = o, and by returning the FSMM = (S,I,O, T r, s0)such thatT r =

    Tr\{tr}{tr}, where tr = (s, s, i , o). The application of the operatormoper2to Mproduces a mutant by choosing a transition tr = (s, s, i , o) TRand a state s = s,and by returning the FSM M = (S,I,O, T r, s0)such that T r = T r\{tr} {tr},wheretr = (s, s, i , o).

    A usual problem in mutation testing is that the application of mutation operators may

    produce an equivalent mutant, that is, a mutant equivalent to the specification. There-

    fore, when applying mutation testing it is normal that tests do not kill all the mutants

    since some of them (the equivalent ones) are not even supposed to be killed.

    GAs are an AI technique that uses metaphors of mechanisms present in nature for

    organism to develop, adapt and reproduce, to try to survive in the system in which

    they act and live. Its main operators are mutation, reproduction (genetic crossing) and

    selection of the fittest individuals. GAs are a good method to use with black-box testing

    since if we do not have any information regarding the internal structure of the IUT,

    then the testing problem can be expressed as a search problem, guided by a heuristic.In our case, the search space is the set of all possible implementations that may have

    mutated from the given specification. GAs can adapt themselves to find this optimum,

    as long as the fitness function is correctly defined. Let us note that if we were to leave a

    genetic algorithm running indefinitely, the whole population will converge to the same

    inhabitant, that would be the one that maximizes the fitness function.

    3 Description of GAMuT

    Next we describe our GA. Since we do not want to find a single solution and for the

    sake of genetic diversity, we have added another component to usual GAs: A community

    holds several populations, having in turn several inhabitants. We do not allow genetic

    crossing between populations. This can be seen as a parallelism to what is sometimes

    called in the literature species. An inhabitant of a specific population has a DNA se-

    quence that is formed by genes, that codifies the test to be applied. The value that each

    gene can take is any inputi I. The DNA sequence can be modified through mutationand recombination, that is, by mating of two inhabitants. In addition, it can also mutate

    the length of its sequence. The community holds the specification that we are trying to

    check as well as a set of examples of mutated specifications that we will call exIUT, and

    each population holds a mutated IUT specific for it, used in the specialization phase.In order to initiate our algorithm, all genes are randomly initialized, so that a random

    number of gens is available for each possible DNA. The size of the population, the

    number of populations, and the fitness function are decisions to be made by the tester,

    that has to take into account the number of states of the machine. An example of fitness

    function used in GAMuT is shown in Section 4. The search finished by two means,

    one will be to reach the maximum number of generations specified for the GA, the

    other is that the test sequences are able to detect a specific percentage of the faulty

    IUTs. We count with two mutation operators for DNA: To change the value of one

    or more gens and to modify the length of the DNA sequence. DNAs can be modified

    also by combining them with the DNA of another inhabitant through mating. In ourapproach we have used a single point crossover, with random position for the division.

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    128/204

    346 C. Molinero, M. Nez, and C. Andrs

    As usual, we will useelitismas a way to control that only the best solutions actually get

    to mate and reproduce. We will use theroulette wheelselection technique that allows

    to choose the inhabitants in a proportional scale to its fitness. In our case, we also add

    after reproduction the original set of elected best inhabitants from the population, not

    to loose solutions. In order to decide who are the best, we find the top/lowest fitness

    scores, and we take a percentage of the top to be chosen as the best.Our algorithm is divided into several phases that are graphically represented in

    Figure 1. These phases are:

    Fig. 1.Scheme of our approach

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    129/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    130/204

    348 C. Molinero, M. Nez, and C. Andrs

    Fig. 2.Example of specification

    We mutate the value of various genes simultaneously, being the number of mutations

    randomly chosen, but proportionally to the inverse of its fitness function, that is, n =random

    [1,n

    g/3]f , beingn the number of genes modified, ng the total number of genes,andfthe value given by the fitness function.

    There are two fitness functions: One for theevolutionphase and another one for the

    specializationphase.

    1. Fitness for evolution:f = |mutantskilled| 100|mutants| is the percentage of mutant imple-mentations, for which an inhabitant finds an error.

    2. Fitness for specialization:f = e l , wheree is equal to1 if an error is found,andl is the length of the genetic sequence starting to count from the point where

    the error is found; otherwise, starting to count from the beginning of the sequence,

    and0 1 is its weight. This heuristic tries to approximately find the shortesttest sequence that detects an error in the IUT that we are checking.

    Mating is done through selection with the roulette wheelselection technique and it

    uses a single pointcrossoverfor DNA reconversion.

    In order to check convergence in the evolutionstep, we take into account the fittest

    individuals from each population, and consider them as a test suite, that is applied to

    the number of learning IUTs. If the total number of killed mutants is over85%, then weallow the program to continue towards its next step. For the specializationphase we set

    finding75% of the errors as a good number to stop the algorithm and go to the selection

    process. This number does not represent the mutants that the set will kill, but how manyof the test found an error in a specific IUT. Obviously, these values can be modified

    to find fitter tests, but our experience shows that these limits behave good enough. If

    convergence is not reached before the total number of generations allowed, then the

    system stops the process and continue with its next step.

    In order to compare our methodology we have implemented a random testing tool.

    Random testing is a technique argued to be as valid as any other testing technique (see

    [7,9,6]). As we can see in Figure 3, the test suite resulting after selection is the shortest

    one and detects up to94.6% of mutants as faulty. Compared to the randomly generatedtest suite, it outperforms it both by number of mutants killed and by having a shorter

    test sequence. Even though to produce our test suite takes more time than a randomgeneration, the extra performance of our approach to find errors, even though not very

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    131/204

    Combining Genetic Algorithms and Mutation Testing to Generate Test Sequences 349

    Fig. 3.Killed mutants/length of test sequence

    significant, is worth the additional computations. Actually, the time spent in testing is a

    valuable asset. Thus, we have to minimize the number of applied tests (in other words,the length of the test suite) even if we have to make additional off-line computations, that

    are very cheap when compared to the cost of testing. Actually, in order to test a system

    we usually have to stop it. Thus, the more time the system is halted, the most expensive

    the testing process is, since the system cannot be producing what it is supposed to

    produce. In the case of the evolution and specialization test suites, they are between1%and 2% below in test coverage (i.e. in proportion of killed mutants) because we have

    chosen the best tests of both test suites, and they are a lot longer to apply due to their

    high redundancy on the kind of errors found. This is even so if we eliminate, from the

    selected tests, those that kill under1% of the mutants, because the time to apply thosetests, compared to the benefits of the number of mutants detected, makes it not worthy

    to retain them in the final test suite.

    5 Conclusions and Future Work

    The results after experimentation with the implementation of GAMuT have led us to

    claim that the existence of these different phases is crucial. GAMuT combines the evo-

    lution as a massive learning process (thanks to mutation testing techniques), in which

    we try to reach a maximum, and a more local search, specialization, that creates ele-

    ments in a more sophisticated way by creating a variety of viewpoints, seen as geneticdiversity, that confronts the same problem. It is also important to remark the order in

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    132/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    133/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    134/204

    348 C. Andrs, C. Molinero, and M. Nez

    describe agents since these languages and notations do not provide specific operators

    to deal with the inherent characteristics of agents. However, there has been already sev-

    eral studies to formally describe the use of intelligent electronic agents that are nested

    into one another (see, for example, [2,3] for two approaches based on Petri Nets and

    automata, [4,5] for approaches based on process algebras, and [6,7] for approaches

    based on finite state machines). Most of these approaches have been created in favorof comprehensibility. Therefore they facilitate to derive and apprehend new properties.

    However, due to its complexity, these formalisms are not supported by suitable user-

    friendly tools. Thus, the specification of a system is a task that cannot be carried out by

    somebody that is not a real specialist in formal methods.

    Our approach is able to assimilate the systems that we are interested in to a common

    placesstructure in which one is able to locate the rest of the structure from higher order

    points. If we use the subway lines as a metaphor, we only need to know the location of

    the different stations, but the exact location of that small fruit shop that we are trying

    to reach is bounded to the location of the closest metro station. Once we arrive to that

    particular metro station, we will check the neighborhood map so that we can find the

    shop; we do not need to know in advance all the local maps associated with all the

    stations of the network. This is how our systems will work: Once we have all the atomic

    agents, each time that a new complex agent, embracing the knowledge of several atomic

    agents, is created we will refer to this new agent when making subsequent calls to the

    system. In this line, we are able to forgethow atomic actions are performed because

    we have a higher order element to which we can call upon. In any case, even with a

    complex structure, atomic agents are still the ones that executerealtasks.

    Using another metaphor we could say that our approach produces systems that are

    similar to economic structures in which there exist intermediate agents that gives us theresult of the transformation of resources as a final product. These agents, in a hidden

    way, contract the prime manufacturers that create these resource transformations. An-

    other point in favor of our approach is that it allows us to have an unbounded growth

    (equivalently, subdivisions as small as needed) either by adding agents in between ex-

    isting ones or by assigning new atomic agents to the system that we had before. It is

    important to note that the way our systems are subdivided, in so called communication

    cellules, facilitates their deployment in a distributed system in which one can obtain a

    perspective of variable magnitude of the global tasks. This holds as long as we keep the

    hierarchical structure of the ensemble.

    The rest of the paper is organized as follows. In Section 2 we introduce some auxil-iary notation. Section 3 represents the bulk of the paper. There we define the syntax of

    the proposed formalism, giving a running example of a system implemented with our

    tool. In Section 4 we briefly describe the technical details of the architecture of the tool

    developed to specify the systems. Finally in Section 5 we present our conclusions.

    2 Preliminaries

    In this section we introduce some notation that will be used throughout the rest of the

    paper. First, since users have different preferences, in order to properly design agents thefirst step consists in expressing these preferences. In order to extract preferences from

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    135/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    136/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    137/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    138/204

    352 C. Andrs, C. Molinero, and M. Nez

    Definition 7. Acelluleis a tuple(A,id, Sons, Father, ib)where

    A IDA is the set of agents that belong to the cellule. id IDC is a unique identifier for this cellule. Sons IDC is the set of identifiers of the sons of this cellule. IfSons = then

    we are in a node cellule.

    Father IDC is the identifier of the cellule that is father of this cellule. If Fa-ther=nillthen we are in the initial cellule, from which all other cellules are de-

    fined. ib M is the input buffer where messages will be stored.

    We denote by Cthe set of all cellules.

    Next, we define the whole system that contains in a tree like structure implicity defined

    by the father-son relationship, the cellules that conform the whole system.

    Definition 8. We say that our system (sometimes called world) is defined with a so

    calledorigin cellulefrom where the tree of cellules hang and by the vector of resources

    available in the system. Therefore, a system is a pairw = (c,x)wherec IDC is theorigin cellule, andxis the set of resources with which we deal in this world x IRn.

    We will use a running example to illustrate previously introduced concepts. In order

    to ease the presentation, we have simplified the real system that we have represented in

    our formalism.

    Example 2. Let us consider that we have the world represented in Figure 1. As we

    observe in the figure, we have six cellules, labeled fromI toV I and eight agents dis-tributed in them. For example, let us consider agent a3 = (id3, ib3, P3).P3 is the setof paths that this agent can perform,ib3 represents the input buffer of this agent and

    id3 is the identifier of this agent. The set of paths P3 contains a unique pair (pair, pathidentifier)P3 ={(< (za, ) >, )}. The path identifier is the first element of the pairrepresents the chain of transitions that compose this path. In this case the path is formed

    by a unique transition. This transition, represents that it is performed bythe path of the agent id3 = VA() and the exchange of resources after performingthis transition is noted by z. This means that the resources of the world will change byapplyingx x+ za, in other words, it will generate a formworkunit, by wasting 50units ofmoney, 40 units ofwood, and 20timeunits.

    For example let us suppose that agent a1 = (id1, ib1, P1) has two different paths.(< (zg, ), (zg, ) >,) and (< (zh, ), (0, ) >, ). Next we explain one of thesepaths. The path identified by, has two transitions in it. The first transition, denoted by

    (zg, ), represents that this agent has to call to the-pathof agent VA()to perform it,and the transformation of resources by applying this transition isx x+zg. Then, afterperforming this transition the resources of the world would change tox x + za+ zg.Let us remember that the agentid3 = VA() transformation function for the path isza. Let us note that the agent performing this transition earns money by calling anotheragent.

    All agents that are notatomicarecomplex, there are two ways to create agents one is to

    insert an atomic agent during the creation of the system and the other is through peti-

    tionsto the system, being the system in charge of recombining atomic and/or complexagents already embedded in the system to create a new complex agent.

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    139/204

    A Hierarchical Methodology to Specify and Simulate 353

    Fig. 1.Representation of a world

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    140/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    141/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    142/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    143/204

    Atlantis Press. Web-Based Information Technologies and Distributed Systems. VOLUME 2.

    Chapter 5

    A formal methodology to specify hierarchical agent-based systems

    Carlos Molinero, Cesar Andres and Manuel Nunez

    Dept. Sistemas Inform aticos y Computaci on

    Facultad de Informatica

    Universidad Complutense de Madrid, 28040 Madrid, Spain

    e-mail: {molinero, c.andres}@fdi.ucm.es, [email protected]

    In this paper we introduce a formal framework to specify agent-based systems in which

    each of the agents is specialized in a single task that will be fullled by making calls to

    othersimpleragents. In other words, we are interested in systems that can perform a task

    by subdividing it in easier tasks and by using the knowledge about each agent already

    introduced in the system. The idea is to prefabricate a basic structure that can be reused by

    either changing the main goal or by adding several different specialized agents.

    The main characteristic of our methodology is that the each complex agent contains aschematic denition of other agents. Each agent is thus able to retain and produce certain

    information such as the time needed to accomplish a certain task taking into account a

    given set of agents and resources. This allows to quickly access information regarding the

    necessities in resources and derive the demands to other subsystems.

    In order to increase the applicability of our approach, we have fully implemented a tool

    that allows us to graphically specify complex systems. In addition, the tool allows us to

    simulate the behavior of the specied systems so that some interesting properties, such as

    starvation and maximal progress, can be studied.

    5.1. Introduction

    The representation and study of communities where intelligent (electronic) agents replace

    their (human) owners is a topic that has attracted a lot of interest. In particular, there is on-

    going research in technologies able to model users by means of agents which autonomously

    perform electronic transactions (see1 for a survey on the topic). In order to increase the

    power of these agents they must know the preferences of the corresponding user. In this

    line, the concept ofutility functionis very useful. Essentially, a utility functionreturns a

    real number for each possible basket of goods: The bigger this number is, the happier the

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    144/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    145/204

    Atlantis Press. Web-Based Information Technologies and Distributed Systems. VOLUME 2.

    A formal methodology to specify hierarchical agent-based systems 95

    that are in charge of executing the actual transformations that will occur in the system.

    Through the recombination of thisatomicagents, new andcomplexagents are created. The

    rst advantage of this approach, is that once theatomicagents are dened little interaction

    from part of the user is needed, as well, the lack of programming abilities will also not be

    a disadvantage. All is needed is to program the underlying specic characteristics of the

    system, that is what this system will be able to handle, by example procedures to call to

    the motors of a robot, and whatever future need of the user will be handled by the system

    itself.

    If we take a look in another direction, we would like to assimilate the systems that we

    are interested in to a common places structure in which one is able to locate the rest of

    the structure from higher order points. If we use the subway lines as a metaphor, we only

    need to know the location of the different stations, but the exact location of that small fruit

    shop that we are trying to reach is bounded to the location of the closest metro station.

    Once we arrive to that particular metro station, we will check the neighborhood map so

    that we can nd the shop; we do not need to know in advance all the local maps associated

    with all the stations of the network. That is how our systems will work: Once we have

    all the atomic agents, each time that a new complex agent, embracing the knowledge of

    several atomic agents, is created we will refer to this new agent when making subsequent

    calls to the system. In this line, we are able to forgethow atomic actions are performedbecause we have a higher order element to which we can call upon. In any case, even with

    a complex structure, atomic agents are still the ones that execute realtasks. Using another

    metaphor we could say that our systems are similar to economic structures in which there

    exist intermediate agents that gives us the result of the transformation of resources as a nal

    product. These agents, in a hidden way, contract the prime manufacturers that create these

    resource transformations.

    Another point in favor of our approach is that it allows us to have an unbounded growth

    (equivalently, subdivisions as small as needed) either by adding systems in between existing

    ones or by assigning new atomic agents to the ones that we had before.

    In order to cope with time and calculation limitations, the system is subdivided into a

    hierarchical structure in which agents are ordered considering its complexity (how many

    agents does it uses to perform a task) and also the eld of knowledge to which that

    specic agent is inserted into. I assume here, that if agents are located correctly into groups

    of related matters, meaning by it that if two agents perform similar tasks, they will be

    inserted together, when the pieces are recombined following the procedure explain later in

    this texts, they will be kept close in the hierarchical tree.

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    146/204

    Atlantis Press. Web-Based Information Technologies and Distributed Systems. VOLUME 2.

    96 C. Molinero, C. Andres and M. Nunez

    This hierarchical structure is implemented through a system of so called cellsthat con-

    glomerate similar agents together. This cells are ordered in a tree structure, which all hang

    from the main cell, every petition will be inserted into the main cell and will be carried on

    down on the tree until it has been processed. This allows too, although it has not been ad-

    dressed in the implementation, the possibility of facilitating a computationallimit, meaning

    that the search could stop after it has descended a limit of levels down in the tree structure,

    if the system needs to take decisions in a certain amount of time that can not be surpassed.

    It is important to note that the way our systems are subdivided, in so calledcommuni-

    cation cellules, facilitates their deployment in a distributed system in which one can obtain

    a perspective of variable magnitude of the global tasks. This holds as long as we keep the

    hierarchical structure of the ensemble.

    In this work, agents are treated as knowledge elements, agents are inserted as new

    abilities that the system can have access to, and then agents are created through the recom-

    bination of these abilities to generate complex tasks. Each agent represents a knowledge,

    each action is therefore identied with a knowledge about that action. When a petition is

    made to the system, it tries to accomplish it by reusing its bits of knowledge. In comparison

    with the human behavior, this is thought as a metaphor of the mirror neurons, discovered

    by chance by the group formed by Giacomo Rizzolatti , Giuseppe Di Pellegrino, Luciano

    Fadiga, Leonardo Fogassi, and Vittorio Gallese at the university of Parma, Italy, while mea-suring the activities of neurons regarding the movement of a monkey. Unexpectedly some

    neurons red not only when the monkey was moving the hand, but also when it looked

    how someone else was moving the hand. These led to a new theory of learning in which

    it is stated that they way humans and other mammals learn is through the neural mimic of

    activities seen in other individuals. Therefore the how-to knowledge and the actual act is

    primarily red by the same neurons.

    The system apprehends more complex concepts in the same way children do, rst as a

    baby you start to involuntary move your muscles, noticing that that makes your arm move,

    with time you learn to control your arm, and the modications that it performs in your

    surroundings, afterwards, as more concepts and experiences (in our system petitions) are

    incorporated, you no longer think about moving the arm but of reaching an object and

    grabbing it. That is, once we know how to perform an action the underlying mechanisms

    are automated, we no longer have to think about them.

    The generic task method states that the structure and representation of domain knowl-

    edge is completely determined by its use (much as it happens in our approach, where con-

    cepts are only derived from the actual task that can be accomplished by atomic agents).

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    147/204

    Atlantis Press. Web-Based Information Technologies and Distributed Systems. VOLUME 2.

    A formal methodology to specify hierarchical agent-based systems 97

    The main problem underlying generic tasks is related to the predetermined problem solv-

    ing strategy that they use (we are able to overcome this situation, since our methodology

    proposes a flexible problem solving strategy, that will vary depending on the kind of atomic

    agents included in the system).

    The rest of the paper is organized as follows. In Section 5.2 we will discuss some of

    the most relevant articles in the eld of agents. In Section 5.3 we introduce some auxiliary

    notation that will be used during the rest of the paper. In Section 5.4 we present the for-

    malism to describe our systems. In Section 5.5 we briefly present our tool and give a small

    example to show its main features. Finally, in Section 5.6 we present our conclusions and

    some lines for future work.

    5.2. Overview of some relevant articles in the eld of agents

    5.2.1. Pattie Maes - The dynamics of action selection

    This paper (23) addresses the problem of choosing an action in an autonomous multi-agent

    system. Actions are chosen following a rational goal oriented fashion, but this approach can

    have conflicting goals, it should be adaptive to new situations, and there exist the possibility

    of a certain component failing, making it harder to reach the nal goal.

    This is done so in the situation of a mindless multi-agent system, such as those ofBrooks subsumption architectures. This systems, although desirable for properties such as

    modularity, distributed behavior, flexibility and robustness lack of a proper action selection

    procedure: which agent should become active? and what are the factors that determine a

    cooperation among certain agents?. The hypothesis presented in this paper are that rational

    action of the global system can emerge, and that there is not the need for bureaucratic

    agents (agents that decide which agent should become active).

    There exist in this framework several parameters to be tuned by the user, allowing to

    have different kind of action selection procedures, such as more/less data oriented, goal

    oriented, deliberated, fast.

    Agents make part of a hierarchical system in the way that the activation of an agent

    is linked in a network of predecessor and successor links, which describe what agents

    should be activated before the current agent that is trying to perform an action. An agent is

    described by the tuple(lp, la, ld,a)where:

    lpis a list of preconditions which have to be fullled before the agent can become

    active.

    laand ldrepresent the post-conditions in terms of a add list and delete list scheme.

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMolinero

    148/204

  • 7/25/2019 Federwin.sip.Ucm.es Sic Investigacion Publicaciones Pdfs Tesis CarlosMol