Behavioral Robots with various Controls Generalized Braitenberg Vehicles
The simplest Breitenberg Vehicles with analog control each sensor is connected to the motor on the same side, each sensor connected to the motor on opposite side both sensors connected to both the motors.
Fear and Aggression Vehicle at left avoids light while vehicle at right follows light. Braitenberg Vehicles represent “emotions”
Signal Inhibiting Inhibiting signals from the sensors cause light following. Sign minus represents inhibiting
Inhibiting signals from swapped sensors causes light avoidance Signal Inhibiting
Signals and logic in Braitenberg Vehicles Signals can be: –Analog –Binary –Multiple-valued –Fuzzy –Quantum Sensing can be done in quantum world (Hilbert Space) or in standard macro-world
Our Vehicles have various types of drives
Choice of Drives
Braitenberg Vehicles Sensory and Effectors Characteristics much more generalOur understanding of Braitenberg Vehicles is much more general than in literature: –Sensing, –Controls (functions, automata, distributed automata), –Effectors (Drives and their Control, walking etc)
Emotion as synthesized behavior Emotional state = state of all emotion variables Physical variables = positions, speeds, accelerations, words, Serchuk et al discuss emotion as mapping from internal state to observable output behavior. We want to design these mappings well, so that they wil be similar to humans
Emotion as emergent, evolvable behavior Evolved “emotional” behavior of robot Sensors, vision and fusion = features and patterns Drives and effectors Main input-output mapping (perception, internal state, behavior) Precise motion generation (behavior) Degrees of freedom Here emotion is an emergent behavior that arises from sensors, drives, effectors and logic. Here emotion is an emergent behavior that arises from sensors, drives, effectors and logic. This may look like human, animal behavior but also as an entirely new “other world” behavior, behavior at it may be. This may look like human, animal behavior but also as an entirely new “other world” behavior, behavior at it may be.
Part II. Brief Review of Quantum Circuits and Automata A general-purpose controlled quantum gate. U is arbitrary one-qubit quantum operator. If S1=|0> then M2=S2 If S1=|1> then M2=U(S2)
Analysis of Quantum Circuits and Automata Kronecker (tensor) Product of matrices Every quantum circuit is a serial or parallel composition of lower level circuits. Every quantum circuit is a serial or parallel composition of lower level circuits. For serial connection use matrix multiplication of unitary matrices For serial connection use matrix multiplication of unitary matrices For parallel connection use Kronecker product of unitary matrices For parallel connection use Kronecker product of unitary matrices
Elementary Quantum Gates Hadamard gate notation and its Unitary matrix. Feynman gate notation and its unitary matrix. Observe that this is a permutative matrix. The circuit to produce entanglement that can be used as a controller of a Braitenberg Quantum Robot. By making a feedback from P to B a Braitenberg Quantum Automaton Robot is created. We will analyze this entanglement circuits - EPR
Analysis of Quantum Braitenberg Vehicle Calculation of parallel connection of gates H and wire
Calculation of Kronecker Product of Hadamard and wire using their unitary matrices Analysis of Quantum Braitenberg Vehicle
Unitary matrix of Feynman gate in the entanglement circuit. Analysis of Quantum Braitenberg Vehicle inputs outputs
Final calculation of the unitary matrix of the entanglement circuit by multiplying matrices of Feynman gate and a parallel connection of H and wire in reverse order. Analysis of Quantum Braitenberg Vehicle
Calculation of entangled state with no light on both sensors Analysis of Quantum Braitenberg Vehicle in dark room * = = 1/ 2 |00> + 1/ 2 |11> 0 interpreted as no action on motor Conclusion: Conclusion: in dark room quantum robot can go straight forward or stop, each step after measurement
Analysis of Quantum Braitenberg Vehicle in fully lighted room * = = 1/ 2 |01> - 1/ 2 |10> Calculation of entangled state with light on both sensors 0 interpreted as no action on motor Conclusion: Conclusion: in fully lightened room quantum robot turn right or left, each step after measurement
Quantum Automata Models Quantum Automaton that lives in Hilbert Space. Quantum logic Quantum memory Quantum signal In case of a robot, such robot can live only on quantum mechanics level of world, but because of entanglement it interacts with whole universe. Benioff ‘s Automaton and robot
Quantum Automata Models Quantum Automaton with standard memory. Quantum logic standard memory measurement This automaton lives in normal macro world. initialization Yellow signals are quantum Blue signals are standard Several other types of automata/robots can be proposed. initialization
Conclusion on Quantum Vehicles Quantum logic includes binary, multiple-valued and fuzzy logic Quantum Automaton includes quantum combinational function, probabilistic and deterministic automaton includesQuantum Braitenberg Vehicle includes (for many reasons) the standard Braitenberg Vehicle.
sensors actuators Combinational Block ENVIRONMENT Generalized Braitenberg Robot Part III. Generalized and Quantum Braitenberg Robots
sensors actuators Combinational Block memory ENVIRONMENT Braitenberg Automaton Robot
Generalized Braitenberg Robot and Braitenberg Automaton Robot may exist in both quantum and standard environment.
A Hybrid Fuzzy-Quantum system of Automata in Generalized Braitenberg Robot.
Quantum Robot Motion (Behavior) generation Quantum sensing Standard sensing QuantumCounter-likeautomaton Quantum ROM effectors MMM Each behavior is a sequence of states Rough positions in Hilbert Space Precise deterministic positions probabilistically generated
Complete Quantum Robot Architecture Quantum sensing Standard sensing Quantum associative memory Quantumbrain Quantum motion control effectors Every realization of quantum motion is slightly different because of measurements
Quantum Braitenberg Vehicles Simulator
s1 00 (oo) 1/2, (11) 1/2 01 (o1) 1/2, (10) 1/2 11 (o1) 1/2, (10) 1/2 10 (oo) 1/2, (11) 1/2 Graphical description of EPR reactive Quantum Braitenberg Vehicle ( robot )
C S1 S2 M2 M1 Problem 1 Find the unitary matrix and the graph for this Quantum Braitenberg Vehicle Describe in English its behavior.
0 S1 S2 garbage 0 M1 M2 Problem 2 Find the unitary matrix and the graph for this Quantum Braitenberg Vehicle Describe in English its behavior.
C2 S1 S2 M2 M1 H C1 garbage Problem 3 Find the unitary matrix and the graph for this Quantum Braitenberg Vehicle Describe in English its behavior.
Quantum Combinational Block Feature value creation and normalization Motion generation Lego camera Light sensors Lego motors measurement Flip-flops clock Motion sequencecompleted Environment Touch and other sensors robot PROJECT 1. Quantum Automaton with standard memory in a setup where the behavior of walking Lego robot is observed by Lego Camera
The entire system and subsystems for Project 1 Please observe two feedback loops. –Small processor (microcontroller on the robot) processes sensor information –PC processes images –Camera looks at the robot
ceiling camera Laptop PC Micro - controller Radio transmitter -receiver Radio transmitter -receiver Quantum controller Selection and generation of motions Execution of stored motions Transmission of motions and sensor readings Lego camera Light sensors Lego motors Environment Touch and other sensors robot PROJECT 1. Components of the entire
The entire system and subsystems for Project 1 Please observe two feedback loops. –Small processor (microcontroller on the robot) processes sensor information –PC processes images –Human looks at the robot –Camera looks at the human
Laptop PC Micro - controller Radio transmitter -receiver Radio transmitter -receiver Quantum controller Selection and generation of motions Execution of stored motions Transmission of motions and sensor readings Human observes a robot Robot mimicks a human Lego camera Light sensorsEnvironment robot sensors motors
Two Main Simple Quantum Behavioral Architectures (a) Reactive architecture (mapping with no memory) (b) Behavioral architecture with the memory to represent emotions, moods, knowledge and stored processing information.
sensors Quantum Combinational Block ENVIRONMENT sensors Quantum Combinational Block Standard memory ENVIRONMENT actuators Measurements (a) (b) Measurements actuators
C S1 S2 M2 M1 H Mood Combinational logic with probabilistic entangled results memory m1 md Calculations in Hilbert Space measurements Behavioral Quantum Robot with Memory of moods
S1S2CM1M2Mood nice angry (000) 1/2 or (111) 1/2 Problem 4. Complete this table for the Quantum Robot with Memory from the previous slide.
Hybrid Architectures Modern Behavioral robots are hybrid They combine various components (agents): –Reactive –With memory –Fuzzy –Neural –Multi-valued –Learning –Knowledge-based –Quantum –…..
sensors actuators Fuzzy Combinational Block Quantum Combinational Block Quantum memory ENVIRONMENT Fuzzy Memory F/Q Q/F Hybrid Behavioral Robot with Fuzzy and Quantum Subsystems
You can find many good Lego designs on Internet New Lego Kits
Mindstorms NXT It has a 32-bit processor, proper servo motors, new sensors (including color vision and hearing) bluetooth connectivity it can be controlled by a cellphone
powered by LabVIEW from National Instruments. when I got the Space Monorail, I thought it was the absolute height of coolness that Lego could hope to attain. Now Lego kits have Bluetooth and their own programming language, LegOS.
The inclusion of Bluetooth technology also extends possibilities for controlling robots remotely, for example, from a mobile phone or PDA.
Projects with new Lego
when I got the Space Monorail, I thought it was the absolute height of coolness that Lego could hope to attain. Now Lego kits have Bluetooth and their own programming language, LegOS.
Lego Heads Lego Heads
Lego Bipeds Lego Bipeds
Lego robot biped google
Lego Hands Lego Hands
Homework 2 Design a simulator of two Braitenberg Vehicle in an environment The environment may be an arbitrary maze, sports field or battlefield. It can be a plan of a house. The robots can turn right 90 degree, left 90 degree and rotate. They can move one step forward or one step backwards. These are the all basic moves from which other moves are composed.
Homework 2 cont Each vehicle has a minimum of two sensors. You design and locate the servos. They can see no more than 3 cells from the robot cell in any direction. Each robot may have weapons that shoot one cell in any direction. There may be a ball or other item for play and interaction. The vehicles can have some friendly or unfriendly relation, to be defined by you. The environment (space) for robots is a square with external walls North, East, West and South. If one robot escapes to one of these external walls then the robot is safe from shooting but he cannot shoot. The space is a grid of cells. The walls are marked by number X. The empty cells are empty. All other symbols may be used to denote the position, orientation and internal state of each robot. Your program should either make printouts or display the snapshots of robot behavior with written explanation what happens (possibly what are their internal states), collisions, intentions, etc.
Example of space encoding X X X> X X XXXXXXXX XX XXX XX ^X XX North South WestEast
Examples of programming of simple standard Braitenberg Vehicles in Java We used Basic, LISP, Pascal, C, Robot C, etc
MotorTest.java import josx.platform.rcx.*; class MotorTest { static final int STOP = 0; static final int RUN = 1; static final int FLOAT = 2; static int mode = STOP; static int power = 0; public static void main(String [] args) { setupButtonListeners(); while (true) { if (mode == RUN) { Motor.A.setPower( power ); // power in range [0, 7]. incremented with each press of View button. Motor.A.forward(); } else if (mode == STOP) { Motor.A.stop(); } else if (mode == FLOAT) { Motor.A.flt(); }... (button listener code not shown)
LightTest.java import josx.platform.rcx.*; class LightTest implements SensorConstants { public static void main(String [] args) throws InterruptedException { Sensor.S1.setTypeAndMode (SENSOR_TYPE_LIGHT, SENSOR_MODE_PCT); Sensor.S1.activate(); while (true) { int lightReading; if (Button.VIEW.isPressed()) { lightReading = Sensor.S1.readRawValue(); } else { lightReading = Sensor.S1.readValue(); } LCD.showNumber( lightReading ); }
Complete Example: “Aggressive.java” import josx.platform.rcx.*; class aggressive implements SensorConstants { public static void main(String [] args) { int minBrightness = 100; final int gain = 12; Sensor.S1.setTypeAndMode (SENSOR_TYPE_LIGHT, SENSOR_MODE_PCT); Sensor.S1.activate(); Sensor.S3.setTypeAndMode (SENSOR_TYPE_LIGHT, SENSOR_MODE_PCT); Sensor.S3.activate(); for (int i = 0; i < 100; i++) { if (Sensor.S1.readValue() < minBrightness) { minBrightness = Sensor.S1.readValue(); } else if (Sensor.S3.readValue() < minBrightness) { minBrightness = Sensor.S3.readValue(); } Thread.sleep(20); } Motor.A.forward(); Motor.C.forward(); while (true) { int motorASpeed = (Sensor.S3.readValue() - minBrightness) / gain; int motorCSpeed = (Sensor.S1.readValue() - minBrightness) / gain; setMotorSpeed(Motor.A, motorASpeed); setMotorSpeed(Motor.C, motorCSpeed); }
Aggressive.java (continued) protected static void setMotorSpeed(Motor m, int motorSpeed) { if (motorSpeed < 1) { m.flt();// important LCD.showNumber(-1); } else { if (motorSpeed > 7) { motorSpeed = 7; } m.forward(); m.setPower(motorSpeed); LCD.showNumber(motorSpeed); }
Observations Closed loop control; lessens importance of mechanical imperfections (e.g. pulley slip). The map is not the territory. Make your own—robots and observations!
Change the vehicle behavior? Make a subclass of vehicle and cut-and- paste the version of doSenseLogic() that you want… Consult Lecture slides for overview of various behaviors // Sensor output goes directly to wheel on same side void doSenseLogic() { setASpeed(sA.getSense()); setBSpeed(sB.getSense()); } // Sensor output crossed to wheel on opposite side /* void doSenseLogic() { setASpeed(sB.getSense()); setBSpeed(sA.getSense()); }*/ // Each sensor goes to wheel on same side with an inhibitory connection /* void doSenseLogic() { setASpeed(sA.getInverseSense()); setBSpeed(sB.getInverseSense()); } */ // Each sensor goes to wheel on opposite side with an inhibitory connection /* void doSenseLogic() { setASpeed(sB.getInverseSense()); setBSpeed(sA.getInverseSense()); } */ // Sensors are hooked up to opposite motors, with threshhold sensing. /* void doSenseLogic() { setASpeed(sB.getNonlinearSense()); setBSpeed(sA.getNonlinearSense()); } */