1 / 59

Knowledge-based Systems

Knowledge-based Systems. Configuration ( Διαμόρφωση) Some slides are by Lora Aroyo. Knowledge-intensive Tasks. Knowledge-intensive task. Synthetic task. Analytic task. Prediction. Design. Monitoring. Modeling. Diagnosis. Planning. Assessment. Scheduling. Assignment. Classification.

warren
Download Presentation

Knowledge-based Systems

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. Knowledge-based Systems Configuration (Διαμόρφωση) Some slides are by Lora Aroyo

  2. Knowledge-intensive Tasks Knowledge-intensive task Synthetic task Analytic task Prediction Design Monitoring Modeling Diagnosis Planning Assessment Scheduling Assignment Classification Configuration Adopted from Speel, et al, 2001

  3. Configuration Input Given/Input: • a fixed, pre-defined set of components/parts, described by: • a set of properties • ports for connecting it to other components • constraints at each port that describe the components that can be connected at that port, and other structural constraints • description of the desired configuration = requirements (specification of desired functionality) • criteria for making optimal selections (possible combinations)

  4. Configuration Output To build/Output: • One or more configurations (combinations of the parts) that satisfy all the requirements (specification) • configuration = set of components (parts) and a description of the connections (combinations) between the components in the set • detect possible inconsistencies in the requirements

  5. Definition of Configuration • Given: • Specification (of desired functionality) = requirements • Possible parts = components • Possible combinations • Find: • A combination of the parts (= configuration) which satisfies the specification • A search problem

  6. Configuration Example • Building a software system from modules: • Components = the modules • Ports = the variables (need values or provide values) • Constraints = descriptions of the number and types of values needed • Constraints = constraints about the compatibility of one module with another • Description of the desired configuration = user's description of what the software system is supposed to do

  7. Example – T-shirt configuration • The configuration of a T-shirt requires that we specify: • the size (small, medium, or large) • the print (``Men in Black'' - MIB or``Save the Whales'' - STW) • the color (black, white, or red) • There are the following rules: • If the small size is chosen then the STW print cannot be selected • If the MIB print is chosen then the black color has to be chosen as well • If the STW print is chosen then the black color cannot be selected.

  8. Configuration: Examples • Physical products: • Computer parts • Elevators • Kitchens • Trucks • Etc. • Non-physical products: • Insurance packages • Investment policies • Real estate assignments (user profiling) • Medical recipes …

  9. Configuration Example Configuration-1 Part-1 Part-2 Part-1-3 Part-1-1 A B A Part-1-2 B A A B B A B

  10. Παράδειγμα Διαμόρφωσης • Διαμόρφωση ενός εξαρτήματος για ένα υπολογιστικό σύστημα Εξάρτημα συστήματος A B C D A-1 A-2 B-1 B-2 C-1 C-2 D-1 D-2 Τα A,B,C,D ή συνδυασμοί τους προσδιορίζονται από τις απαιτήσεις του πελάτη για την υλοποίηση του εξαρτήματος. Το καθένα μπορεί να υλοποιηθεί με δύο τρόπους

  11. Παράδειγμα Διαμόρφωσης Πίνακας κανόνων / περιορισμών

  12. Παράδειγμα Διαμόρφωσης • Προδιαγραφές πελάτη: {A,D} D A D-1 D-2 A-1 A-2 2C C-1 B 2B 3B B-1 B-2 2B-1 2B-2 1B-1,1B-2 3B-1 … 2C-1 … 2C 4C 2C επιλογές 2C-1 … 4C-1 … 2C-1 … απαιτήσεις

  13. Configuration aspects • one cannot design new components during the configuration task • each component is restricted in advance to only be able to "connect" to other certain components in fixed ways • (i.e., they can't be modified to get arbitrary connectivity) • the solution specifies both the components in the configuration & how they are related

  14. Design (generalization of config.) Design = complex task with several logical parts: • functionality • system type • general types of components • configuration of types of components • actual components • values of the attributes of those components

  15. Design (generalization of config.) Configuration is a special case of design In design: • set of possible parts - not fixed in advance • possible combinations - not fixed in advance Design is typical synthetic task – with open-ended solution space Configuration is analytic task – with closed solution space (in practice it is very large)

  16. Use of Configuration Flexibility in production: • fast changing product range • wide variety of product range • Reduce stocks • Build-to-order (‘a la carte’) Flexibility to custom manufacturing economics of mass production

  17. Configuration vs. Classification • Configuration is more difficult than classification • Classification select one class • Configuration  select subset of parts; allow multiple copies of parts; select combination of the chosen parts (architecture)

  18. Configuration models • Used as a basis for different types of tasks • Configuring ‘therapies’ • part of larger diagnosis & therapy task • Configuring alternative combinations of steps for a plan • Part of a planning process

  19. Configuration • Configuration as AI problem • Heuristic algorithms for finding sub-optimal solutions • Configuration as search problem • Two search spaces: • Selection space • Search for appropriate / compatible / optimal components • Arrangement space • Search for appropriate / compatible /optimal arrangement of the components

  20. abstract & partial solutions expanded & refined solutions Configuration picture specifications matching refinement, expansion additional specifications component hierarchy arrangement model

  21. Configuration Sub-tasks • Components are selected to satisfy the requirements (Selection = choosing components) • Components are placed into the configuration (Association = logical relationships between components) • Evaluation = Compatibility Testing and Goal satisfaction testing. Configuration = Selection + Association + Evaluation

  22. Configuration Implementation Configuration implementation depends on: • What and how much is known about each subtask in advance • How much knowledge is used in each subtask • What is the mix & order of the subtasks • Whether knowledge from later subtasks can be moved forward into earlier subtasks to prevent failures

  23. Selection example • ensure that only compatible components are selected • if an evaluation is known then the best (optimal) set of components should be selected Selection = Choosing Components + Compatibility Testing

  24. Configuration variation • Arrangement = establishing specific relationships (precisely locate one component with respect to another or with respect to some reference location) • "logical relationships", used in Association:"next to","connected to“, etc. Configuration = Selection + Association + Arrangement + Evaluation

  25. B A C B C A Arrangement task Configuration 1 Precise description of the positions of all three circles = arrangement 1 Moving circles produces another arrangement 2

  26. Components Grain Size • large modules • less flexible • strong requirements for other modules • preconfigured smaller modules • less configuration needs to be done • small modules • more flexibility • require more configuration

  27. Experience • how much experience is available • To guide the search for combinations of modules that satisfy the requirements • build previously discovered sub-configurations into the system • search is further reduced • add heuristic knowledge • prefer one module over another in a situation • lowering the chance of backtrack & remake this decision • allows to do things in previously successful order

  28. Configuration as a CSP • design & configuration problems • formulated as constraint satisfaction problems • If given: • the pattern of connections • constraints on this pattern • not known components •  equivalent to a crossword puzzle • attempt to find a set of values for some variables which are related by constraints • configuration •  a sequence of CSPs •  a Dynamic CSP

  29. Example – T-shirt configuration • The configuration of a T-shirt requires that we specify: • the size (small, medium, or large) • the print (``Men in Black'' - MIB or``Save the Whales'' - STW) • the color (black, white, or red) • There are the following rules: • If the small size is chosen then the STW print cannot be selected • If the MIB print is chosen then the black color has to be chosen as well • If the STW print is chosen then the black color cannot be selected.

  30. Example – T-shirt configuration • This configuration problem can be modelled as a CSP with three variables x1,x2,x3 representing size, print, and color respectively • The domains of the variables are • D(x1)={small,medium,large} • D(x2)={MIB,STW} • D(x3)={black,white,red} • The first constraint is a binary constraint between variables x1 and x2 with allowed tuples: • {<small,MIB>,<medium,MIB>,<medium,STW>,<large,MIB>,<large,STW>} • The second constraint is a binary constraint between variables x_2 and x_3 with allowed tuples: • {<MIB,black>,<STW,white>,<STW,red>}

  31. Configuration as a CSP • used for checking compatibilities between choices (i.e. ports of components) • represent restrictions on choices • "posted" to (i.e., attached to) the things they restrict, to affect its subsequent use, such as its refinement • "propagated" through configuration, to affect other components • used to record decisions not corresponding to objects in the system • restrict the set of components without deciding which (i.e. partial choice) • implement least commitment strategy (i.e. choices are delayed to accumulate more information; avoid premature decisions)

  32. Main configuration techniques • Generate and test • Forward / Backward chaining • Constraint-based search • Specialized search methods • Επέκταση και διευθέτηση • Σταδιακή εργασία με πρόβλεψη • Πρόταση και αναθεώρηση

  33. Επέκταση και διευθέτηση • Η μέθοδος αυτή αρχικά συγκεντρώνει τις προδιαγραφές των κύριων εξαρτημάτων • Μετά επεκτείνει τη διαμόρφωση για να συμπεριλάβει όλα τα απαιτούμενα εξαρτήματα • Μετά διευθετεί (τοποθετεί) τα εξαρτήματα • Είναι κατάλληλη για προβλήματα όπου οι αποφάσεις επιλογής εξαρτημάτων δεν εξαρτώνται από τις αποφάσεις διευθέτησης

  34. Επέκταση και διευθέτηση • Η επέκταση και διευθέτηση περιλαμβάνει 3 βοηθητικές διεργασίες • Υπολογισμός του συνόλου των απαιτήσεων για ένα εξάρτημα όταν δίνονται οι αρχικές προδιαγραφές • get-requirements • Επιλογή των καλύτερων εξαρτημάτων από το σύνολο των υποψηφίων • get-best-parts • Προσδιορισμός της καλύτερης διευθέτησης των εξαρτημάτων • arrange-parts

  35. Επέκταση και διευθέτηση • Αλγόριθμος • Αρχικοποίησε τη λίστα εξαρτημάτων σε κενή • Συγκέντρωσε τις απαιτήσεις εξαρτημάτων που αντιστοιχούν στις αρχικές προδιαγραφές(get-requirements) • Πάρε τα κύρια εξαρτήματα που αντιστοιχούν στις απαιτήσεις εξαρτημάτων(get-best-parts) • Για κάθε κύριο εξάρτημα κάνε τα ακόλουθα • Εισήγαγε το κύριο εξάρτημα στη λίστα εξαρτημάτων • Πρόσθεσε τα απαιτούμενα εξαρτήματα που αντιστοιχούν στο παραπάνω κύριο εξάρτημα (add-required-parts) • Διευθέτησε τα εξαρτήματα που βρίσκονται στη λίστα εξαρτημάτων(arrange-parts) • Επέστρεψε τη λύση

  36. Επέκταση και διευθέτηση • add-required-parts • Συγκέντρωσε τις άμεσες απαιτήσεις εξαρτημάτων που αντιστοιχούν στο συγκεκριμένο εξάρτημα (get-requirements) • Εάν υπάρχει έστω μια απαίτηση εξαρτήματος • Πάρε τα νέα εξαρτήματα που αντιστοιχούν στις απαιτήσεις εξαρτημάτων (get-best-parts) • Για κάθε νέο εξάρτημα επανέλαβε τα ακόλουθα: • Εισήγαγε το νέο εξάρτημα στη λίστα εξαρτημάτων • Πρόσθεσε τα απαιτούμενα εξαρτήματα που αντιστοιχούν στο παραπάνω κύριο εξάρτημα (add-required-parts)

  37. Επέκταση και διευθέτηση • Η μέθοδος αυτή στηρίζεται σε προϋποθέσεις • Υπάρχει συνάρτηση αξιολόγησης, η οποία επιλέγει τα καλύτερα εξαρτήματα που ικανοποιούν τις απαιτήσεις • Η διευθέτηση των επιλεχθέντων εξαρτημάτων είναι πάντα δυνατή • Δεν υπάρχουν περιορισμοί που δε μπορούν να ικανοποιηθούν. Έτσι η επιλογή και η διευθέτηση είναι ανεξάρτητες • Τα εξαρτήματα δε διαμοιράζονται

  38. Παράδειγμα • Διαμόρφωση εσωτερικού χώρου ενός δωματίου • Εξαρτήματα • Τραπέζια, γραφεία, καρέκλες, κρεβάτια, κτλ. • Απαιτήσεις κύριων εξαρτημάτων • Γραφείο 1.5x0.80, κρεβάτι 2x0.90, κτλ. • Απαιτούμενα εξαρτήματα για τα κύρια • Γραφείο – καρέκλα • Βιβλιοθήκη – ράφια • Πόρτες – χερούλια • Προδιαγραφές δωματίου • 10x5

  39. Σταδιακή εργασία με πρόβλεψη • Η επέκταση και διευθέτηση ακολουθεί αυστηρή σειρά στη διαδικασία διαμόρφωσης • Προσδιορισμός εξαρτημάτων βάση απαιτήσεων • Επιλογή καλύτερων εξαρτημάτων • Διευθέτηση επιλεχθέντων εξαρτημάτων • Συχνά οι παραπάνω διεργασίες αλληλεξαρτώνται • Π.χ. η διαμόρφωση ενός σύνθετου συστήματος μπορεί να απαιτεί το διαχωρισμό της διεργασίας σε μικρότερα τμήματα

  40. Σταδιακή εργασία με πρόβλεψη • Η σταδιακή εργασία με πρόβλεψη χωρίζει τη διαδικασία διαμόρφωσης σε μικρότερα τμήματα εργασιών (subtasks) • Ηκάθε υποεργασίαπεριλαμβάνει μια μικρότερη διαδικασία διαμόρφωσης • Οι υποεργασίες εκτελούνται σε κάποια σειρά ή ανεξάρτητα ανάλογα με τις αλληλεπιδράσεις • Η τεχνική αυτή χρησιμοποιείται όταν οι αλληλεπιδράσεις μέσα στις υποεργασίες είναι πολύ πιο ισχυρές από ότι μεταξύ διαφορετικών υποεργασιών

  41. Σταδιακή εργασία με πρόβλεψη • Αλγόριθμος • Αρχικοποίησε τη λίστα εξαρτημάτων σε κενή • Συγκέντρωσε τις απαιτήσεις εξαρτημάτων που αντιστοιχούν στις αρχικές προδιαγραφές (get-requirements) • Πάρε τα κύρια εξαρτήματα που αντιστοιχούν στις απαιτήσεις εξαρτημάτων (get-best-parts) • Βάση των απαιτήσεων δημιούργησε υποεργασίες • Όσο υπάρχουν υποεργασίες που δεν έχουν εκτελεστεί • Έλεγξε τις συνθήκες που πρέπει να πληρούνται για να ξεκινήσει η εκτέλεση κάποιας υποεργασίας και επέλεξε μια υποεργασία • Εκτέλεσε την εργασία καλώντας την αντίστοιχη διαδικασία • Επέστρεψε τη λύση

  42. Σταδιακή εργασία με πρόβλεψη • Για την εκτέλεση κάθε υποεργασίας πρέπει να υπάρχει μια διαδικασία διαμόρφωσης • Υλοποιημένη με οποιαδήποτε τεχνική χρειάζεται • Η σταδιακή εργασία με πρόβλεψη μπορεί να αντιμετωπίσει προβλήματα από αλληλεπιδράσεις λόγω διαμοίρασης εξαρτημάτων • Αν δύο οι περισσότερες υποεργασίες εκτελεστούν παράλληλα και χρειάζονται το ίδιο εξάρτημα μπορεί να κατασκευάσουν αντικρουόμενες διαμορφώσεις • Οπότε χρειάζεται κάποια πρόβλεψη κατά την εκτέλεση υποεργασιών

  43. Σταδιακή εργασία με πρόβλεψη • Η πρόβλεψη μπορεί να αποτρέψει μελλοντικές συγκρούσεις / αδιέξοδα • Κάτι ανάλογο με το forward checking και το maintaining arc consistency σε CSPs • Για να γίνουν σωστές προβλέψεις απαιτείται εκτεταμένη ανάλυση του πεδίου εφαρμογής • Η σταδιακή εργασία με πρόβλεψη είναι πολύ domain-dependent

  44. Παράδειγμα • Η διαμόρφωση μιας πολυκατοικίας μπορεί να χωριστεί σε ένα σύνολο υποεργασιών • Διαμόρφωση κάθε διαμερίσματος, διαμόρφωση κοινών χώρων, διαμόρφωση parking, κτλ. • Υπάρχουν αλληλεπιδράσεις μεταξύ των υποεργασιών? • Αποφάσεις διευθέτησης υδραυλικών εγκαταστάσεων, σωλήνες καλοριφέρ, κ.α.

  45. Πρόταση και αναθεώρηση • Οι προηγούμενες μέθοδοι δεν προσφέρουν δυνατότητες εναλλακτικών επιλογών ή οπισθοδρόμησης σε περίπτωση ασυμβατότητας • Η πρόταση και αναθεώρηση είναι βασισμένη στην ικανοποίηση περιορισμών και προσφέρει αυτές τις δυνατότητες • Κατά τη διάρκεια της διαμόρφωσης ελέγχονται περιορισμοί • Αν υπάρχει παραβίαση τότε εναλλακτικές επιλογές μπορούν να δοκιμαστούν ή να αναιρεθεί η προηγούμενη επιλογή

  46. Πρόταση και αναθεώρηση • Αλγόριθμος • Αρχικοποίησε τη λίστα εξαρτημάτων σε κενή • Συγκέντρωσε τις απαιτήσεις εξαρτημάτων που αντιστοιχούν στις αρχικές προδιαγραφές (get-requirements) • Πάρε τα κύρια εξαρτήματα που αντιστοιχούν στις απαιτήσεις εξαρτημάτων (get-best-parts) • Όσο δεν υπάρχει αποτυχία στις επιλογές και υπάρχουν επιλογές που πρέπει να γίνουν • Επέλεξε το επόμενο εξάρτημα στην ως τώρα μερική διαμόρφωση για το οποίο υπάρχει αναπάντητη επιλογή • Εάν υπάρχουν περιορισμοί σε σχέση με άλλα εξαρτήματα, ενεργοποίησε τους • Διευθέτησε το εξάρτημα • Εάν υπάρχουν περιορισμοί που παραβιάζονται επέλεξε εναλλακτική διευθέτηση • Αν δεν υπάρχουν εναλλακτικές λύσεις οπισθοδρόμησε στην προηγούμενη επιλογή • Επέστρεψε τη λύση

  47. Configuration Example - XCON • Πεδίο Γνώσης:διαμόρφωσηυπολογιστικών συστημάτων VAX της DEC computers, ανάλογα με τις προδιαγραφές των πελατών • Κατασκευάστηκε: από την ομάδα του John McDermott, 1978 - 1981 • Input:Τα ζητούμενα χαρακτηριστικά τουυπολογιστικού συστήματος • Output:Διαμόρφωση τουυπολογιστικού συστήματος

  48. Configuration Example - XCON • XCON σύστημα για τη διαμόρφωσηυπολογιστικών συστημάτων της DEC • Λειτουργία: • Συλλογή προδιαγραφών από τον χρήστη • Έλεγχος πληρότητας / προσθήκη εξαρτημάτων/ απαιτήσεις και συμβατότητα λογισμικού • Προσδιορισμός cpu, RAM, δίσκων, κτλ. • Χωρική διευθέτηση εξαρτημάτων, απαιτήσεις σε ρεύμα καλώδια κτλ. • Το XCON διαθέτει ΒΔ με 31000 εξαρτήματα • 40 τύποι εξαρτημάτων με 40 χαρακτηριστικά για καθένα περίπου

  49. Configuration Example - XCON • Αναπαράσταση Γνώσης: Production rules. • Inference engine:Σταδιακή εργασία με πρόβλεψηκαι forward chaining για τη διαμόρφωση των υποεργασιών • Χειρισμός ασάφειας/αβεβαιότητας:Όχι: το σύστημα απλά κατασκευάζει μια λύση, που υποτίθεται ότι είναι ικανοποιητική

  50. Configuration Example - XCON

More Related