1 / 37

CompAPO : A complete version of the APO Algorithm

CompAPO : A complete version of the APO Algorithm. Tal Grinshpoun and Amnon Meisels Department of Computer Science Ben-Gurion University of the Negev. Talk outline. Distributed Constraint Satisfaction Problems The APO algorithm A flaw in APO’s correctness proof Running APO on our example

tessa
Download Presentation

CompAPO : A complete version of the APO Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CompAPO: A complete version of the APO Algorithm Tal Grinshpoun and Amnon Meisels Department of Computer Science Ben-Gurion University of the Negev

  2. Talk outline • Distributed Constraint Satisfaction Problems • The APO algorithm • A flaw in APO’s correctness proof • Running APO on our example • Identifying the problems • Solving the problems • Preliminary experimental evaluation

  3. The Nurses example Three Shifts: S1 8:00 – 16:00, S2 16:00 – 24:00, S3 24:00 – 8:00 Three Nurses: Nurses: Anna, Bella, Clarissa Constraints: Personal: Anna can’t work between 8:00 – 9:00 Bella Can’t work between 17:00 – 20:00 Clarissa Can’t work nights System: One nurse for every shift

  4. Constraint Satisfaction Problem • NP-complete problem, relevant for real-world problems such as timetabling, scheduling verification... • Structure: [V,D,R] (Variablesshifts , Domains of Valuesnurses, Constraints) V1, V2, … Vn [val1,val2,val3] [val1,val2] [val1,val2,val3]

  5. A Distributed CSP example • Two wards in a Hospital • Nurses – ward 1: Diana, Emilia, Flora ward 2: Anna, Bella, Clarissa • Anna, Bella, Diana are ‘Senior’ nurses • In every shift there should be at least one senior nurse Local Constraint Inter Constraint One senior nurse S1 S1 S2 S2 S3 S3 First ward Second ward

  6. APO algorithm – overview • The problem is partitioned into groups • In each group a mediator is selected • Each mediator solves its local problem trying to minimize external constraints • Violated external constraints lead to growth of the group • If consistent – stop • Else, update the partitioning and goto 2

  7. Some building blocks… • pi – agent’s priority Highest priority among conflicted agents mediator • mi – agents’ desire to mediate Switched on by conflicts • mediate – participating in mediation session If invited, generates a wait! message • good_list, agent_view – dynamic lists of relevant agents Attempts to include all externally conflicting agents!!! A very complicated algorithm…

  8. An example A1 A2 A5 A3 A4 A6 A7 A9 A8

  9. ok? ok? Initialization Violated constraint A1 A2 A5 A3 A4 Violated constraint A6 A7 A9 A2, A5, A7 and A8 Send ok? too A8

  10. evaluate? evaluate? evaluate? evaluate? evaluate? Attempt to mediate A1 A2 A5 A3 A4 Can NOT change itself – has to mediate A6 A7 A9 A8

  11. evaluate! evaluate! evaluate! evaluate! evaluate! Mediation by A4 Mediator A1 A2 A5 A3 A4 A6 A7 A9 Mediation group A8

  12. APO correctness proof * Key point - growth of initially partitioned groups Group size (good_list) is increased Algorithm is complete Group size (good_list) is not increased Infinite looping throughvalues may occur *As presented in: Roger Mailler and Victor Lesser, “Asynchronous partial overlay: A new algorithm for solving distributed constraint satisfaction problems”, JAIR, 2006.

  13. Our example • A DisCSP with 8 agents, to allow at least 2 concurrent mediations • We assume finite message delays • The problem to be solved – variation of a coloring problem

  14. The example Solid lines – regular coloring constraints Dashed lines – allow all except (G,G) and (B,B) A1 A2 A8 A3 A7 A4 A6 A5

  15. ok? ok? ok? ok? Initialization – configuration 1 A1 A2 Violated constraint A8 A3 A7 A4 Violated constraint A4, A8 and A7 Send ok? too A6 A5

  16. evaluate? evaluate? evaluate? evaluate? Attempt to mediate Can NOT change itself – has to mediate A1 A2 A8 A3 A7 A4 Can NOT change itself – has to mediate A6 A5

  17. evaluate! evaluate! evaluate! evaluate! Mediation by A1 Mediator A1 A2 A8 A3 A7 A4 Mediation group A6 A5

  18. Meanwhile…

  19. evaluate? evaluate? evaluate? evaluate? Concurrent mediation A1 A2 A8 A3 A7 A4 A6 A5

  20. evaluate? evaluate! wait! evaluate! Concurrent mediation A1 A2 A8 A3 A7 A4 A6 A5

  21. Mediation result A1 A2 Sub-problem is consistent, no external constraints violated, so good_list of A1 is NOT expanded A8 A3 A7 A4 Special coloring constraint A6 A5

  22. accept! accept! accept! accept! Announce mediation result A1 A2 A8 A3 A7 A4 A6 A5

  23. ok? ok? ok? ok? ok? ok? ok? ok? ok? ok? ok? ok? ok? message delay A1 A2 A8 A3 A8 A3 A7 A4 A6 A5 A3

  24. evaluate? evaluate! Concurrent mediation A1 A2 A8 A3 A8 A3 A7 A4 Remember ME? A6 A5 A3

  25. Concurrent mediation A1 A2 No external Constraints violations Problem consistent! A8 A3 A8 A3 A7 A4 A6 A5 A3

  26. accept! accept! accept! Assignment notification A1 A2 A8 A3 A8 A3 A7 A4 A6 A5 A3

  27. All ok? messages arrive(configuration 3) Can NOT change itself – has to mediate A1 A2 A8 A3 A7 A4 Can NOT change itself – has to mediate A6 A5

  28. …back at configuration 1 A1 A2 A8 A3 A7 A4 A6 A5

  29. wait! evaluate! evaluate! A1 A2 A8 A3 A3 A7 A4 A6 A5 A3 Identifying the problems • Partial mediation sessions • good_list does not grow • Failing to get a lock when the good_list is full • Neighboring mediation sessions • Concurrent • Sequential A1 A2 A8 A3 A7 A4 A8 A6 A5

  30. Preventing partial mediation sessions • An aggressive approach • Bumping into ongoing mediation sessions • A well-coordinated approach • Cancel the mediation session upon receiving a wait! message • Agents are still aware of the mediator’s willingness to mediate • Highest priority agent will eventually obtain a lock on all the agents in its good_list

  31. Handling neighboringmediation sessions • Sequential mediation sessions • Add to accept! messages the complete mediated solution • Concurrent mediation sessions • Maintain concList – list of agents that are potentially involved in a concurrent mediation session • Inform the mediator post factum of conflicts created due to concurrent sessions • Mediator adds the conflicting agent to its good_list • good_list must grow (no partial mediation sessions)

  32. Experimental evaluation • Two versions of APO • APO-BB. The mediator performs a Branch and Bound search to minimize the number of violated external constraints [Mailler & Lesser 2005] • APO-BT. The mediator finds the first satisfying solution [Benisch & Sadeh 2006] • Setup: • 15 agents, 1 variable each, 10 values. • Random DisCSPs: • P1 (Density)= 0.4, P2 (Tightness)= 0.3 – 0.9

  33. Handling neighboringmediation sessions – messages sent

  34. Non-Concurrent Constraint Checks

  35. Maximal mediation size

  36. Maximal mediation size

  37. Thank you!

More Related