Table Of ContentSSeSeriereiresi esI sSI SISSSNSNN: :1 :19 19393939-9-4-46460608088
GGG
MMM
EEE
BBB
SSSYYYNNNTTTHHHEEESSSIISISS L LLEEECCCTTTUUURRREEESSS O OONNN A AARRRTTTIIFIFFIICICCIIAIAALLL SERSERSER &&&CCC MMMooorrrgggaaannn & & & CCClllaaayyypppoooooolll PPPuuubbbllliiissshhheeerrrsss
• • •
IIINNNTTTEEELLLLLLIIGIGGEEENNNCCCEEE A AANNNDDD M MMAAACCCHHHIININNEEE L LLEEEAAARRRNNNIININNGGG K K K
AAA
MMM
III
NNN
SSS
KKK
SSSeereririeieses sE E Eddidititotororsrs:s::RRRoononanaladldl dJ J . J.B .B Brraracachchmhmmaanan,n ,Y ,Y aYahahohoooo!o !R !R Reeseseseaeararcrchchh
III
•••
K K K
WWWililliillailaimamm W W W. .C .C Coohohehenen,n ,C ,C Caararnrnenegegigieie eM M Meelellollolnon nU U Unniniviveverersrsisititytyy AAAnnnssswwweeerrr SSSeeettt SSSooolllvvviiinnnggg
AAA
UUU
TTThhohomommaasas sG G G. .D .D Dieieitettttetererircicihch,h ,O ,O Orreregegogonon nS S tStatatatete eU U Unniniviveverersrsisititytyy FFF
MMM
AAA
NNN
AAAnnnssswwweeerrr S SSeeettt S SSooolllvvviininnggg i ininn P PPrrraaaccctttiicicceee NNN iiinnn PPPrrraaaccctttiiiccceee
• • •
S S S
CCC
MMMaarartrtitininn G G Geebebsbseserer,r ,R ,R Roololalananndd dK K Kaamammiininnsskskiki, i,B ,B Beenennjajajmammiininn K K Kaauauuffmfmmaanannnnn, ,a ,a nanndd dT T Toororsrststetenenn S S Scchchhaauauubbb HHH
AAA
UUU
UUUnninvivieverersrsitistiyty yo o fo fP fP oPototstsddsadamamm, ,G ,G Geerermrmmaananynyy BBB
AAAnnsnswswweerer rS S eSetet Pt P rProrogogrgraramammmmmininigng g( ( A(AASSPSP)P) )i si si sa a ad d edececlcalalrararatativtivieve ep p rproroboblbelelmemm s s osolovlvlivninigng ga a papppprproroaoacachch,h ,i ,ni niintitiiatiailallyllyl yt ta taialioliolrorereded dt to too
mmmoododedeleilnilnigng gp p rproroboblbelelmemmss is ni ni nt ht htehe ea a rarereaea ao o fo fK fK Knnonowowwleleldedgdgege eR R Reepeprpreresesesenentnatattaitoitoinon na a nandnd dR R Reeaeasasosononinninigng g( (K (KKRRRRRR)). ).M .M Moororere er re recececenentnltylty,ly,,
AAA
ititsits sa a tattttrtraracactctivtivieve ec c ocomommbbibninianatatiotioinon no o fo fa fa ar ri cricihch hy y eyetet st s imsimimpplpelel em m moododedeleilnilnigng gl al alnangnguguauagagege ew w witithith hh h ihgigihgh-h-p-pepererfrofofrormrmmaanancncece es s osolovlvlivninigngg NNN
SSS
ccacapapapacacictiitieiteises hs h ahasas ss sp spapararkrkekeded di ni nitnetetrereresests ti tni ni nm m maananyny yo o tohthteherer ar a rarereaeasas es e vevevenen nb b ebeyeyoyonondnd dK K KRRRRRR... WWW
EEE
TTThhihsis ibs b obooookok kp p rpreresesesenentntsst as a ap p rpraracactcticitciacala li lni nitntrrtorododuducuctctioitoinon nt to ot oA A ASSPSP,Pa,a,iamimimininigng ga a tat u tu susinsinigng gA A ASSPSP Pl al alnangnguguauagagegeses as a nandnd ds sy sysyststeetmemmsss RRR
S S S
fofofror sr so solovlvlivninigng ga a papppplpilcilciacataitoitoinon np p rproroboblbelelmemmss. s.S .S tSatatrartritnitnigng gf fr froromomm t ht htehe ee e sessssesenentnitaitaila lf lof ofrormrmmaala lf lof ofuounundndadataitoitoinonsns, s,i ,ti tii tni nitnrtrotrododuducuceceses As A ASSPSP’Ps’s’s ETETET MMMaaarrrtttiininn G GGeeebbbssseeerrr
S S S
ssosolovlvlivninigng gt et etcechchnhnonoloololgogygy, y,m ,m moododedeleilnilnigng gl al alnangnguguauagagege ea a nandnd dm m meetehthtohodododoloololgogygy, y,w ,w whhihlieliel ei li lliullulsustsrtratrataitnitnigng gt ht htehe eo o vovevereraralall lls lso solovlvlivninigng gp p rproorcocecesesssss OOO
LLL
bbyby yp p rpraracactcitcitciacala le le xexaxamammpplpelelses. s. . VVV RRRooollalaannnddd K KKaaammmiininnssskkkiii
III
NNN
GGG
I I I BBBeeennnjjajaammmiininn K KKaaauuufffmmmaaannnnnn
NNN
P P P
RRR
TTTooorrrsssttteeennn S SSccchhhaaauuubbb
AAA
CCC
TTT
III
CCC
EEE
AAAbbbooouuuttt S S YSYYNNNTTTHHHEESESISIsIss
TTThhihsis ivs v ovoloululmummee ei si s ias a ap p rprinrinitnetetded dv v everesrsriosioinon no o fo fa fa aw w oworokrkr kt ht htahata ta ta pappppepeaearasrsr is ni ni nt ht htehe eS S ySynyntnhthteheseississis MMM
DDDigigiigtiatiatla lL lL iLbibirbrarararyry oy of o fE fE nEngngigninieneeeererinrinigng ag an andnd dC C oComommppuputueterter Sr S cSiceiceniencnecec. e.S .S ySynyntnhthtehesesissis iLs L eLecectcututruerersess OOO
RRR
pprpororvovidvidiede ce co cononcncisciesies, e,o ,or oirgirgiigninianal alp lp rpererseesesnentnatattaitoitoinonsn so sof o fi fmi mimppoporotratratnantn tr ter erseesesaearacrchrch ha an andnd dd d edeveveveloelolpopmpmmeenentntt GGG
AAA
tototpopipcicsic,s ,sp ,p upubublbilsilhsihseheded dq q uquiucickicklkyl,yl ,yi n,i ni nd d idgigiigtiatiatl ala lan andnd dp p rpirnirnitn tf tof ofromrmrmaatast.st .sF .F oForo rm rm mooroerer ie ni nifnofofromrmrmaataitoitoinonn
NNN
vvisvisiitis tiw tw wwwwww.wm.m.moororgrgaganancnclcalalyaypypopoooolo.lc.lc.ocomomm &&&
CCC SSSYYYNNNTTTHHHEEESSSIISISS L LLEEECCCTTTUUURRREEESSS O OONNN A AARRRTTTIIFIFFIICICCIIAIAALLL
IISISBSBNBN:N: : 9 9797878-8-1-1-1-6-6060808484545-5-9-9797171-1-1-11 LLL
MMMooorrrgggaaannn & & & C CClllaaayyypppoooooolll P PPuuubbbllliisisshhheeerrrsss 990900000000000 AAA
YYY IIINNNTTTEEELLLLLLIIGIGGEEENNNCCCEEE A AANNNDDD M MMAAACCCHHHIININNEEE L LLEEEAAARRRNNNIININNGGG
PPP
OOO
wwwwwwwww..m.mmooorrgrggaananncclclalayaypyppooooooll.l.c.cocoommm
999778781816160608088445459597971711111 OOO
LLL RRRoononanaladldl dJ J . J.B .B Brraracachchmhmmaanan,n ,W ,W Wililliillailaimamm W W W. .C .C Coohohehenen,n ,a ,a nandnd dT T Thhohomommaasas sG G G. .D .D Dieieitettttetererircicihch,h ,S ,S eSereririeieses Es E Eddidititotororsrss
Answer Set Solving in Practice
Synthesis Lectures on Artificial
Intelligence and Machine
Learning
Editors
RonaldJ.Brachman,Yahoo!Labs
WilliamW.Cohen,CarnegieMellonUniversity
PeterStone,UniversityofTexasatAustin
AnswerSetSolvinginPractice
MartinGebser,RolandKaminski,BenjaminKaufmann,andTorstenSchaub
2012
PlanningwithMarkovDecisionProcesses:AnAIPerspective
MausamandAndreyKolobov
2012
ActiveLearning
BurrSettles
2012
ComputationalAspectsofCooperativeGameTheory
GeorgiosChalkiadakis,EdithElkind,andMichaelWooldridge
2011
RepresentationsandTechniquesfor3DObjectRecognitionandSceneInterpretation
DerekHoiemandSilvioSavarese
2011
AShortIntroductiontoPreferences:BetweenArtificialIntelligenceandSocialChoice
FrancescaRossi,KristenBrentVenable,andTobyWalsh
2011
HumanComputation
EdithLawandLuisvonAhn
2011
iii
TradingAgents
MichaelP.Wellman
2011
VisualObjectRecognition
KristenGraumanandBastianLeibe
2011
LearningwithSupportVectorMachines
ColinCampbellandYimingYing
2011
AlgorithmsforReinforcementLearning
CsabaSzepesvári
2010
DataIntegration:TheRelationalLogicApproach
MichaelGenesereth
2010
MarkovLogic:AnInterfaceLayerforArtificialIntelligence
PedroDomingosandDanielLowd
2009
IntroductiontoSemi-SupervisedLearning
XiaojinZhuandAndrewB.Goldberg
2009
ActionProgrammingLanguages
MichaelThielscher
2008
RepresentationDiscoveryusingHarmonicAnalysis
SridharMahadevan
2008
EssentialsofGameTheory:AConciseMultidisciplinaryIntroduction
KevinLeyton-BrownandYoavShoham
2008
AConciseIntroductiontoMultiagentSystemsandDistributedArtificialIntelligence
NikosVlassis
2007
IntelligentAutonomousRobotics:ARobotSoccerCaseStudy
PeterStone
2007
Copyright©2013byMorgan&Claypool
Allrightsreserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmittedin
anyformorbyanymeans—electronic,mechanical,photocopy,recording,oranyotherexceptforbriefquotationsin
printedreviews,withoutthepriorpermissionofthepublisher.
AnswerSetSolvinginPractice
MartinGebser,RolandKaminski,BenjaminKaufmann,andTorstenSchaub
www.morganclaypool.com
ISBN:9781608459711 paperback
ISBN:9781608459728 ebook
DOI10.2200/S00457ED1V01Y201211AIM019
APublicationintheMorgan&ClaypoolPublishersseries
SYNTHESISLECTURESONARTIFICIALINTELLIGENCEANDMACHINELEARNING
Lecture#19
SeriesEditors:RonaldJ.Brachman,Yahoo!Labs
WilliamW.Cohen,CarnegieMellonUniversity
PeterStone,UniversityofTexasatAustin
SeriesISSN
SynthesisLecturesonArtificialIntelligenceandMachineLearning
Print1939-4608 Electronic1939-4616
Answer Set Solving in Practice
Martin Gebser,Roland Kaminski,Benjamin Kaufmann,andTorsten Schaub
UniversityofPotsdam
SYNTHESISLECTURESONARTIFICIALINTELLIGENCEANDMACHINE
LEARNING#19
M
&C Morgan &cLaypool publishers
ABSTRACT
Answer set programming (ASP) is a declarative problem solving approach, initially tailored to
modeling problems in the area of knowledge representation and reasoning (KRR).More recently,
its attractive combination of a rich yet simple modeling language with high-performance solving
capacitieshassparkedinterestinmanyotherareasevenbeyondKRR.
ThisbookpresentsapracticalintroductiontoASP,aimingatusingASPlanguagesandsystems
forsolvingapplicationproblems.Startingfromtheessentialformalfoundations,itintroducesASP’s
solvingtechnology,modelinglanguageandmethodology,whileillustratingtheoverallsolvingprocess
bypracticalexamples.
KEYWORDS
answersetprogramming,declarativeproblemsolving,logicprogramming
vii
To Pascal, and all the Ones who enriched our lives in a lasting way.
Description:The goal of this book is to enable people to use answer set programming (ASP) for problem solving . A solution is usually extracted from the instantiation of the variables in a successful query. As mentioned A cardinality rule with an upper bound can be expressed by the following three rules (intr