Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Logic programming
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Abductive logic programming=== {{Main|Abductive logic programming}} [[Abductive logic programming]]<ref>{{cite journal |first1=M. |last1=Denecker |first2=A.C. |last2=Kakas |title=Special issue: abductive logic programming |journal=Journal of Logic Programming |volume=44 |issue=1β3 |pages=1β4 |date=July 2000 |doi=10.1016/S0743-1066(99)00078-3 |doi-access=free }}</ref> (ALP), like CLP, extends normal logic programming by allowing the bodies of clauses to contain literals whose predicates are not defined by clauses. In ALP, these predicates are declared as ''abducible'' (or ''assumable''), and are used as in [[Abductive reasoning#Formalizations of abduction#Logic-based abduction|abductive reasoning]] to explain observations, or more generally to add new facts to the program (as assumptions) to solve goals. For example, suppose we are given an initial state in which a red block is on a green block on a table at time 0: <syntaxhighlight lang="prolog"> holds(on(green_block, table), 0). holds(on(red_block, green_block), 0). </syntaxhighlight> Suppose we are also given the goal: <syntaxhighlight lang="prolog"> ?- holds(on(green_block,red_block), 3), holds(on(red_block,table), 3). </syntaxhighlight> The goal can represent an observation, in which case a solution is an explanation of the observation. Or the goal can represent a desired future state of affairs, in which case a solution is a plan for achieving the goal.<ref>Eshghi, K., 1988, August. Abductive Planning with Event Calculus. In ICLP/SLP (pp. 562-579).</ref> We can use the rules for cause and effect presented earlier to solve the goal, by treating the <code>happens</code> predicate as abducible: <syntaxhighlight lang="prolog"> holds(Fact, Time2) :- happens(Event, Time1), Time2 is Time1 + 1, initiates(Event, Fact). holds(Fact, Time2) :- happens(Event, Time1), Time2 is Time1 + 1, holds(Fact, Time1), not(terminated(Fact, Time1)). terminated(Fact, Time) :- happens(Event, Time), terminates(Event, Fact). initiates(move(Object, Place), on(Object, Place)). terminates(move(Object, Place2), on(Object, Place1)). </syntaxhighlight> ALP solves the goal by reasoning backwards and adding assumptions to the program, to solve abducible subgoals. In this case there are many alternative solutions, including: <syntaxhighlight lang="prolog"> happens(move(red_block, table), 0). happens(tick, 1). happens(move(green_block, red_block), 2). </syntaxhighlight> <syntaxhighlight lang="prolog"> happens(tick,0). happens(move(red_block, table), 1). happens(move(green_block, red_block), 2). </syntaxhighlight> <syntaxhighlight lang="prolog"> happens(move(red_block, table), 0). happens(move(green_block, red_block), 1). happens(tick, 2). </syntaxhighlight> Here <syntaxhighlight inline lang="prolog">tick</syntaxhighlight> is an event that marks the passage of time without initiating or terminating any fluents. There are also solutions in which the two <code>move</code> events happen at the same time. For example: <syntaxhighlight lang="prolog"> happens(move(red_block, table), 0). happens(move(green_block, red_block), 0). happens(tick, 1). happens(tick, 2). </syntaxhighlight> Such solutions, if not desired, can be removed by adding an integrity constraint, which is like a constraint clause in ASP: <syntaxhighlight lang="prolog"> :- happens(move(Block1, Place), Time), happens(move(Block2, Block1), Time). </syntaxhighlight> Abductive logic programming has been used for fault diagnosis, planning, natural language processing and machine learning. It has also been used to interpret negation as failure as a form of abductive reasoning.<ref>Eshghi, K. and Kowalski, R.A., 1989, June. Abduction Compared with Negation by Failure. In ICLP (Vol. 89, pp. 234-255).</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Logic programming
(section)
Add topic