Rubylabor: Ablauf Forward Chaining

Schritt 1

VariableValue
size medium
num_doors 3
Vehicle
num_wheels 4
motor yes
VehicleType

Rules
bycle
? VehicleType = cycle
0 num_wheels = 2
0 motor = no
Vehicle = Bicyle
tricle
? VehicleType = cycle
0 num_wheels = 3
0 motor = no
Vehicle = Tricyle
motorcycle
? VehicleType = cycle
0 num_wheels = 2
1 motor = yes
Vehicle = Motorcycle
sportscar
? VehicleType = automobile
0 size = small
0 num_doors = 2
Vehicle = Sports_Car
sedan
? VehicleType = automobile
1 size = medium
0 num_doors = 4
Vehicle = Sedan
minivan
? VehicleType = automobile
1 size = medium
1 num_doors = 3
Vehicle = MiniVan
SUV
? VehicleType = automobile
0 size = large
0 num_doors = 4
Vehicle = Sports_Utility_Vehicle
Cycle
0 num_wheels < 4
VehicleType = cycle
Automobile
1 motor = yes
1 num_wheels = 4
VehicleType = automobile

Nächster Schritt


Copyright © 2004 by Karsten Meier. All Rights reserved.