logic programming - a living formula luís moniz pereira centro de inteligência artificial, unl...

34
Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL http://centria.di.fct.unl.pt/~lmp/ Email: [email protected] FCT/UNL, 15 de Abril 1999

Upload: meghan-greer

Post on 13-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Logic Programming -a living formula

Luís Moniz Pereira

Centro de Inteligência Artificial, UNL

http://centria.di.fct.unl.pt/~lmp/

Email: [email protected]

FCT/UNL, 15 de Abril 1999

Page 2: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Overview

Evolution and reasoningLogic and the computerRole of AI in logicWhat is happening with LP nowadays?Logical based agentsInformation Ecosystems

Page 3: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Evolution and reasoning

Evolution has provided humans with: symbolic thought symbolic language communication abilities

The pervasiveness of logic forknowledge representation and reasoningrests on its ability to promote:

rational understanding common objectivity

Page 4: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Evolution and reasoning (2)

New reasoning methods have been invented throughout human history:proof by contradiction transfinite induction recursionabductioncontradiction removaletc.

Logic Programming and AI improve old methods, and create new reasoning methods

Page 5: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Logic and the computer

Logic provides a content independent formulation of the laws of thought

Logic articulates an intensional with an extensional view of predicates

The language of logic is symbolic and its rules content-independent. So its workings can be specified by general, abstract rules

These are programmable on the computer

Page 6: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Logic and the computer (2)

The extensional and intensional views are reconciled in the computer by insisting that:

This is the cornerstone of theLogic Programming paradigm

declarative semantics what is computed

procedural computational

semantics how it is computed

Page 7: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Role of AI in logic

AI aims to mechanize logicAI intends to make explicit, and well-

defined, the unconscious logic we useAI contributes to stating and examining

the problem of identifying limitations of symbolic reasoning methods

AI helps to explore new reasoning issues and methods, and to combine different reasoning abilities

Page 8: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Role of AI in logic (2)

Problem: Classical logic was developed to study well-defined, consistent, and unchanging mathematical objects

It acquired a static character

AI needs to deal with knowledge in flux, and less than perfect conditions, by means of more dynamic forms of logic

Page 9: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Role of AI in logic (3)

Thus AI has developed logic beyond the confines of monotonic cumulativitytypical of mathematical domains

AI has opened up logic to the non-monotonic real world domain of knowledge in flux:

i.e. imprecise, incomplete, contradictoryrevisable, distributed, and evolvingAI has added dynamics to the statics of logic

Page 10: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Logical tools

Much of foregoing has been the focus of research in Logic Programming - LP -the field of AI which uses logic directly as aprogramming language

What issues of the dynamics of logic hasLogic Programming contributed to solve?

Page 11: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

LP - Conclusion support

Conclusions must be supported (caused) by the premises: A close connection exists between LP

implication and physical causality LP implication is unidirectional

C P1, N1C P2, N2

...

Page 12: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

LP - Closed worlds

If our information is complete:

Problem: What if it is not complete ?

C P1, N1C P2, N2

...

C V P , N

i ii

Page 13: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

LP - Open worlds

In the real world, any setting is too complex to be defined exhaustively

Unforeseen exceptions may occur, based on new incoming information

If we cannot prove a condition Ni, we may assume it false, but be prepared for subsequent information to the contrary

Page 14: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Open worlds - example

can be coded as:

faithful(H,K) married(H,K), lover(H,L)

faithful(H,K) married(H,K), not lover(H,L)

where not Pred (default negation) may be read as:

Pred is not provable

The clause

i.e. no proof for: lover(H,L)

Page 15: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

LP - Defeasible Assumptions

Default negation allows us to deal with lack of information

Conclusions are not solid because the rules leading to them may be defeasible

Legal texts, regulations, and courts employ this form of negation abundantly

It introduces non-monotonicity into knowledge representation

Page 16: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

LP- Closed World Assumption

Let information be expressed positively:

If no information is available about lovers then lover(H,L) is true by CWAwhereas lover(H,L) is false

This asymmetry is undesirable, we should be able to write:

faithful(H,K) married(H,K), not

lover(H,L)

By CWA, if there is no derivable information about Pred we assume its negation

Page 17: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

LP - Explicit negation

When neither positive nor negative information is derivable, we would like to say that both are false, epistemically

CWA and the above requisite can be

reconciled by viewing , instead of classical negation, as a new form of negation: explicit negation

The excluded middle postulate is unacceptable

No excluded middle provision

Page 18: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

LP - Explicit negation (2)

CWA can still be stated for exactly those

predicates we wish, say P or Q :

P not P Q not Q

So there is no loss

Page 19: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

LP - Revising Assumptions

We may combine the two viewpoints above:

Problem: If married(H,K) is true, and with no information about lovers, then bothfaithful(H,K) and faithful(H,K) are true!

faithful(H,K) married(H,K), not lover(H,L)

faithful(H,K) married(H,K), not

lover(H,L)

Page 20: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

LP - Revising Assumptions (2)

Our two assumptions:not lover(H,L) and not lover(H,L)

lead to a contradiction

Problem: Which shall we retract ? They are equally preferable!

Page 21: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Undefinedness

Solution: We retract both. We assume neither lover(H,L) nor lover(H,L) false;

instead, both become undefined

For dealing with non-provability, we need a third truth-value to express our epistemic inability to

come up with information

Page 22: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Undefinedness (2)

Undefinedness can be imposed with:

Given no other information, we can now prove lover(H,L) and lover(H,L) neither true nor false; cf. the WFS of logic programs

lover(H,L) not lover(H,L)

lover(H,L) not lover(H,L)

Page 23: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Updating in LP

Another dimension to the dynamics of logic:

Given a LP knowledge base, we must be able to update it with new incoming information, e.g. another LP

Is the resulting updated LP knowledge base ? Can this process be iterated ? YES, we did it

too!

+

Page 24: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Static and dynamic worlds

Much LP work has focussed on reasoning about a single world knowledge state

Reasoning about world change and state transition is still being developed, namely: knowledge updates action modelling

More work on transitions and updates in LP is needed

Page 25: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Logical based agents

As computing systems become more distributed, interconnected, and open, intelligent agents will be a key technology

MENTAL project: We aim to establish, on a sound theoretical basis, the design of an overall LP architecture for mental agents

Page 26: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Logical based agents (2)

A mental agent must be able to:

manage its knowledge, beliefs, intentions plan, as it receives new information and

instructions react to changing conditions in the environment interact with other agents by exchanging

messages react to other agents' requests

Page 27: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Agents evolution

Agents interact in increasinglycomplex worlds

No longer possible to foresee andpre-program all possible situations

Generalise from purely reactive agentsto rational agents

Page 28: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Agents evolution (2)

Agents with complete knowledge and general abilities are not feasible

Specialised agents

Cooperation between agents is in order

Page 29: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Logic programs for Agents

LP has developed KR mechanisms suitable for rational agents, e.g.

More work on combining some or all of these mechanisms is

needed

UpdatesCondition-action rulesPlanningArgumentationLearning

NMR mechanismsTaxonomiesAbductionBelief revisionPreferences

Page 30: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Going beyond agents

Problem: In 10 years the available amount of information will be huge

Humans will not be able to select and retrieveinformation with nowadays technology –World-Wide computing, mobile code, etc.

Towards the notion of Information Ecosystem

Page 31: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Information Ecosystem (IE)

An infohabitant of an IE is an entity – human or otherwise – with some rational abilities

An IE has different kinds of infohabitants, distinguished by their reasoning or rational abilities

Infohabitants can access other computational entities – e.g. search engines, constraint solvers, ...

Page 32: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Information Ecosystem (2)

Infohabitants communicate and cooperate with each other by means of reasoning and other rational means

The IE monitors itself

thus forming an ecosystem

Logic as the language in the IE

Logic for the laws of the IE

Page 33: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Information Ecosystem (3)

Humans have introduced logic for a number of purposes: for reasoning, for learning, …

Humans behave and act in a rational way

The IE has to interact with humans

Infohabitants must act within the IE on a rational logical basis

Page 34: Logic Programming - a living formula Luís Moniz Pereira Centro de Inteligência Artificial, UNL lmp/ Email: lmp@di.fct.unl.pt

Conclusions

AI, especially through LP, will continue to accomplish a good deal in identifying, formalizing, and implementing the laws of thoughtMost notably, AI via LP has taken on the challenge of opening up logic to the dynamics of knowledge in fluxContinuing this work is essential if we are to cope, with the aid of computers, with the challenges of evermore accumulated and distributed knowledge, in a changing but rational information ecology