By Gabrielle Branche
Plan:
I chose to explore paranoid. Paranoid describes a creature who is afraid of the dark but still goes into the dark and only when it is in the dark does it decide to turn around back into the light.
I decided to make a version of this creature because I belief fair of the dark is such an intrinsic characteristic of living organisms from babies to dogs to even some grown adults can be afraid of the dark.
To simulate this creature my kitten-bot would need to be able to move constantly in one direction but then begin to turn with a certain level of darkness. This would require a light sensor that can measure the light intensity. The light intensity can then be used to control the motors thus simulating a paranoid creature.
Program:
The following link shows the kittenbot responding to light:
https://drive.google.com/file/d/1TyZviqV7ZG6tz72GvqKDQLn-VxB0DOUv/view?usp=sharing
Here is the code that for video:
from microbit import * import robotbit import time #if bright and no obstacle #control motor by light while True: #original paranoid -run away from darkness #to get the light intensity dist = robotbit.sonar(pin0) #determine obstacle light = pin2.read_analog() #determine light intensity #controlling motor using light intensity if light > 400: #dark display.show(Image.SAD) robotbit.motor(1, -105, 0) robotbit.motor(3, -50, 0) else: #bright and no obstacle #display.show(Image.HAPPY) robotbit.motor(1, -105, 0) robotbit.motor(3, -100, 0)
At first I wanted to make the creature move both by ultrasound and light but the code would not work together. I then decided to use just light and perfect it so that it could move smoothly in a light environment.
I realized that this was still quite beneficial because shadow is cast by objects and by avoiding the shadows the creature inadvertently avoid objects. Therefore in the lounge my creature was navigating quite well only using light.
Draw:
The following photos depict my interpretation of the vehicles readings and show my own portrayal of my creature.
Photo 1: A depiction of my darkness paranoid vehicles
Photo 2: A potential path for my creature if places in a sole spot of light
Photo 3: A diagram of the motor/sensor relationship for my creature
Analyse:
The following video is of a dog that is afraid of the dark. By jumping in and out of the shadows this dog simulates paranoia.
https://www.youtube.com/watch?v=VJilLGMcfkk
Remix:
The following video is of my remixed code:
https://drive.google.com/file/d/1-71MQlIOS7lggvVpKFFrtfhdjegClNVh/view?usp=sharing
After watching the video of the dog, I noticed that the dog’s paranoia went beyond just going in the dark. He would bark at the darkness before running in and out of the shadows. As such I changed the code to simulate this by having my kittenbot stop periodically before going into the dark and then turning more rapidly out of the dark. In this way I hope to better portray the hesitation of the creature more authentically.
Below is the code for this:
from microbit import * import robotbit import time #if bright and no obstacle count = 0 #control motor by light while True: #original paranoid -run away from darkness #to get the light intensity dist = robotbit.sonar(pin0) #determine obstacle light = pin2.read_analog() #determine light intensity #controlling motor using light intensity if light < 400 and light > 350 and count == 0: #see the dark robotbit.motor(1, 0, 0) robotbit.motor(3, 0, 0) sleep(2000) count = 1 elif light > 400: #dark display.show(Image.SAD) robotbit.motor(1, -105, 0) robotbit.motor(3, -45, 0) else: #bright and no obstacle #display.show(Image.HAPPY) robotbit.motor(1, -105, 0) robotbit.motor(3, -100, 0) count = 0
Reflection:
This lab was very beneficial because it enabled me to better understand the aim of bio inspired robotics and how vehicles and creatures can be used to simulate life-like behavior. I hope to improve my original idea in the future and better my creature.
Extra Resources:
http://www.diva-portal.org/smash/get/diva2:138304/FULLTEXT01.pdf
http://users.sussex.ac.uk/~christ/crs/kr-ist/lecx1a.html