Association applications?

What are the (practical) Unification applications ? Where is it actually used in the real world?

I could not understand the whole idea of ​​what it is and why it is considered as part of Artificial Intelligence.

+3
source share
4 answers

Unification is a substitution process . I saw that this is called a “two way match”.

In Prolog, in other logical programming languages ​​and in languages ​​directly based on rewrite logic ( Maude , Elan , etc.), this is the mechanism by which free (logical) variables are associated with terms / values. In Concurrent Prolog, these variables are interpreted as communication channels.

IMO, the best way to understand this with some examples from mathematics (unification was / is the basic key mechanism, for example, in the context of automated research by theoretical theorists, AI sub-field, other use in type inference algorithms ). The following examples are taken from the context of a computer algebra system (CAS) :

First example:

Q * + , * - +, :

X * (Y + Z)   =   (X * Y) + (X * Z)   |1|

( - ).

, :

a * (1 + b)   |2|

we ( ) , | 2 |, (lhs) of | 1 | () ( , mgu):

{X/a, Y/1, Z/b}   |3|

, | 3 | (rhs) | 1 |, , :

(a * 1) + (a * b)

, . .

:

:

log(X,Y) + log(X,Z)   =>   log(X,Y*Z)   |4|

:

log(e,(x+1)) + log(e,(x-1)) = k   |5|

(lhs of | 5 | lhs of | 4 |), mgu:

{X/e, Y/(x+1), Z/(x-1)}   |6|

, X x - . : X Y, , (x + 1) (x-1), .

mgu, | 6 |, rhs of | 4 | | 5 |; :

log(e,(x+1)*(x-1)) = k   |7|

..

(, , .)

+7

. , .

+5

Prolog, , , - . . , , .

+2

, , .

, . , . "" .

- , , , dir x*y*.z*, , .

Artificial intelligence likes to use inference mechanisms to try to mimic reasoning from a body of knowledge, usually in the form of statements in logic. To choose a stupid example, you can “know” that “all people are mortal,” as in forall(x)(man(x) implies mortal(x)). Then, if you ask the question "Sam mortal" like mortal(Sam)?, you can combine it with the rule to get a new question: "Sam is a man"man(Sam)?

Hope this helps.

+1
source

Source: https://habr.com/ru/post/1722115/


All Articles