60
A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Embed Size (px)

Citation preview

Page 1: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

A System based on Swarm Intelligence and Ant Foraging

TechniquesBy Kristin Eicher-Elmore

Page 2: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

What is Swarm Intelligence?

Swarm Intelligence is a system in which more than one unsophisticated

agents work together to create a solution to difficult tasks.

Page 3: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Some definitions relevant to Swarm Intelligence

• Collective behavior: The process of a group of agents working together to achieve a common goal.

• Reactive behavior: The reaction of an agent to an outside stimulus such as a light.

• Emergent Phenomena: The process where new behaviors develop dynamically during the process of solving a task.

Page 4: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Why is using Swarm Intelligence Techniques Important for

Robotics Systems?

Cost Effectiveness of:

Hardware and

Software

Page 5: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Cost Effectiveness of Hardware

• Simple agents have inexpensive hardware that can be easily replaced if an agent is damaged or lost in a hazardous environment.

• Inexpensive hardware leads to the ability to create large groups of agents that will be able to cover a large area.

Page 6: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Cost Effectiveness of Software

• Using simple agents means that the Software must be kept relatively simple and uncomplicated. These systems generally will not have the memory space for complex algorithms. Thus, the reaction times will generally be quicker for fast reaction times.

Page 7: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Purpose of the System

To create a model for a system that will use features of the ant foraging techniques to find the shortest path to a goal for Search and Rescue applications.

• Military uses• Fire and disaster rescue• Police uses Any situation where there is danger and the need

to get to a victim quickly.

Page 8: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Ant Foraging Techniques

Ant foraging techniques were chosen because of the ant’s ability to find the shortest path to a goal.

Page 9: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Ant Foraging Technique Definitions

• Stigmergy: Indirect communication used for communication between different insects such as ants. It is opposed to direct cues such as visual or auditory ones.

• Pheromones: The chemical scent used by ants to communicate with one another in an indirect way.

• Mass recruitment: The process by which ants are directed towards a food source through the use of pheromone trails.

Page 10: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

How does Mass Recruitment work to find the shortest path?

• The first ant to find the food source and return to the nest leaves a pheromone trail for the other ants to follow.

• Another ant follows this trail since it has the freshest and strongest scent and leaves a scent trail reinforcing the path.

• The path is now established and it will be the shortest one because of the fact that the first one to return took the least time finding the food.

Page 11: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Problems with adhering strictly to ant foraging techniques

Ants will meander around until they find a food source. When they return this path is usually the shortest but wandering will not work with a robot without ensuring that it has a good efficient search algorithm.

Page 12: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

The algorithm: How this system ensures a good solution

• The use of colored zones.

• Constant changing of search methods

• Constant search for food source through each search iteration

• Adequate obstacle avoidance

• Quick and Responsive RF Communication

Page 13: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

The use of colored zones

• Once the robot reaches this marker the search method is changed to a forward search and this ensures that the robot will keep moving on and to keep the boe-bot from doubling back if it is making a left or right wall hug search.

• This feature serves to force a progression towards the goal.

Page 14: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Making progress with colored zones

Page 15: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Constantly changing search methods

• Changing search methods from a forward to a right wall hug, and a left wall hug search make sure that the robot will not keep trying the same route over and over and wander aimlessly.

• These search methods are stored in memory to be communicated to the follower ants as a map.

Page 16: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Robot changing search methods

Page 17: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Constant search for the food

• The food is searched for prior to every step forward the robot makes. This ensures that the robot will not miss it.

• When the robot senses the food it will enter a separate search loop that does not involve the switching of search methods performed when in travel mode. This further ensures that the food will not be passed by.

Page 18: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Food Search

Page 19: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Quick Obstacle Avoidance

• If the robot becomes stuck in a corner it will make a sweep of the surrounding area to find the farthest path from the wall closest to the robot that is clear for both sensors.

• The robot also moves quickly through obstacles.

Page 20: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Robot becoming Unstuck in a Corner

Page 21: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Robot moving through Obstacle Course

Page 22: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Quick and Responsive RF Communication

• Fast wireless communication means the follower robots can make a quick trip to the food goal.

Page 23: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

The Scout Robot Communicating to Follower Robots

Page 24: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

The System Algorithm Attempts to Find the Shortest Path by:

• Using Zones to mark progress so that scouts make quicker progress by not becoming stuck in one area.

• Using more than one search method so that the robot does not end up hugging one wall or traveling forward and going along every obstacle until the goal is reached.

• Sensing for the food at a constant rate so it isn’t passed• Obstacle Avoidance techniques that make sure the

robots do not become stuck in a corner for too long.

Page 25: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Emergent Behavior: Nature vs. Boe-Bot

Similarities Differences

Sensing around obstacles No pheromone decay

A follower ant will scout its own way to a food source if it becomes lost

Pheromone information is used as a guide rather than a strict trail

Page 26: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Platform

All code is written in pBasic for a Board of Education BS2pe chip using the Parallax Basic Stamp Editor

Page 27: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Hardware

• Parallax 433 Mhz Transceiver

• Ultrasonic Ping Sensors

• Photo-Resistors

Page 28: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore
Page 29: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

The Code contains two Controller Subsets

• Scout Search Loop

• Follower Search Loop

Each robot contains the same code, but a flag indicates whether the robot starts out as a scout or a follower

Page 30: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore
Page 31: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore
Page 32: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore
Page 33: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore
Page 34: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore
Page 35: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore
Page 36: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore
Page 37: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore
Page 38: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore
Page 39: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Observations and Results

• Obstacle Avoidance

• Getting out of corners

• Finding the Light

• XOR Error Checking and RF communication

• Maze size and Progression

Page 40: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Obstacle Avoidance

• The code is successful at keeping the robot away from both walls and moving forward for forward search, and hugging the right and left walls for forward search. The robot is always successful at this.

• If the robot somehow gets very close to a wall on one side, the ultrasonic becomes blinded. During debugging it was found to record a large distance when it is in fact right up close to it. All of the sensors do this. So sometimes they get stuck running straight into a wall at a slight angle.

Page 41: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Getting out of Corners

• Involves doing a sweep of the area and chooses the first direction that is away from obstructions on both sides of the robot in a direction away from the obstruction.

• On average only two tries are required to get out of a corner. At most three.

• The robot always chose the right direction.

Page 42: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Finding the Light

• Very successful since sensors are checked a every step

• Once the robot senses it a separate sweep and search is made until the light source has been approached.

• Each robot has always found the light if close enough and situations were rare of a robot going by it when close unless another robot was blocking the light.

• Average distance when light found was five-seven inches away.

Page 43: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

XOR Error Checking and RF Communication

• XOR checksums are calculated at both ends and compared before a message is accepted as correct.

• The scout will send out a message three times with two seconds in between to ensure the correct message is received.

• However during debugging and testing communication never failed after the first attempt.

Page 44: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Maze size and Progression

• If the maze walls are too far apart then when the robots go over a colored zone or marker, they don’t realize they are making progress. They might double back and think it was new ground they were seeing when in fact it was the same marker it has already seen.

• There did not seem to be any way to solve this in code. The only solution seems to be keeping the walls from being too far apart.

Page 45: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Live Demonstration

Page 46: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Recorded Demo

Page 47: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Challenges and Changes

• Communication and Error Checking

• Hardware Changes

• Mapping Technique Changes

Page 48: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Communication and Error Checking

• At first there was more communication going on. Each robot, scout and follower transmitted and received. This was changed because of an eventual lack of memory space.

• Because both scouts and followers transmitted and received the XOR error checking scheme was more exact and involved the receiver sending error messages to the transmitter asking for another transmission. Again this was simplified due to little memory space.

Page 49: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Hardware Challenges and Changes

• All code was simplified because major hardware changes were needed.

• The main challenge was a lack of memory space due to the needs of the transceiver.

• An extra chip a BS2 and a bread board were added.

• The extra chip made it necessary to consider building a battery pack that would hold five batteries since more voltage was needed. A power supply temporarily solved this problem.

Page 50: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Hardware Challenges and Changes cont.

• One chip the BS2pe ran logic and movement, the BS2 ran the transceiver.

• The biggest problem that could not be resolved: chip to chip communication. The BS2pe would not stop its program execution to notice the interrupt from the BS2 with the transceiver.

• The BS2pe ran at 6000 instructions per second and the BS2 ran at 4000 instructions per second. The BS2 ran at a speed too slow to interrupt the program execution of the BS2pe, so the code was simplified.

Page 51: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Mapping Techniques

• At first actual directions were used instead of search techniques. This used too much memory space and because each robot moves differently due to differences in servo motors, search technique mapping was more efficient.

Page 52: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Future Improvements

• Obstacle Avoidance and Colored Zones

• Finding the Goal (victim)

• Greater number of Agents and Scouts

Page 53: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Obstacle Avoidance and Zones

• Obstacle Avoidance code could remain the same yet with more durable robots with better traction and the ability to deal with potholes, etc..

• Instead of contrasting markers used to keep track of progress, gps devices could be used that would keep track of where the robot is in relation to its starting point and the robot could actually see forward progression from the starting point.

Page 54: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Finding the Victim

• Instead of using light sensors, a thermal infrared camera could be used to identify victims.

Page 55: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Greater Number of Agents and Scouts

• A very large number of Scouts would be used to create better coverage of an area.

• Once the victim was found by the quickest agent, RF communication with more sophisticated error checking could be used to bring followers equipped with special equipment bringing temporary relief like oxygen and water until rescuers could reach the injured.

Page 56: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Conclusion

A successful swarm has these components:

• Collective behavior

• Emergent behavior

• Reactive Behavior

Page 57: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Collective Behavior in this System

• Each agent shares the goal of finding the food.

• When one Scout finds this food, a guide is sent to the rest of the ants so that they can find the food as well.

• All ants are cooperating together to find the food.

Page 58: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Emergent Behavior

• Dynamic behaviors emerge during each run of the program.

• A follower might find an optimal solution better than the guide it received from the Scout because it does not follow the directions blindly but as a hint of the right moves to make to the goal sensing for the light as it goes.

Page 59: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Emergent Behavior cont.

• A separate search for the light source with the proper obstacle avoidance and sweep methods for the light if it has been sensed can create differing behaviors in each ant even if they took the same route enabling that no mistakes of missing the light can be made.

• Changing search methods over time create possible changes in behavior that keep an ant from being stuck in a rut following one method.

Page 60: A System based on Swarm Intelligence and Ant Foraging Techniques By Kristin Eicher-Elmore

Reactive Behavior

Apparent intelligence in insects comes from there reactions to their environment. Robots do can be made to react in similar ways with very simple sensors and hardware. Thus, swarm intelligence is an ideal way to create large and simple systems that can solve difficult problems with ease.