Re: Questions About Braitenberg

jon klein <[email protected]> Tue, 8 Mar 2005 11:32:56 -0500
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
On Mar 8, 2005, at 10:31 AM, Mithila Patwardhan wrote:

> Hi,
>
> I am a new user of breve. I looked at the Braitenberg tutorial and I 
> am trying to modify the Braitenberg.tz code etc.

The Braitenberg demos are intentionally structured to hide most of the 
details from the user, in order to make it easier for people who are 
using breve for the first time.

> I looked at the code closely and still am unable to understand the 
> following aspects of the code:
> 1. How is the direction of motion of the wheels set everytime ? (I 
> know that on a conceptual level they are supposed to chase / run away 
> from the lights depending on the sensor connections) What I mean is 
> more on implementational level - does the activate method help, or the 
> set-activation-method has anything to do with it...

The iterate method of BraitenbergSensor senses the environment, 
performs a calculation based on sensor input, and then activates the 
wheel with the the computed value.

> 2. the set-activation-method is a point of curiosity. that method has 
> been declared and defined but doesn't seem to be called anywhere in 
> the code at all! From the description in its comments.

set-activation-method allows the user to override the default behavior 
of the sensor.  The default behavior is for the sensor to be activated 
in response to lights with strength (1 / distance^2).  But you could 
have a sensor which, for example, activates only when distance is 
greater than 5.  Or it could be activated with a linear function 
instead, etc.

> 3. Again the activationObject and activationMethod  variables have not 
> been initialised nor assigned any values anywhere.

Correct.  Again, the default value of the sensor, calculated at line 
285 of Braitenberg.tz, is (1 / distance^2).  At line 287, the sensor 
checks to see whether activationObject and activationMethod have been 
initialized (by the user calling set-activation-method).  If they have 
been, then the user's custom activation function is used instead of the 
default.

- jon klein

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