AS
All work

Project 05 · 2023

Bioinspired Robotics

Braitenberg vehicles, and where they stop being vehicles

In 1984 Braitenberg showed that two wires and a sign are the whole difference between what an observer calls fear, aggression and love. These six robots are that thought experiment put on real hardware, and the interesting part is not that they look alive, it is how little it takes.

Braitenberg VehiclesRoboticsC++ArduinoEmbedded SystemsControl
Bioinspired Arduino robot prototype
Basis
Braitenberg vehicles 1, 2a, 2b, 3a
Behaviours
6, from two kinds of sensor
Coupling
Sensor to motor, no world model
Layering
Avoidance subsumes light-seeking

Two wires and a sign

Valentino Braitenberg's vehicles are a sensor wired almost straight to a motor: no controller, no memory, no model of the world. Wire the sensor to the motor on its own side and the vehicle flees the stimulus. Cross the wires and it charges at it. Invert the sign, so the sensor slows its motor instead of driving it, and the same machine now turns toward a source and comes to rest facing it.

His point is the asymmetry he called uphill analysis and downhill invention: building a behaviour is trivial, and recovering the mechanism by watching it is not. Someone who sees a vehicle settle beside a lamp reports affection, and is in fact describing a wiring diagram. The names in the next section are deliberately the observer's names, not the mechanism's.

RobotWhat is wired to whatClosest vehicle
ShyOne distance sensor inhibits both motors, and the inhibition grows as the object gets nearerVehicle 1, sign inverted
ExplorerDistance past a threshold triggers a turn on the spot, then forward againVehicle 2a in effect, avoidance
AggressiveDistance past a threshold drives both motors harder, straight at the objectVehicle 2b, aggression
Light-followingThe photoresistor on the brighter side slows the motor on its own side, so the robot yaws toward the lightVehicle 3a, love
OffendedTurns away once, then latches and refuses to resumeNone, it needs memory
AdolescentA timer rotates between explorer, offended and aggressiveNone, no vehicle has a clock
Braitenberg numbers his vehicles: 2a and 2b are the excitatory pair, uncrossed and crossed, and 3a is the uncrossed inhibitory one he labels love.

The six behaviors

The six running. Watch how quickly you start narrating intent, which is the whole point Braitenberg was making.

1 · Shy

The shy robot advances cautiously while constantly evaluating its surroundings. When it detects an object within 70 cm it slows down proportionally as the distance shrinks, stopping before it reaches a critical 30 cm. It mimics cautious organisms that keep a safe distance from potential threats.

2 · Explorer

Curiosity-driven. It moves forward at a moderate speed and, on detecting an object within 30 cm, stops and rotates on its axis to face a new direction before continuing to explore, inspired by animals that actively survey their environment while avoiding obstacles.

3 · Offended

It explores until it identifies an object within 30 cm, then rotates on its axis to show discontent and turns away. Once offended it does not return to exploration; it stays put, and rotates again if another object invades its space. An anthropomorphic take on personal-space violation.

4 · Aggressive

It explores calmly with no particular behavior until it detects an object within 70 cm, then accelerates abruptly toward it in attack mode. After two seconds it calms down and stops, mirroring territorial animals that charge at perceived threats.

5 · Light-following (curious)

The obstacle-avoiding robot gained two photoresistors on either side of the ultrasonic sensor. It establishes baseline light values so behavior stays consistent across lighting environments, and deviates from its straight path toward a light source when readings exceed that baseline by 20 points. An error margin between the left and right measurements prevents erratic steering, and obstacle avoidance always keeps priority.

6 · Adolescent

Deliberately indecisive: it starts out explorer-and-curious, approaching objects cautiously while being drawn to light. After a random 20 to 30 s it spins on its axis and adopts the offended behavior; after another random 20 to 30 s it switches to aggressive; then it cycles back to the start. Each state is signaled by a different LED configuration: none for the initial state, blue for offended, red for aggressive.

Where these stop being Braitenberg vehicles

Braitenberg's coupling is continuous and monotonic: every increment of stimulus moves the motor by a proportional amount, with no thresholds anywhere. The light-follower has a dead band of fifteen counts and a fixed eighty unit cut, so it is a three branch approximation of vehicle 3a rather than 3a itself. The shy robot, which slows in proportion to the closing distance, is the one that comes closest to a real coupling.

The offended robot needs a latch, and a latch is state. Braitenberg does add memory eventually, in the later vehicles that learn by association, but a one bit flag meaning this already happened is not that. The adolescent robot is further out still: a timer rotating through three behaviours is a finite state machine wearing a vehicle's clothes.

The one piece of architecture here that is not Braitenberg's is the priority rule. Obstacle avoidance always overrides light-seeking, which is Brooks' subsumption architecture: a lower and more urgent layer of competence suppressing a higher one, instead of one controller weighing both. It is the same bet either way, that behaviour worth watching comes out of layered reflexes with nothing in the middle that resembles a plan.

Hardware

Arduino UNO and MEGA boards, an HC-SR04 ultrasonic sensor for distance, photoresistors for light, DC motors through a driver, and LEDs to signal which state the adolescent robot is in. The whole point is how ordinary the parts are: the behaviour is in the wiring and the sign, not in the components.

Next project

Autonomous Coding Agent