70 likes | 294 Views
Knowledge. Floyd Nelson A.D. 2009 Dec 29. Structure. IF ( that happens ) THEN ( then this will happen ) Improper : IF(the ball moves up) THEN(the ball will later fall down) Proper : IF( I see the ball move up) THEN( I will later see the ball move down). obj1 = ball t = time (frames)
E N D
Knowledge Floyd Nelson A.D. 2009 Dec 29
Structure • IF(that happens) THEN(then this will happen) • Improper: IF(the ball moves up) THEN(the ball will later fall down) • Proper: IF(I see the ball move up) THEN(I will later see the ball move down) • obj1 = ball • t = time (frames) • IF(obj1 move up @ -300 ≤ t ≤ 0) THEN(obj1 move down) • IF((a AND b) OR c) THEN(z) • IF(I see a light bulb AND a light switch up OR I see the sun) THEN(I will see light)
Levels • levels • occurrence: the number of times the ‘if part’ occurs • OCC = sum(IF_PART) • accuracy: the number of times the ‘then part’ occurs after the ‘if part’ occurs • ACC = sum(IF_PART×THEN_PART) • assurance: the ratio of how often the knowledge is correct • ASS = ACC/OCC • If the AIS wonders what the probability that a knowledge will occur at a particular moment: • PREDICTION • PRED = IF_PART_CURRENT × ASS
logic • NOT a 1 - a • a AND b a × b • a OR b 1 – ((1-a) × (1-b)) • NOT(NOT(a) AND NOT(b)) = a OR b • NOT(NOT(a) OR NOT(b)) = a AND b • a OR b OR c OR d = OR(a, b, c, d) • a AND b AND c AND d = AND(a, b, c, d)
Testing values • 1 dimensional inputs/outputs • |test-actual|/max • high ≥ test ≥ low • multidimensional • leave it to the multidimensional processing system to figure out
Organization • Postfix form is typically best for processors. • Prefix form is typically best when using array functions. • The inputs/variables are alphabetized. • AND(a, b, c, d) a, b, c, d, 4, AND • AND(a, OR(b, c), d) b, c, 2, OR, a, d, 3, AND • OR(d, e, a, c, b) a, b, c, d, e, 5, OR
Fragment Combining Logic • IF() THEN(this is affected) • IF() THEN(this is not affected)