labs-lang / labs

LAbS: a Language with Attribute-based Stigmergies - Parser + Code generator
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

Support multiple stigmergies #4

Closed lou1306 closed 6 years ago

lou1306 commented 6 years ago

Mockup

stigmergy S1 {
    link = (pos of c1 = pos of c2)

    # This stigmergy hosts the tuple <dirx, diry>
    <dirx: [-1, 1], diry: [-1,1]>
}

stigmergy S2 {
    link = (type of c1 = type of c2)

    # S2 hosts two stigmergic variables, a and b
    a: [-1, 1],
    b: 0..5

}
agent Bird {
    # Maybe now we can remove "interface=".
    # So it would look like this:
    type: 1,
    x: 0..grid,
    y: 0..grid

    # This component participates in both stigmergies
    stigmergies = S1, S2
    behavior = Flock

    # ...
}
lou1306 commented 6 years ago