Page 47 - Ai V2.0 Flipbook C8
P. 47

Rule-Based AI
                 Rule-based approach is based on a set of rules and a set of facts already fed to the machine to
                 generate the desired output. These models can operate with simple basic information and data.
                 The relationship or patterns in the data is defined by the developer.

                 IF X happens THEN do Y
                 Examples of rule-based AI
                 Example 1: If IT RAINS Then TAKE AN UMBRELLA

                 Example 2: If TRAFFIC LIGHT TURNS RED Then STOP THE CAR
                 Let us understand the concept of a Rule-Based AI system using a given scenario.

                 You have a dataset containing 100 images of chairs and 100 images of tables. To train your
                 machine, you provide this data and label each image as either a chair or a table. When you test
                 the machine with a new image of a chair, it compares this image to the labelled training data and
                 identifies it as a chair based on those labels. This method is known as a rule-based approach,
                 where the rules are the labels assigned to the training data.



                                                                                       Rule-based Approach

                                                                Labelled Datasets




                                                                                              Model
                                                              Used to Train Machine         Used to Test Machine















                                                                       Output                        Training Data






                            Machine Identifies the Image as Table                            Testing Data


                 Based on various guidelines, we can make different choices.


                 Now, let’s explore another type of learning.
                 Instead of explicitly programming rules such as "if this happens, then do that", we let the system
                 discover patterns or rules by itself that help solve the problem.





                                                                              Stages of AI Project Cycle  45
   42   43   44   45   46   47   48   49   50   51   52