Presentation is loading. Please wait.

Presentation is loading. Please wait.

LCC 6310 Computation as an Expressive Medium Lecture 11.

Similar presentations


Presentation on theme: "LCC 6310 Computation as an Expressive Medium Lecture 11."— Presentation transcript:

1 LCC 6310 Computation as an Expressive Medium Lecture 11

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

3 Braitenberg Vehicles Valentino Braitenberg 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 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

4 Vehicle Sensors Wheel and motor Wires Sensory source

5 Vehicle 1 Sensors (light sensors) connected directly to motor on same side What will happen when light is to side? Directly in front?

6 Vehicle 1: Coward Steers away from source Charges source directly in front Rests in darkness

7 Vehicle 2 Sensors connected directly to motor on opposite side What will happen when light is to side? Directly in front?

8 Vehicle 2: Aggressive Sensors connected directly to motor on opposite side Turns towards source and charges Charges source directly in front Rests in darkness

9 Vehicle 3 Sensors connected through inverter to same side What will happen when light is to side? Directly in front? - - - -

10 Vehicle 3: Love Sensors connected through inverter to same side - - - - Turns towards source and rests Move toward source and rest Moves in darkness - -

11 Vehicle 4 Sensors connected through inverter to opposite side What will happen when light is to side? Directly in front? - - - -

12 Vehicle 4: Explorer Sensors connected through inverter to opposite side - - - - - - Turns away from source Rotates away (unless exactly on target) Moves in darkness

13 Classes in code Classes 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 Vehicle draws itself, plus wheel and sensor (1) (2)(3) (4)

14 Vehicles All vehicles are currently vehicles of the same type 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 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

15 Ground The ground (background) is a PImage - different sources change the pixels of the ground The ground (background) is a PImage - different sources change the pixels of the ground This is the mechanism for summing different sources together 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) 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 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!) Instead of PImage, we will make a 2D array for ground instead (drawing optional => MUCH FASTER on slower machines!)

16 Sources The only source currently implemented is light 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 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) getReading() is used by ground to sample a light source (to determine how much a light source effects a given pixel)

17 Extensions Make vehicles also be sources (vehicles start following each other, are repelled by each other, etc.) 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 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 complex sensor response curves (everything we’ve looked at so far is linear) Add more interactions between different types of vehicles Add more interactions between different types of vehicles

18 Project ideas Braitenberg vehicles provide a simple framework for exploring autonomous behavior in computational ecosystems Braitenberg vehicles provide a simple framework for exploring autonomous behavior in computational ecosystems Text machines – autonomous words and letters Text machines – autonomous words and letters Drawing machines – brush interacts with vehicles, spawns vehicles, vehicles interact with each other 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.) Ecosystem responds to data (sources represent web data, vehicles spawned in response to data, etc.) Miniature worlds – alien, aesthetically interesting worlds Miniature worlds – alien, aesthetically interesting worlds [Jason’s postscript: You’re making something that follows simple rules, interacting with its environment to give the illusion of life.]


Download ppt "LCC 6310 Computation as an Expressive Medium Lecture 11."

Similar presentations


Ads by Google