码迷,mamicode.com
首页 > 其他好文 > 详细

<AI> First order logic

时间:2016-01-05 15:24:55      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:

First-order logic (FOL) === First-order Predicate Logic

Informal definition:
The world consists of objects, i.e., things with individual ‘identities‘
and ‘properties‘ that distinguish them from other objects.
FOL commits to the existence of ‘objects‘ and ‘relations‘, it does not
make an ontological commitment. (No class, time, events concepts)

FOL can express anything that is programmable.

Formal definition:
FOL gets its name from the fact that one can quantify over objects
(the first-order entities that actually exist in the world) but not over
relations or functions on those objects.
In contrast, higher-order logic allows us to quantify over relations and
functions as well as over objects.
Higher-order logics have strictly more expressive power, however, of
which the general problem is undecidable.

Syntax and Semantics:
FOL is made up by two basics: ‘sentence‘ and ‘terms‘.
Every expression is a ‘sentence‘, which represents a fact.
And ‘terms‘, which represent objects.

‘Sentences‘ are built by ‘quantifiers‘ and ‘predicate symbols‘.
‘Terms‘ are built by ‘Constant symbols‘, ‘Variables‘ and ‘Function
symbols‘.

Sentence -> Atomic-Sentence
| Sentence Connective Sentence
| Quantifier Variable, … Sentence
| ¬ Sentence | (Sentence)
Atomic-Sentence -> Predicate(Term, …) | Term = Term // facts
Term -> Function(Term, …) | Constant | Variable // objects
Connective -> ⇒ | ? | ? | ⇔
Quantifier -> ∀ | ∃
Constant -> A | X1 | John | …
Variable -> a | x | s
Predicate -> Before | HasColor | Raining | …
Function -> Mother | LeftLegof | …
Operator -> λ | ?

‘Logical Connectives‘ is used to construct complex sentences.
eg. Brother(Richard, John) ^ Brother(John, Richard).
‘Quantifier‘: ∀ -> Universal quantifier;
∃ -> Existential quantifier;
∃!-> Uniqueness quantifier.
Negation relationship: ∃ Pred() <=> ¬∀ ¬Pred().

‘Operator‘:
* Lambda operator(λ):
useful to construct complex predicates and functions from
simpler components, or complex terms form simpler ones.
* Uniqueness operator(?):
More convenient to have a term representing the unique object
directly. The notation ?x P(x) is commonly used.

Axioms: All the results get from first-order logic is based on axioms.
Mathematicians write axioms to capture the basic facts about a
domain, define other concepts in terms of these basic facts,
and then use the axioms and definitions to prove theorems.

In mathematics, an independent axiom is one that cannot be
derived from all the other axioms. Mathematicians strive to
produce a minimal set of axioms that are all independent.

In AI, common to include redundant axioms, not because of what
can be proved, but because they make proof more efficient.


The eight axioms of the domain of sets:
1. The only sets are the empty set and those made by adjoining something
to a set.
2. The empty set has no elements adjoined into it.
3. Adjoining an element already in the set has no effect. (Uniqueness)
4. The only members of a set are the elements that were adjoined into
it.
5. A set is subset of another iff all of the first set’s members are
members of the second set.
6. Two sets are equal iff each is a subset of the other.
7. An object is a member of the intersection of two sets iff it is a
member of each of the sets.
8. An object is a member of the union of two sets if and only if it is a
member of either set.


Logical Agents:
1. ‘reflex agents‘
that only classify percepts and act accordingly.
2. ‘model-based agents‘
that construct an internal representation of the world and use
it to act.
3. ‘goal-based agents‘ (usually also model-based)
that form goals and try to achieve them.

- Model based:
Two main kinds of synchronic rules of Deducing Hidden Properties:
1. ‘Causal rule‘ (deducing from the reason)
reflect the assumed direction of causality in the world: some
hidden property of the world causes certain percepts to be
generated.
2. ‘Diagnostic rule‘ (deducing from the result)
to infer the presence of hidden properties directly from
percept-derived information.


Knowledge Engineering Process
1. Identify the task (problem specification/ definition)
2. Assemble the relevant knowledge (system analysis)
3. Decide on a vocabulary of predicates, function and constants (design)
4. Encode general knowledge about the domain (coding)
5. Encode a description of the specific problem instance –
precepts/ inputs to handle (coding sub-programs, I/O)
6. Pose queries to get answers (testing & evaluation)
7. Debug the knowledge base (testing & evaluation)

<AI> First order logic

标签:

原文地址:http://www.cnblogs.com/mjust/p/5102159.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!