12
DRILL Answer the following question’s in your notebook: 1.How does ACO differ from PSO? 2.What does positive feedback do in a swarm? 3.What does negative feedback do in a swarm? 4.Who do we build fluctuations into a swarm?

DRILL Answer the following question’s in your notebook: 1.How does ACO differ from PSO? 2.What does positive feedback do in a swarm? 3.What does negative

Embed Size (px)

Citation preview

DRILLAnswer the following question’s in your notebook:

1.How does ACO differ from PSO?2.What does positive feedback do in a swarm?3.What does negative feedback do in a swarm?4.Who do we build fluctuations into a swarm?

Swarm Theory: “The Wisdom of Crowds”

Logic and Pseudocode (pt 1)

Models for Swarming Behavior

Ant Colony Optimization (ACO)

• Ants are great at finding the closest source of food

• Ants use pheromones to communicate information

• Best at finding discrete solutions

Particle Swarm Optimization (PSO)

• Birds are excellent at finding multiple sources of food simultaneously

• Birds broadcast information locally

• Best at finding continuous solutions

Swarm Theory: Setting it upA large company is looking to relocate their offices. There are five spaces in a large building nearby. All of the spaces could serve as a new location, but one of them is optimal. How should the executives choose their new office space?

1. Define the domain 2. Create an algorithm3. Write instructions

for the agent4. Define the criteria

for completion

Defining the Domain

Domain – the set of all possible input values to a function.

In this case, the domain is a set of options:

5 different office spaces

“Choose the Best Space”

Creating an AlgorithmAlgorithm – a step by step procedure for solving a problem, usually iterative

1.Positive Feedback –>2.Negative Feedback –>3.Fluctuation –>

4.Multiple Interactions –>

Written reportsOld reports on bottomRandom #’s

•Choose space to evaluate

•# of good reports increases chance being chosen

Iteration

“Choose the Best Space”

Building the AgentEach agent in a swarm is given a set of simple instructions that require it to search the domain, test its surroundings and communicate results.

1.Go to new office site and evaluate.2.Write a report on what you find.3.Share information with your company.

“Choose the Best Space”

Setting the ThresholdEvery swarm intelligence program must know when to stop…that stopping point is called the threshold.

1.End if the # of good reports >= 152.End if no consensus after N iterations

*N is a number that you choose and can play with.

“Choose the Best Space”

What’s the Logic Behind This?To show the logical flow of our algorithms, we will construct flowcharts (a diagram that shows the process of an algorithm). To do so, we must answer some questions:

1.Where do we start? What’s the initial state?2.How do we randomize?3.How do we evaluate?4.What information is retained in each iteration?

What’s the Logic Behind This?To show the logical flow of our algorithms, we will construct flowcharts (a diagram that shows the process of an algorithm):

Init

Random Walk

Write Positive Report

Write Negative Report

yes

yes

no

no

Just Visited Site?

Like the Site?

Swarm Theory• Homework:

– Read over tomorrow’s lecture (U1 L6.ppt)• Pop quiz is possible

– Set up a swarm intelligence to solve this problem:• A nest of ants are looking for food in a large field that is

divided up into a 8x8 grid. In one of the grids are balls representing food. The food can only be “found” if an agent enters a grid space adjacent to the food. What is the shortest route to the food?

Swarm TheoryAnts(A) are looking for food(F) in a large field that is divided up into a 8x8 grid. In one of the grids are balls representing food. The food can only be “found” if an agent enters a grid space adjacent to the food. What is the shortest route to the food?

F

A

1. Define the domain 2. Create an algorithm3. Write instructions

for the agent4. Define the criteria

for completion