Learn

Sunday, 3 December 2017

How to use Login in AI? Which Libraries are used in Artificial Intelligence Logic programming


Logic:

    Logic is the basis for both Knowledge Representation and for reasoning about knowledge. We will encode knowledge using logic and see that we can then infer new facts that are not explicitly asserted.

    First Order Logic was invented by the philosophers Frege and Peirce and is the most widely studied logic system. Unfortunately, full First Order Logic is not computationally tractable for most non-trivial problems so we use more restricted logics. We will use two reasoning systems in this book that support more limited logics:

  • We use PowerLoom is this chapter. PowerLoom supports a combination of limited first order predicate logic and features of description logic. Power-Loom is able to classify objects, use rules to infer facts from existing facts and to perform subsumption (determining class membership of instances).

  • We will use RDF Schema (RDFS) reasoning in Chapter 4. RDFS supports more limited reasoning than descriptive logic reasoners like PowerLoom and OWL Description Logic reasoners.


Examples of Different Logic Types:

Propositional logic is limited to atomic statements that can be either true or false:

Brady-is-a-bird

Brady-has-feathers

First Order Predicate Logic allows access to the structure of logic statements dealing with predicates that operate on atoms. To use a Prolog notation:

feathers(X) :- bird(X).

bird(brady).

Here “feathers” and “bird” are predicates and “Brady” is an atom. The first example states that for all X, if X is a bird, then X has feathers. In the second example, we state that Brady is a bird. Notice that in the Prolog notation that we are using, variables are capitalized and predicate names and literal atoms are lower cases. Here is a query that asks who has feathers:

?- feathers(X).

X = brady

                    In this example, through inference, we have determined a new fact, that Brady has feathers because we know that Brady is a bird and we have the rule (or predicate)  stating that all birds have feathers. Prolog is not strictly a pure logic programming language since the order in which rules (predicates) are defined changes the inference results. Prolog is a great language for some types of projects (I have used Prolog in both natural language processing and in planning projects). We will see that PowerLoom is considerably more flexible than Prolog but does have a steep
learning curve.

Description Logic deals with descriptions of concepts and how these descriptions define the domain of concepts. In terms used in object-oriented programming languages:

                  membership in a class is determined implicitly by the description of the object and not by explicitly stating something like “Brady is a member of the bird class.” Description logics divide statements into relations (historically referred to as TBox) and concepts (historically called ABox). We would say that a statement like “All birds have feathers” is stored in the TBox while a specific assertion like “Brady is a bird” is stored in the ABox. 

No comments:

Post a Comment