18
IAT 800 Braitenberg Vehicles

IAT 800 Braitenberg Vehicles. Oct 31, Fall 2006IAT 8002 Outline Braitenberg vehicles –Concept behind vehicles –Introduce several vehicles –Look through

  • View
    222

  • Download
    0

Embed Size (px)

Citation preview

IAT 800

Braitenberg Vehicles

Oct 31, Fall 2006 IAT 800 2

Outline

Braitenberg vehicles– Concept behind vehicles– Introduce several vehicles– Look through major code sections– Talk about possible project ideas

Oct 31, Fall 2006 IAT 800 3

Braitenberg Vehicles

Valentino Braitenberg– Vehicles: Experiments in Synthetic Psychology– Neuro-psychologist interested in how primitive

neural structures can give rise to complex behavior

– He developed a simple model of robots with sensors and motors to show how complex behavior can arise from simple mechanisms

We're interested in his vehicles as a simple autonomous agent framework we can play with– Build ecosystems of interacting agents and

sensory sources

Dr. B’s homepage: http://www.kyb.mpg.de/~braitenb

Oct 31, Fall 2006 IAT 800 4

Vehicle

Sensors

Wheel and motor

Wires

Sensory source

Oct 31, Fall 2006 IAT 800 5

Vehicle 1Sensors (light sensors) connected directly to motor on same side

What will happen when light is to side?

Directly in front?

Oct 31, Fall 2006 IAT 800 6

Vehicle 1: Coward

Steers away from source

Charges source directly in front

Rests in darkness

Oct 31, Fall 2006 IAT 800 7

Vehicle 2Sensors connected directly to motor on opposite side

What will happen when light is to side?

Directly in front?

Oct 31, Fall 2006 IAT 800 8

Vehicle 2: Aggressive

Sensors connected directly to motor on opposite side

Turns towards sourceand charges

Charges source directly in front

Rests in darkness

Oct 31, Fall 2006 IAT 800 9

Vehicle 3

Sensors connected through inverter to same side

What will happen when light is to side?

Directly in front?

-

-

- -

Oct 31, Fall 2006 IAT 800 10

Vehicle 3: Love

Sensors connected through inverter to same side

-

-

-

-

Turns towards sourceand rests

Move toward source and rest

Moves in darkness-

-

Oct 31, Fall 2006 IAT 800 11

Vehicle 4

Sensors connected through inverter to opposite side

What will happen when light is to side?

Directly in front?

-

-

- -

Oct 31, Fall 2006 IAT 800 12

Vehicle 4: Explorer

Sensors connected through inverter to opposite side

-

--

-

-

-

Turns away from source

Rotates away (unless exactly on target)

Moves in darkness

Oct 31, Fall 2006 IAT 800 13

Classes in code

Classes– Vehicle (1)

• Includes logic for movement– Wheel (2)

• The flapping things on the vehicle– Sensor (3)

• The “eyes” on the vehicle – how much they glow indicates activation (+ inverter)

– Source (4)• The light sources

Vehicle draws itself, plus wheel and sensor

(1)

(2)(3)

(4)

Oct 31, Fall 2006 IAT 800 14

Vehicles All vehicles are currently vehicles of the same type– Initialized in setup()

• Up/down arrow displays/hides vehicles

– To create multiple types of vehicles, subclass Vehicle instead of commenting in and out different doSenseLogic() methods

Draw() repeatedly calls move() and drawMe() methods on vehicle– To change the way the vehicle looks, change the drawMe() methods

– move() contains call to doSenseLogic(), which contains the relationship between sensors and wheels

Oct 31, Fall 2006 IAT 800 15

Ground

The ground (background) is a PImage - different sources change the pixels of the ground

This is the mechanism for summing different sources together– updateGround() sums light sources to produce background pixels

Sensing takes place by asking the ground what the summed sense value is (rather than by directly asking the sources)

Ground will need to be modified to handle multiple source types– Separate by color (r, g, b), but then can only have three– Better – lay multiple sensory grounds on top of each other

• Transparency will make them all visible• Different sensor types will look at different grounds (sound, light

sources, etc.)

Instead of PImage, we will make a 2D array for ground instead(drawing optional => MUCH FASTER on slower machines!)

Oct 31, Fall 2006 IAT 800 16

Sources

The only source currently implemented is light sources– Strength determines brightness– Max_radius determines how far out influence extends

Sources only draw the little circle in the middle – The light gradient around them is actually in the ground

getReading() is used by ground to sample a light source (to determine how much a light source effects a given pixel)

Oct 31, Fall 2006 IAT 800 17

Extensions

Make vehicles also be sources (vehicles start following each other, are repelled by each other, etc.)

Implement other sources (e.g. sound, smell…), other objects in the world

Add more complex sensor response curves (everything we’ve looked at so far is linear)

Add more interactions between different types of vehicles

Oct 31, Fall 2006 IAT 800 18

Project ideas

Braitenberg vehicles provide a simple framework for exploring autonomous behavior in computational ecosystems

Text machines – autonomous words and letters

Drawing machines – brush interacts with vehicles, spawns vehicles, vehicles interact with each other

Ecosystem responds to data (sources represent web data, vehicles spawned in response to data, etc.)

Miniature worlds – alien, aesthetically interesting worlds