Simulation-Based Engineering of Complex Systems Module 6: Adaptive Rule Systems 1 Dr. John R. Clymer, INCOSE Fellow University of Waterloo October 6-7, 2010
Mar 16, 2016
Simulation-Based Engineering of Complex Systems
Module 6:Adaptive Rule Systems
1
Dr. John R. Clymer, INCOSE Fellow
University of WaterlooOctober 6-7, 2010
2
• If (X’ > (A-C1)) && (X’ < A) Then CF = (X’ – (A-C1))*100 / C1
• If (X’> =A) && (X’<=B) Then CF = 100• If (X’ >B) && (X’<B+C2) Then CF = (X’-(B+C2))*100/C2
• If (X’< (A-C1)) || (X’ > (B+C2)) Then CF = 0
Recap: Parameters A, B, C Define a Fuzzy Set
• Each rule condition fuzzy set function has both domain X and Confidence Factor (CF)
• As X’ moves towards A, CF increases to its local maximum. It maintains this maximum CF until B, where CF decreases to zero. In OpEMCSS/CASSim the fuzziness, C=C1=C2.
• At the top of the trapezoidal shape the CF is 100
CF
X
2X’
1
3
Recap: Using Fuzzy Rules to Map Analog Input X into Analog Output Z
• Attribute value X shown is obtained for a rule condition fact
• The Condition Fuzzy set definition for the fact is used to obtain the degree of Fuzzy set membership CF
• If several Fuzzy Conditions are combined by an AND operation, the minimum CF for each fact is used for value X
• X is then used to obtain values Z1 and Z2 as shown above
• A weighted average Z’ is computed for all eligible rules that have the same action name but different value names
4
Module 6: Adaptive Rule Systems
• Concepts for Rule Adaptation and Creation in Intelligent Adaptive Systems • Case study: Vehicle Routing in a Traffic
Grid• Case study: Sonar System Study• Summary
5
Intelligent Adaptive Agent Concept (1)
• Sensors perceive raw data.• Signal processing measures “what is out there” and
produces environmental state vectors.
6
Intelligent Adaptive Agent Concept (2)
• Feature Extraction first maps environmental state vector to a smaller set of decision features
• Classifier next discovers the exact knowledge facts or features that are most relevant to agent decisions
Create manageable decision set
7
Intelligent Adaptive Agent Concept (3)
• Create reward or punishment criteria by evaluating the environment, based on the degree of goal satisfaction or from actual environmental payoff
• Pass these criteria on to the Feature Extraction block (CASSimTM only) to compute fitness values to guide evolutionary search
• Pass these criteria to the classifier for rule evaluation
Select Reward Criteria
8
Module 6: Adaptive Rule Systems
• Concepts for Rule Adaptation and Creation in Intelligent Adaptive Systems
• Case study: Vehicle Routing in a Traffic Grid
• Case study: Sonar System Study• Summary
9
Vehicle Network Traffic Control• Each intersection traffic control subsystem is
an intelligent agent• Agents apply fuzzy sets and fuzzy rules to
decide intersection offset time• Manual Rule development during design
process• No automatic rule learning
Agents communicate and collaborate to minimize vehicle waiting time at intersections.
10
Each Intersection Is An Intelligent Traffic Control Agent
SINGLE AGENT
11
Concepts Used To Describe Traffic Flow
• STREAM measures how many vehicles are waiting• FLOW measures how many vehicles do not wait• OFFSET changes can reduce STREAM
12
Traffic Flow Features Derived From Concepts
• For each direction of traffic flow there are four features– Stream count– Stream count first difference– Flow count– Flow count first difference
• Average of stream count + stream count difference is computed for each direction of traffic flow
13
Traffic Flow Decision Features Fuzzy Control Rule Conditions
• Average traffic flow features are combined for rule conditions – North-south + south-north– East-west + west-east
• Only averages for directions under control are included
• Traffic flows coming into the network are not under control
14
Decision And Control Features As Fuzzy Sets
(Range 0-15 sec)
15
Rules Used To Decide Offset
16
Traffic Control Model
Gain allows easy modification of the classifier offset decisions which
is in the range of (0-15 sec)
17
Control Gain Equal Zero
Red: PayoffBlue: Avg WaitWhite: Avg PayoffGreen: Offset
Average payoff (white) at -5 indicates we have long waits.
18
Control Gain Equal Two
Red: PayoffBlue: Avg WaitWhite: Avg PayoffGreen: Offset
Average payoff (white) +8.5 indicates we have greatly reduced the overall average waiting time in the network.
19
Control Gain Equal Four
Red: PayoffBlue: Avg WaitWhite: Avg PayoffGreen: Offset
Average payoff (white) indicates chaotic operation with more average waiting in the network!
20
Module 6: Adaptive Rule Systems• Concepts for Rule Adaptation and
Creation• in Intelligent Adaptive Systems • Case study: Vehicle Routing in a Traffic
Grid• Case study: Sonar System Study• Summary
21
Sonar Network Scenario
• Surface Ships and Submarines enter the scenario randomly from anywhere on the circle
• Surface Ships and Submarines are given a vector that moves through the sonar array
We want to learn the rules that will correctly classify surface ships and submarines.
22
SonarNet Scenario Simulation Model
Compute MOEs
Timeout System
Response
23
Surface Ship or Submarine Number and Initial Position are Randomly Selected
• Theta is angle of arrival on scenario circle• ShpNum is random and is one of 3 ships or 9 submarines depending on PrbShp• Each of the 12 ships/submarines have a set of signals that are detectable at various ranges
24
Input Event Action Block Provides Ship/Submarine Definition Parameters
• Row and End define begin and end of signals associated with a ship or submarine in the Signal file
25
Initialize Agent Event Action Block Creates Ship/Submarine Agent in the Model
26
Initialize Agent Event Action Block Creates Sonar Agent in the Model
27
Change Agent Event Action Block Schedules an Interaction Between Ship/Submarine and Sonar
Agents
28
Input Event Action Block Provides Range of Detection and Correct Classification
Each ship/submarine signal is detectable at a unique range.
29
Input Event Action Block Provides Signal Features
Signal features define environmental state vector that is input to the classifier.
30
Initial Rule File used for Rule Learning (portion shown)
You must have a set of rules that cover at least one of the above 5 feature dimensions.
31
Classifier Event Action Block Display Dialog
32
Classifier Event Action Block Learning Dialog
33
Reward Event Action Block Compares Classification (Class) Against Classifier Decision
(Decision)
If Class = Decision Reward = positive if different = negative.
34
Local Event Action Block Counts Ship and Submarine Detections
35
Local Event Action Block Determines Majority Decision
• Each sonar agent in range of signal makes a decision and increments global counts which are used to determine majority decision
Individual sonar array agents collaborate while tracking the same ship or submarine.
36
Global Event Action Block Counts Number of Incorrect Decisions For MOE Calculation (1)
37
Global Event Action Block Counts Number of Correct Decisions For MOE Calculation (1)
38
Compute MOEs
Timeout System
Response
Sonar Net Scenario Simulation Model
39
Sonar Net Scenario Simulation Conclusions
• Classifier block finds a set of rules that enables each individual sonar agent to correctly classify 99.99% of all signals for each ship/submarine signal combination that it sees
• Based on an aggregated classification, across agents that see the signals for the same ship/submarine, 100% of surface ships and submarines are correctly classified
40
Module 6: Adaptive Rule Systems• Concepts for Rule Adaptation and
Creation in Intelligent Adaptive Systems • Case study: Vehicle Routing in a Traffic
Grid• Case study: Sonar System Study• Summary
41
Summary of Module 6• Learned Concepts of Rule Adaptation and
Creation for Intelligent Adaptive Systems• Studied case of planning Vehicle Traffic
Routing in OpEMCSS• Studied case of classifying surface ships and
submarines in an intelligent sonar network