PowerPoint Presentation - C3I Systems 2

Download Report

Transcript PowerPoint Presentation - C3I Systems 2

Advanced Plotting
Lecture 17: Supporting Material
Dr Kathryn Merrick
Tuesday 29th April, 2009
Overview
 Advanced plotting:
 Surface plots
 Animations
 A real world AI
application
Ref: Text book, Ch 6.
One Last Problem…
Artificial Intelligence
 Creating man-made systems with some aspect(s) of
human or animal intelligence.
 For example:
 Ability to learn
 Exploratory behaviour
 Ability to make plans
 Human-like emotions
 …
Swarm
Intelligence
Today’s Example:
 Particle swarm optimisation (PSO):
 A technique for building artificial systems that
can search and locate something important
 Uses the idea of swarm
intelligence. Eg: bees
searching for nectar
Particle Swarm Optimisation
 Algorithm (pseudocode):
Given a landscape and a search time
Randomly locate a swarm of agents
Repeat until time is up:
Repeat for each agent
Compute fitness of agent
Record if this is the fittest agent so far
Move the agent
Particle Swarm Demonstration in MATLAB:
Search and locate the highest point on a
landscape
Surface Plots
surf(x_vals, y_vals, z_vals);
surf(x_vals, y_vals, z_vals);
axis([xmin, xmax, ymin, ymax,
zmin, zmax]);
axis([xmin, xmax, ymin, ymax]);
Asymmetric Subplots
subplot(2, 2, 1);
...
subplot(2, 2, 2)
...
subplot(2, 2, [3 4]);
...
‘Replace’ Animations
% set current axis to
‘replace’ mode
hold(gca, ‘off’);
...plot code to replace old
material goes here...
% control speed of
animation with
pause(0.1)
‘Add’ Animations
% set current axis to ‘add’ mode
hold(gca, ‘on’);
...plot code to add to old material goes here...
Summary
 After today’s lecture you
should be able to:
 Make surface plots
 Use hold to progressively
modify (animate) a plot
 Construct asymmetric
subplots