Simulation-Based Engineering of Complex Systems Dr. John R. Clymer, INCOSE Fellow
Module 6: Adaptive Rule Systems
University of Waterloo October 6-7, 2010
1
Recap: Parameters A, B, C Define a Fuzzy Set • 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
CF
X
X’
1
2
• If (X’< (A-C1)) || (X’ > (B+C2)) Then CF = 0
• 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 2
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
3
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
4
Intelligent Adaptive Agent Concept (1)
• Sensors perceive raw data. • Signal processing measures “what is out there” and produces environmental state vectors. 5
Intelligent Adaptive Agent Concept (2)
Create manageable decision set
â&#x20AC;˘ Feature Extraction first maps environmental state vector to a smaller set of decision features â&#x20AC;˘ Classifier next discovers the exact knowledge facts or features that are most relevant to agent decisions 6
Intelligent Adaptive Agent Concept (3) Select Reward Criteria
• • •
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 (CASSim TM only) to compute fitness values to guide evolutionary search Pass these criteria to the classifier for rule evaluation
7
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 8
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. 9
Each Intersection Is An Intelligent Traffic Control Agent
SINGLE AGENT 10
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 11
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 12
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 13
Decision And Control Features As Fuzzy Sets
(Range 0-15 sec)
14
Rules Used To Decide Offset
15
Traffic Control Model
Gain allows easy modification of the classifier offset decisions which is in the range of (0-15 sec) 16
Control Gain Equal Zero Red: Payoff Blue: Avg Wait White: Avg Payoff Green: Offset
Average payoff (white) at -5 indicates we have long waits. 17
Control Gain Equal Two Red: Payoff Blue: Avg Wait White: Avg Payoff Green: Offset
Average payoff (white) +8.5 indicates we have greatly reduced the overall average waiting time in the network. 18
Control Gain Equal Four Red: Payoff Blue: Avg Wait White: Avg Payoff Green: Offset
Average payoff (white) indicates chaotic operation with more average waiting in the network! 19
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 20
Sonar Network Scenario â&#x20AC;˘ Surface Ships and Submarines enter the scenario randomly from anywhere on the circle â&#x20AC;˘ 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. 21
SonarNet Scenario Simulation Model Compute MOEs
Timeout System Response
22
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
23
Input Event Action Block Provides Ship/Submarine Definition Parameters
â&#x20AC;˘ Row and End define begin and end of signals associated with a ship or submarine in the Signal file 24
Initialize Agent Event Action Block Creates Ship/Submarine Agent in the Model
25
Initialize Agent Event Action Block Creates Sonar Agent in the Model
26
Change Agent Event Action Block Schedules an Interaction Between Ship/Submarine and Sonar Agents
27
Input Event Action Block Provides Range of Detection and Correct Classification
Each ship/submarine signal is detectable at a unique range. 28
Input Event Action Block Provides Signal Features
Signal features define environmental state vector that is input to the classifier. 29
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. 30
Classifier Event Action Block Display Dialog
31
Classifier Event Action Block Learning Dialog
32
Reward Event Action Block Compares Classification (Class) Against Classifier Decision (Decision)
If Class = Decision Reward = positive if different = negative. 33
Local Event Action Block Counts Ship and Submarine Detections
34
Local Event Action Block Determines Majority Decision â&#x20AC;˘ 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. 35
Global Event Action Block Counts Number of Incorrect Decisions For MOE Calculation (1)
36
Global Event Action Block Counts Number of Correct Decisions For MOE Calculation (1)
37
Sonar Net Scenario Simulation Model Compute MOEs Timeout System Response
38
Sonar Net Scenario Simulation Conclusions â&#x20AC;˘ 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 â&#x20AC;˘ 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 39
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 40
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
41