מערכת החזיה וממשק משתמש גרפי
לסימולטור בעיבוד אילוצים מבוזר
אז מה אתם
עושים
בפרוייקט
שלכם?
ניר הרשהורן וגיא רפפורט
הנדסת תוכנה 2010/2011
Background
The 4 Queens Problem
• Here’s an example CSP we all know:
• Place n (=4 in our case) Queens on a [n x n] Chess Board so that no queen is
threatening/being threatened by another queen.
• Constrains are obvious (in terms of Chesse).
• Always solvable.
Background
Sudoku
• A more complex form of CSP: Sudoku.
• Always solvable? Depends on initial configuration!
• CSP, like SAT, is NP-Hard: you can express any problem in terms of CSP.
• COP (Constraint Optimization Problems) are also available and treated in our project,
but we will not touch these during this presentation.
Backtracking example
Backtracking example
Backtracking example
Backtracking example
Background
Distribution comes into Play (DisCSP)
If all knowledge about the problem can be gathered into one agent, this agent could
solve the problem alone using normal centralized constrained satisfaction alogrithms.
However, Collecting all information about a problem requires not only
communications costs but also the costs of translating one’s knowledge into an
exchangeable format. For example, a constraint might be stored as a very complicated
specialized internal function within an agent. In order to commnicate the knowledge
of this constraint the another agent, which might be implemented on different
computer architecture, the agent would have to translate the knowldege into an
interexchangeable format, such as a table of allowed (or not allowed) combinations of
variable values. These costs of centralizing all information to one agent could be
prohibitively high.
Background
Distribution comes into Play (DisCSP)
(So our first motivation was – that sharing information requires a common format,
which is sometimes not so easy to achieve.)
Furthermore, in some application problems, such as software agents in which each
agent acts as a secretary of an individual, gathering all information to one agent is
undesirable or impossible for security/privacy reasons. In such cases, multiple agents
have to solve the problem without centralizing all information.
–Makoto Yokoo, inventore of ABT
Background
The Distributed Environment
Background
The Distributed Environment
Fine by me!
Tuesday, 9AM?
Background
The Distributed Environment
Problem Domain
• A CSP is defined by the tuple
<X, D, R>
– X: a finite set of variables (or agents)
– D: Domain of each variable
– R: Relations or Constraints between
variable assignments.
• Assignment: a <var,val> pair..
• Solution: a set of |X| assignments,
which satisfies all relations.
• Each of the different algorithms tries
to solve more efficiently – minimizing
constraint checks, assignments, and
convering a minimal part of the search
tree of the problem.
• More at the BGU-DCR team’s page (cs/~dcr).
Current Situation
• The BGU-DCR team headed by Prof. Amnon Meisels
is operating in the field of DCR for several years.
• Group members find themselves developing
personal frameworks for DCR over and over again.
• A Simulator with GUI has been written but is now
deprecated.
• Recently, a new simulator was born out of the final
CS project of Guy Yafe.
• They’ve been toying with the idea of visualization
for a couple of years – and this is where we enter.
Proposed Solution
• The project consists of two parts:
• Developing a practical GUI for the existing simulator
– May enhance usability!
– World fame ensues?
– Competing with current FRODO GUI
• Developing visualization for DCR Algorithms
– Appeals to user.
– Allows researchers to ‘get the feel’ of different
algorithms’ behaviour.
– Great tool for debugging an implementation!
Proposed Solution
• The project consists of two parts:
• Developing a practical GUI for the existing simulator
– May enhance usability!
– World fame ensues?
– Competing with current FRODO GUI
• Developing visualization for DCR Algorithms
– Appeals to user.
– Allows researchers to ‘get the feel’ of different
algorithms’ behaviour.
– Great tool for debugging an implementation!
System Architecture + Technologies
System Architecture + Technologies
• Written in JAVA, which is preferred by our
customers and is also the implementation
language of the current simulator.
• Using JUNG for Java graphs visualizations.
• Contrasted and competing other DCR
simulators (FRODO, Choco, et al).
Main Functional Requirements
•
•
•
•
•
Visualizations
MEB
Message Delay Mechanism
Synchronization Of Runs
Structured Output Files
Visualizations
• Dynamically-built Search Tree
• Inter-agent communication graph
• Histograms
Branch is part of assignment
Assignment is currently checked
Deprecated assignment
Old failed assignments will fade
and disappear.
Visualizations
• Dynamically-built Search Tree
• Inter-agent communication graph
• Histograms
A1
A2
A message is currently sent from
A2A1. These two have a
A3
rather recent messages history.
{A1,A3} also have profound message history but
they link was inactive for a long time.
Visualizations
• Dynamically-built Search Tree
• Inter-agent communication graph
• Histograms
Different Measurements.
For instance: number of
assignments, number of
messages sent, number of
consistency-checks
performed, etc.!
A1 A2 A3 A4 A5 A6 A7 A8
Agents
Main Non-Functional Requirements
• Based on Guy Yafe’s existing simulator
(integration must be seamless).
• Implement More Algorithms:
DPOP, O-DPOP, BnB-ADOPT, AFC, AFB-BJ
• Tutorial (as opposed to FRODO!)
• Open Source, hosted at SourceForge,
observable by all peers around the world.
Major Use-Cases
Project Risks
• “Risk” is coincidentally the middle name of both of
us! Here are some risks we might encounter:
• Integration with existing simulator.
• Dependency upon existing Graph packages.
• Visualization overload on Problem Solving.
• Inevitable loss of execution information.
• Visualization rate limited to human capabilities:
algorithm executes numerous LIPS!
• Writing to file in real time.
אם אין שאלות נוספות –
נותר לנו רק לאחל לנו ולכולכם
וכמובן – חג אורים שמח לכל בית ישראל
גיא וניר – http://www.cs.bgu.ac.il/~guyrap/visu
© Copyright 2026 Paperzz