Duration of activity: 2.75 hours
Group members participating: Thomas, Rasmus, Peter
The Goal of the session...: Experiment with Breitenburg robots.
Setup: We built a small car with 3 wheels and 2 light sensors attached at the front. (Reminiscent of the 2 wheeled cars in the picture below).

Experiment:
We connected the sensors as in case 2a above, and just fed the output from the lightsensors directly to the motors.
Purpose:
Test the effects of just forwarding the output, without any form of normalization.
Result:
The values produced by the lightsensors, were barely high enough to get the car moving, let alone show any sort of consistent behaviour.
Experiment:
We tried normalizing the values, before feeding them into the engines. This was done by averaging the max/min values of the sensors and using them in a normalization process ala the one presented during the lecture:
int result = ((t - MIN_LIGHT)* 100) / (MAX_LIGHT - MIN_LIGHT) ;
Purpose:
Stabilize/magnify he bahaviour exhibited, by tailoring the interpretation of the input to some values relevant for the environment we were in.
Result:
The sensors had different sensitivity, which resulted in the car either driving hard left, or hard right and only when subjected to a strong light source.
Experiment:
When normalizing the values, we took in to account the values already seen:
private int MIN_LIGHT = 100;
private int MAX_LIGHT = 0;
public int readValue()
{
int t = super.readValue();
if(MIN_LIGHT > t)
MIN_LIGHT = t;
if(MAX_LIGHT < t)
MAX_LIGHT = t;
if(MAX_LIGHT == MIN_LIGHT)
MAX_LIGHT++;
int result = ((t - MIN_LIGHT)* 100) / (MAX_LIGHT - MIN_LIGHT) ;
return result;
}
Purpose:
Enable the sensors to calibrate themselves over time, so that the output values actually hit the entire range betweem 0 and 100 depending on the input.
Result:
The car exhibited the desired behaviour, meaning that it steered toward light sources, but turned away before hitting them.
Experiment:
To try out vehicle 2b.
Purpose:
To get at different behaviour by just changing the wiring of the motors and the sensors.
Result:
As expected the car drove towards the light source when the light source was at a certain distance form the car. And when it got closer the car steared towards the light, instead of away from the light.
Final versions:
http://www.daimi.au.dk/~rusmus/Breitenberg/