domingo, 22 de diciembre de 2019

OBJECTIVE 
     The main objective of this blog is to present general aspects and characteristics about Expert.


INTRODUCTION 

     The term artificial intelligence (AI) refers to the ability to emulate the intelligent functions of the human brain. The use of AI is varied and is currently used  in the areas of computer science and robotics. The AI field covers several topics among which are expert systems.

     Expert Systems (SE) can be considered as a subset of AI. The SE is an “expert system based on knowledge”. These systems employ human knowledge captured on a computer to solve problems that normally require human experts. Well-designed systems mimic the reasoning process that experts use to solve specific problems. 

     Experta is an expert system. This expert system is a Python library for building expert systems strongly inspired by CLIPS.

DEVELOPMENT

     An expert system is a program capable of pairing up a set of facts with a set of rules to those facts, and execute some actions based on the matching rules.

Facts
Facts are the basic unit of information of Experta. They are used by the system to reason about the problem.
The class Fact is a subclass of dict: 

You can mix autonumeric values with key values, but autonumerica must be declared first: 


You can subclass Fact to express different kinds of data or extend it with your custom functionality.

Rule
In Experta a rule is a callable, decorated with Rule. Rules have two components, LHS (left-hand-side) and RHS (right-hand-side).

·         The LHS describes (using patterns) the conditions on which the rule * should be executed (or fired).

·         The RHS is the set of actions to perform when the rule is fired.



      For a Fact to match a Pattern, all pattern restrictions must be True when the Fact is evaluated against it. You can use logic operators to express complex LHS conditions.
 Facts and Patterns 
     The difference between Facts and Patterns is small. In fact, Patterns are just Facts containing Pattern Conditional Elements instead of regular data. They are used only in the LHS of a rule. If you don’t provide the content of a pattern as a PCE, Experta will enclose the value in a LiteralPCE automatically for you.

Also, you can’t declare any Fact containing a PCE, if you do, you will receive a nice exception back.
DefFacts
       Sometimes expert systems needs a set of facts to be present for the system to work. This is the purpose of the DefFacts decorator.

Install
     Any person can install Experta. Here are some of the steps o ways that a person can follow:
  • To install Experta, run this command in your terminal: $ pip install expert
  • Experta is developed on Github. You can clone the repository using the git command: $ git clone https://github.com/nilp0inter/experta.git
  • Or you can download the releases (from this web page: https://github.com/nilp0inter/experta/release) in .zip or .tar.gz format. 
  • Once you have a copy of the source, you can install it running this command: $ python setup.py install

And this is all, you can work with this system. 

Some difference between Experta and Clips

Experta only relies on Clips, but they have well-defined differences, among which we have:

1.      CLIPS is a programming language, Experta is a Python library. This imposes some limitations on the constructions we can do (specially on the LHS of a rule).
2.      CLIPS is written in C, Experta in Python. A noticeable impact in performance is to be expected.
3.      In CLIPS you add facts using assert, in Python assert is a keyword, so we use declare instead.

CONCLUSION


An expert system have a lot of advantages. One of them is that unlike an expert human, this will always have a full and good performance despite the long hours of work. Otherwise, CLIPS is a tool designed for create and programe these systems. Although it is possible to implement the clips tool from the Python programming language for the creation of expert systems, the Expert library implements the logic of CLIPS within Python. This simplifies the creation of expert systems, even if these systems have a high degree of complexity.


Note: the information use in this page is from the official website of EXPERTA. https://experta.readthedocs.io/


No hay comentarios:

Publicar un comentario