Re: Re: Example of simple Subsumption architecture

jon klein <[email protected]> Mon, 11 Oct 2004 12:56:55 -0400
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
On Oct 10, 2004, at 9:08 AM, b n wrote:

> I have just begun reading about subsumption
> architectures  and multi-agent systems. However, I am
> still a bit unclear about how to do this using Breve.
>
> Things that I am unsure about are how to structure the
> code and what specific commands to use to indicate
> priority of one layer over the other.
>
> Is there a simple example available that illustrates
> this in BREVE ?

None of the included demos really address subsumption directly, but
I would recommend taking a look at the CaptureTheFlag project
implemented in breve.

http://www.spiderland.org/breve/CaptureTheFlag/

We used this simulation as part of an AI class in the spring, taught
with breve.  Students developed their own strategies to the game,
and then had them compete against each other in a tournament for the
final class.

The winning strategies both employed a kind of subsumption
architecture in which agents choose among a hierarchy of strategies
based on their sensor inputs and internal states.  For example, if
you have the other team's flag, run home.  Otherwise, if you see
the other teams flag, run towards it, etc.  By stringing together
a whole hierarchy of these behaviors, you can create really
effective capture the flag playing agents.

--

The way to structure subsumption in breve is more or less to have
an iterate method with a bunch of if-statements which dispatches
control of the agent to the proper behavior.  Here's what your
iterate code might look like for an agent in our "WUBWorld"
simulation (described a bit more below).

+ to iterate:
	if (self detect-enemy-nearby): {
		self attack-enemy.
		return.
	}

	if (self detect-obstacle-nearby): {
		self avoid-obstacle.
		return.
	}

	if (self detect-food-nearby): {
		self go-towards-food.
		return.
	}

	# and if nothing is detected nearby...

	self wander-around


Here's more information about the class, including another
breve simulation we used to teach about subsumption.  In
the "WUBWorld" simulation, agents have to eat food, avoid
and/or kill enemies and navigate around obstacles.

http://hampshire.edu/lspector/cs263/cs263s04.html


- jon

_______________________________________________
breve mailing list
[email protected]
http://lists.spiderland.org/mailman/listinfo/breve