12.07.2015 Views

flex Examples - LPIS

flex Examples - LPIS

flex Examples - LPIS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

22 Flex Example ListingsAre its teeth pointed or blunt? ;choose one of teeth_types .group teeth_typespointed, blunt, other.% The next section defines the ruleset and rules used in the% forward-chaining method.ruleset identifycontains identity_rules;update ruleset by removing each selected rule .group identity_rulesmammal, bird, feeding_type_1, feeding_type_2,species_1, species_2, species_3, species_4,species_5, species_6, species_7 .% The following rule has a disjunction in its conditions.% It will be fired if either of the conditions hold.rule mammalif the body_covering is hairor the feeds_young_on is milkthen the creature`s genus becomes mammal .rule birdif the creature`s genus is unknownand [ the body_covering is feathersor the motion is fliesand the reproduction is eggs ]then the creature`s genus becomes bird.% The "or" in the following rule says that either the first two% conditions must be true or the next three conditions must be true% before the rule can be fired.rule feeding_type_1if the creature`s genus is mammaland the eats is meator the teeth is pointedand the feet is clawsand the eyes is point_forwardthen the creature`s feeding_type becomes carnivore.% The "or" in the following rule is restricted to the last two conditions% by the presence of the square brackets. This means that the first two% conditions must hold along with either of the last two before the rule% can be fired.rule feeding_type_2if the creature`s genus is mammaland the creature`s feeding_type is unknownand [ the eats is grassor the feet is hoofs ]then the creature`s feeding_type becomes ungulate.rule species_1A Guide to the Flex Expert System Toolkit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!