.


:




:

































 

 

 

 





, , , , explore. :

explorer not Goal, Trace, Answer):-!,

explore (Goal, Trace, Answer.!),

invert (answer!. Answer). % :

invert (Goal is true was Found, (not Goal) is false was Found). invert (Goal is false was Found, (not Goal) is true was Pound).

, Goal , . , , :?- expert.

Question, please:

not (X eats meat).

Any (more) solution to: Animal eats meat?

378 II. Prolog


 

yes.

Animal = tiger.

:
not [tiger cats meat) is false % not (tiger eats meat)

. , : not (X eats meat) * ,

: " X, X ?" , explore { ), .

1. X, , X ?

2. , .

3. not (tiger eats meat) .

, : " , X ?" , . : explore , X :

X not (X eats meat)? , , , : X X, not (X eats meat)?

, . . .

not Goal, Goal, :

Goal , . Goal ;

Goal' Goal

 

Goal' , Goal,

not Goal ;

Goal' Goal

Goal' , Goal,

not Goal.

, . . 16.2 broken_rule:

broken_rule:: if on(Device) and

device (Device) and % Device not working." Device) and connected(Device, Fuse) and proved(intactf Fuse)) then proved! broken (Device)).


16.



 


device(Device)

""

not working; Device)

.

16.1. , .

rulel:.: if bottle empty then john drunk. 'i , 12:: if Dohn_drunk then bottlejanpty. 'i ,

explore . explore, . Trace. : , , , , .





:


: 2015-10-01; !; : 372 |


:

:

, , .
==> ...

1800 - | 1479 -


© 2015-2024 lektsii.org - -

: 0.009 .