Class Note for CMPSCI 683 at UMass(3)
Class Note for CMPSCI 683 at UMass(3)
Popular in Course
Popular in Department
This 13 page Class Notes was uploaded by an elite notetaker on Friday February 6, 2015. The Class Notes belongs to a course at University of Massachusetts taught by a professor in Fall. Since its upload, it has received 11 views.
Reviews for Class Note for CMPSCI 683 at UMass(3)
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 02/06/15
Victor Lesser CMPSCI 683 Fall 2004 Local Search Heuristic Repair CSP and 3SAi Solving CSPs using Systematic Search The relationship between problem structure and complexity meua im Z Aset of variablesX1X and a set of constraints C1Cm Each variable has a domain D of possible values A solution to a CSP a complete assignment to all variables that satisfies all the constraints Representation of constraints as predicates Visualizing a CSP as a constraint graph Vimw mlm Constraint graph nodes are variable arcs show constraints iiiMiiNii Variables WA NT 0 NEW V SA T v Domains D redpreeniiue Constraints adjacent regions must have diiierent colors cg WA NT ii the language aiiwrs this or Wm iii39AnVTi E rerlprrenireniiueimammoth preonbioei TWO FOUR oo n1ox1 x1ww ii1ox2 X139l3939l39 o1ox3 x3 r 39 alldif i i39l39iiViWiRiD Snimnievaiiables Solutionsaiezssigninenissatislyingallmnsziainvs cg 39 aweeno39m T u w R o 6mm ll AredNTgreen0edNSl l ywenl red4blilerTg7een Wgg 3een 1 xuxzixsl a Finite domains squeens matching Representing preferences versus cryptarithmeticjnb assignment absomte constraints 39 mama C Ema C 38 Np39wmp ete Weighted by constraints violatedsatis ed In nite domains scheduling Constraint optimization is generally Cannot enumerate all possibilities more compllcated39 39Overtneranuenlinteuers Can be solved using local search Need a constraint language techniq ues39 39Slarlanr 5 sternum BDWW Hard to find optimal solutions women 7 minimum 3 Start state is some assignment of values to variables that may violate some constraints Create a complete but inconsistent assignment Successor state change value of one variable Use heuristic repair methods to reduce the number of conflicts iterative improvement The minconflicts heuristic choose a value for a variable that minimizes the number of remaining con icts Hill climbing on the number of violated constraints Repair constraint violations until a consistent assignment is achieved Can solve the millionqueens problem in an average of 50 steps function M N 39ONFLICTSUw Inmate15 returns a solution 0139 failure inpuls up a cunsll39llirlt satisfaction problem maxsteps the number of steps allowed before giving up local variables curl39enr a complete assignment var a Variable Value a value for a Variable tumm lt an inilial complete assignment for my for l39 i l to maltitelli do lm39 a randomly chosen con icted Vnrinlile om VAtlAhlJ Slt sm value 4 Lllc Value for var that minimizes CUNliilL l stitlzr v L lll39l t llf mp scti mvnllle in current it39cllwnr is a solution for csp then return current and returnallure v mesa ml in Preprocessing phase to generate initial assignment 7 Greedy algorithm that iterates through roWs placing each queen on the column Where it conrlicts With the reWest previously placed queens Repair phase select randomly a queen in a speeiri reW thatis in sunnietand moves itte the column Within the same reW Where it eenrliets With the reWest ether queens Atworstep solution or an 8equeen5 problem The numberorremaining conriicts roreach neW position orthe selected queen is shoWn Algorithm moves the queen to the minecon ict square breaking ties randomly v mesa nmt i2 Nonsysteniaticsearch hypothesis 7 Depthhia seaiLh mu organized W R9 alphas 7 PonieiLhoiLesaie mpinieunisiai EathianLh point A rum whim jfn 53212 7 More minionswunnisi queen piaLe in LEMEY ninia row n1 5 1M 57 J rakesaveiuinngiimeiniacweitmmoauueusnnmaueeanuinseam n 1n Am mini in new 56 no mu m mm mm mm H m 7 Batmaan pingiamthaiian nmv mumsiuusmu Loiurmswiihin n 1 i t 5 m mWS Sliii perioins pooiiu W 5 7 Distribution oisolutions n 1n 3 ZSJ 7 Depth his nes not perioimweii Where sniutinris Liusteie iritiee 7 Random miniatan LasVegas aigoinhm does better but siiii piobiem t mended connotation mines vumcsiwnm i3 mummy u Informedness hypothesis Heuristic repair is better because it has more information that is not auaiiabie to a constructive backtracking more encompassing View of search Prnpnsmnns have to be true to make the Space sentence true SSAT is the problem of nding a satisfying truth assignment for a sentence in a special format Given a propositional sentence determine if it is satis able and if it is show which Minicon ict heuristic seiect a uariabie that is in con ict and assign it a uaiue that minimizes the number of con icts number or otheruariabies that Wiii need to be repaired vumcsiwnm is mummy in 455251 x m 2 H L E V GL3 m oi 6 L H 4 V Sr lt Gr ioirio 3 EE g 2 so gt no gt 3 lt do gt a gt a lt L 920149 lt 2302 lt 29 gt or gt 3 lt 20 gt no gt 3 lt 29 gt Nd gt 3 lt Go gt no gt 9 lt Ao gt 20gt 9 lt mamws imawaag 4535 35 Em 3 E53953 Em a gags Em 3 5 20 gt r gt 10 lt em 9 gt aorv lt Azor gt 0 gt 20 lt 3 1dr 20 lt A20 19 0 85323 6233 3353 a 455251 2 2a Egan 5 Es eie i 2 H m u m u m 3 mo Ho mum m4 Egy 223 Egg E E 2M as 55552 Azokm m m P lgimr rig irtmloiv sea 5 2592 s 3 n a 35 85 25 2 s 3 a 3 SEE 2225 n5 5 3552 2 3 mg 32 22 3 5253 a 3 359 325 3 22 a a 3 4 t r 2 5 g z 22 523 a 3 E 4 Pmblem aruenamrmulamlle rmrusnrorel calculusrllm anrrrlerrrelalrm mire uarrauesunuerwmn lremrmula curries mllme orreponlmlnme exlsls nmeeoure GSAT nnul aselolelausesu rllx FUPS andMXTRlES MUM a salrsvwrglrun assigrmerls or immune neurn orlr lnMMTRlES r rammly oereraleulrun asslgnmen ior lnMAXFUPS rrrsnrsrres unen rerun r l2 a mammal uarraue SLEth a emrrgerrrrlslrmnassrmmemerueslne largesl rrrereaserrrlmal nunuermelauses a llhalare sallslledby r T rmlnmeuun assignmen mp reversed enu lur enuiur Mum m salrslwrgassrmrnemmml enu oumsumr 1i GSAT versls DavlsPulmlll a hadwadwg ayle alganmll Dnlllain pm mmnm 1cm thrllllllas all mlmaole mam mull dlmell irnm a rqlnll in mien mm 5 9o ufpmbbllly are llllmlvable Domain mane rumor er er w l r l nu n u or Drlvl er mnmsixmlm 12 Bl39asedRaldum Walk wnli pmhahil y plollowllie slamlanl GSAT scheme 7 le makelhebeslpmlble lp wnli pmhahil y 1 p pink avaiahle oeouninp in some unsaisfleli clause amlllip ilsmnli assignment lllole a possible upliill movel am we nolexv pglu in mm mum scur earn on nine in we on n sci Ctheneel oumsumr 2e Easy Sast 39lahla problems where many solutions llanl Saslmalilepiolilens uneielewsolmions EasyFawSa d39ld1lapmhlaus I gunned rm mop meme Assumes oolmlnmt search in he satis dila spaoe aml the non satisflahla space i nepaion o1 proposnionl mnmsixmlm a Na39I39ve application of search to CSPs Branching factor is n d at the top level then n1d and so on for 11 levels The tree has n dn leaves even though there are only dn possible complete assignments Na39I39ve formulation ignores commutativity of all CSPs Solution consider a single variable at each depth of the tree v mm m 25 function lint imw K1iSMRHrer returns a snlution or failure relurn RECCRSIVEBACKTRACKINGlLeap function RECURSIVEVBACKTRACKINGlausignmeni cspl returns n solulion or failure if mignnmnl is cumplele Ihen return mfgnmrm vnr SHIFTliNWSlGNEDV ARHWFlV laniEslm11jausignnmnimp for each mine in ORDERVDOVIAIVVALUEMill l55ig lll lif cup do ifvrilu is consistent with assignment according to C OKSTRAIMSksp then mull i RhuuusMBACK lR mum him vulizeimsignmentj up if rerun zinre then return muff end relurnfIllnm v mm m 27 Initial state the empty assignment Successor function a value can be assigned to any variable as long as no constraint is violated Goal test the current assignment is complete Path cost a constant cost for every step v mm m 25 Wlred WAied NTgieeri NThlue F WArELl WAred NTgreun NTgreen Dred Qhlue T T v m mm m 22 CSP search complexity may be affected by Th d h h b d Key questions 90F eFlHW lC Villa 65 are ESSl lie VEUES g 1 Which variable should be aSSIgned next and 39 The mmquot mm mm W ass gme in what order should the values be tried Variableordering heuristics reduce the bushiness of th ht b 39 f 39l t l l we we ymovmg a39 res ouPper ms 2 Whatare the Implications ofthe current Yalueordering heuristics move solutions to the variable assignments for the other left ofthe search tree so they are found more unassigned variables quickly by backtracking search Good heuristics can reduce search complexity by 3 When a path fails can the search avoid nearly an order of magnitude repeating this failure in subsequent paths vumcsiwam 22 women do Variable ordering Relate decisions about search The mostconstrainedvariable heuri control to characteristics of the h i i 7 as thelewesl legal values Pmblem Space 7 reduce branching lamoi 39 39 The mostconstrainingvariable heuristic characterize the problem topology 7 involved in largest numbeiolconsliainls 7 likely reduce More branching lamois by a set of texture measures Information 7 rulesoulthelewestclioiceslorneighborinovars 7 reduce likelihood ol backtracking Value ordering Stat and Dynamlc MetaLevel The leastconstrainingvalue heuristic vumcsiwam 3i town De ne The probabilitythat the assignment of a particular value to a particular variable leads to an overall solution to the problem Compute The ratio of complete assignments that are solutions to the problem and have that value for the variable over the total number of possible assignments Heuristic The number of constraints on the variable involving that value m 5 39 Cr y D mums w a W 3 mm may mm WW to M m a was Lanny Equot sinkn gt75 mm M hvn mm H mm M M W J Mama M w z a gum aw REAr4 NAM new a O u r a 1 gt own a o n 39 De ne The probabil y that an assignment consistent with allthe problem constraints that do not involve a given variable do not result in asolution Variabletightn s is the backtracking probabil y when the variable in qu tion is the last one instantiated 39 Compute The ratio oithe number oisolutions to the problem with constraints on the variable in qu tion removedthat could not be solutions to the iulIyconstrained problemto thetotal numberoi solutions to the problem with constraints on the variable removed e Let u lhe sel ol Constraints involving v e Lei Blhe problemwnhoul u in A solutionle a not solutionle A solulmns m on meansvariable should be bound early 39 Heuristic The number oi constraints on the variable 5i CT MA ME NH RI VT ExactVanable Tighmess Texmres Measures Denmsmrmd Saluqu NunSuluuuns Variable Tightress 2A B um 72 48 mm H D um 35 12 D33 12 D um 12 n um m 1 mm Hermst Variable Ti rams Texture Mmmes 39 quot quot quot SH M cr 5 w quot MA 12 ME 3 M NH 9 n 11 11 2 ltiimnim w rt an Mostconstraining variable Select for assignment the variable that is involved in the largest number of constraints on unassigned variables Also called the searchrearrangement method Leastconstraining value Select a value for the variable that eliminates the smallest number of values for variables connected With the variable by constraints l e maximize the number of assignment options still open An arc from Xto Yin the constraint graph is consistent if for every value ofgt there is some value of Ythat is consistent with X Can detect more inconsistencies than fonivard checking Can be applied as a preprocessing step before search or as a propagation step after each assignment during search Process must be applied repeatedly until no more inconsistencies remain th Reduce the branching factor by deleting values that are not consistent with the values ofthe assigned variables Fonrvard checking a simple kind of propagation WA VT 0 nsw v SA lrihaldomains GERGB nos ace RGERGE Al lerV lArej co RGE see no GE c a m m 41 R AAEiOgieen i e c a E has E Merlhlue a G i 13939553 G o IIIE39IEEEIIEEEI 9 IIIEEIECEIIIEI W ax o Wan Fmamg Ewiomng rer wise mean Misgumhegdunriumenn my mm min Firm is M dxmh APquot my m Kiinclqu hamplinm ermderrrnm mm W mmLsrwunsnum A x ran Winn N r Minn Win in H in M hmlimm a W and do wrilim We mum r YMnMwiiNH r 2 Xli mi e mi m n Vuduw a mum unrunrr hinrl r v are hum urtiva Wm r mgr Vimmv ictmmmi 7mm llm Mi nwiv m iir JieluiinLi Minnamire wrynnnm mg Wang H M Uum m demurrern my Mm ml le l e um he mm m seine Illlle y immune arrn ddeie xnnm nomumi mamare A irinary CSP has ai mnsl oinzi arts Eaen are ix n ean nnly ire insened nn iire agenda d urnes heeause ai mnsl dvaiues niyean ire deieied Checking cansislency nian are can he dnne in em Wnrsl easeiirne enrnniexiiy is oinZdzi Dues nnl reveal every nnssririe inenns39sieney A graph Is krcnnsislen ii inr any set nikvariairies iirere is arways a enns39sienivaiueinrine klhv 39 irie given any ennsisieni naniai assignrnenunriire diner M v ides Agvaph is smneiy Krmnssem mi is mansistem in e ir Knumhev m nadesinan nd backtmckmg H irerinrrns nienn sieney niiersirnngerinrrns nl cnnslrzinl nrnnaga nn 7 Reduce amaum m haddvawng Reddeeeneeiwennndnnendm e Detectirig incansistem panrai assignments aaianee ninnw rnueir nrenrneessing In gen grann In ire k enns39sieniyersus rnnre seareir Chronological backtracking always backtrack to most recent assignment Not ef cient Con ict set A set of variables that caused the failure Backjumping backtrack to the most recent variable assignment in the con ict set Simple modi cation of BACKTRACKINGSEARCH Every branch pruned by backjumping is also pruned by forward checking Cm lddireded backjumping better de n on of con ict sets leads to better performance V game m 45 The complexity of solving a CSP is strongly related to the structure of its constraint graph Decomposition into independent subproblems yields substantial savings 0dquot 0dCnc Tree structured problems can be solved in linear time 0nd1 Cutset conditioning can reduce a general CSP to a treestructured one and is very efficient if a small cutset can be found V game m 47 Rreeegure lNFORMEDrEACKTRACK VARSVLEFT VARSVDONE it an Vanabies are eensistenmnen solution found STOP LEI VAR a Vanabie in VARSVLEFTthat is in con ict RerneVe VAR nern VARSVLEFT Push VAR orito VARSVDONE La VALUES llstuf bessibie VaiUesrerVAR ergereg in ascending eiger aeeerging to number at conflicts Witn Vanabies in VARSVLEFT For eaen VALUE in VALUES until sulutlurifuurid irVALUE gees nm oriflictwith anVVanabie that is lriVARSrDONE then Assign VALUE lb VAR caii lNFORMEDrEACKTRACKOARSVLEFfVARSVDONE engir engrer eng brbeegure Begin bregrarn LELVARSVLEFT listofall Variables eaen assigned an initial state LEI VARSVDONE nii caii lNFORMEDVEACKTRACKWARSVLEFT VARSVDONE Erid bregrarn V ewe m a 1 Choose a variable as root order variables from root to leaves such that every norle s parenr precedes it in the ordering A3 A 3 E f g 2 For from n down to 2 apply REMovEINcoNslsTENTl Puieuthfl X 3 Forj from 1 to n assign X consistently with Pm en X V mesa nml as Conditioning instantiate a variable prune its neighbors39 domains 6 mm a A i w quot 0 Cutset conditioning instantiate in all ways a set of variabim such that the remaining canstraint graph is 3 Use 6A a 1 Cutset size 5 a wniime OWEvii GMT very at for smaii c Interacting Subprnblems Multilevel Search biackboard vqmcsiw39mt csps an a spetiai kind of plebiem smss de ned n wines of iier sat of minds goal es defined by mnsrlainrs on variable vaiues Backtracking depli irst saith with one variabie assigned w nod Variabie oideving and vziue seiection nemistics help signifimntiy Fovward cmking prevents assignments that guarantee iatev faiiuve Consuaint pronagatinn 5 are cansistency does addiiivnai wink to constrain wines and detcct inconsistencies The CSP vepvesentztmn ziinws anaiysis cf pmblem stmctun Tveersuuclwd CSP can be soived in lineal tim Imative mincon icss is usuaiiy means in plactim W
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'