Structure of rule based expert system Longterm memory
Structure of rule based expert system Long-term memory Short-term memory Facts Production Rules Reasoning Conclusion
Inference engine match-fire procedure Database Fact: A is x Fact: B is y Match Fire Knowledge base Rule: If A is x then B is y
Probability of A A
Probability of B B
Joint probability of A and B A A B B
Boolean logic examples • Quick cars run a 14. 1 second quarter mile or better. • People with hairy backs have 2500 or more hairs on their backs. • Motors that run really hot are 245 degrees or more. Quick Slow 14. 1 sec Bald Hairy 2500 hairs Cold Hot 245 degrees
14. 1 seconds 2007 Corvette Z 06 1988 Pro-stock Firebird (13. 05) (7. 88) 1984 VW Diesel Rabbit (19. 8) 1969 Camaro Z 28 (14. 2) 2003 Camaro SS 1966 427 Cobra (11. 5) 2006 Nissan Maxima (15. 2)
Crisp “Tall Men”
Fuzzy “Tall Men”
Fuzzy ‘short, average, tall men’
Crisp ‘short, average, tall men’
Start Generate Population of Chromosomes of size N: x 1, x 2…xn Calculate fitness of each Chromosome: f(x 1), f(x 2)…f(xn) Terminate? Yes No Select pair of chromosomes for mating Crossover: p(c) Mutation: p(m) Add new chromosome to population No Is new Population complete? Yes Replace current population with new population Stop
Start Get number of generations Generate Population of Parameters of size N: x(1) to x(n) Calculate solution associated with parents: X = f(x(1)…. x(n)) Create a population of offspring parameters: x’(1) = x(1) + µ x’(2) = x(2) + µ ; µ is a random peturbation Calculate solution associated with offspring: X’ = f(x’(1)…. x’(n)) No Is X’ better than X ? yes Replace X with X’ No Number of generations complete? yes Stop
Start Generate Population of S-expressions of size N Calculate fitness of each S-expression Rank S-expressions by fitness yes Terminate? No Transfer best S-expression to new population clone Select one S-expression Select generic operator crossover Select pair of S-expressions mutate Select one S-expression Breed New population Complete? yes Replace old population with new population Stop
Simple diagram of a Neuron Soma Som a Synapse Axon Dendrites
Soma
x(1) w(1) x(2) x(. . ) w(2) Dot product w(. . ) x(. . ) w(n) x(n) y Transfer function
- Slides: 17