Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Logic programming
(section)
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>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)