universitatea politehnica bucuresti 2007-2008 adina magda florea artificial intelligence

Click here to load reader

Download Universitatea Politehnica Bucuresti 2007-2008 Adina Magda Florea   Artificial Intelligence

Post on 14-Jan-2016

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Artificial IntelligenceUniversitatea Politehnica Bucuresti 2007-2008

    Adina Magda Floreahttp://turing.cs.pub.ro/ai_07

  • Structured knowledge representation

    Semantic NetworksUnitsSpecific inferencesProblems with inheritanceSemantic WebLecture No. 8

  • Semantic networksfirst model for structured knowledge representationdescribe semantics of natural languageused extensively as a model for representing knowledge in KBS

  • Knowledge baseRadu sent a letter to Maria.Radu is a student.Ioana is a schoolgirl.Radu's address is Luterana, 15.

    occupation (radu, student)occupation (ioana, schoolgirl)send (radu, ioana, letter)address (radu, luterana - 15)

  • Group knowledge into entitiesRaduoccupation (radu, student)send (radu, ioana, letter)address (radu, luterana - 15)Ioanaoccupation (ioana, schoolgirl)send (radu, ioana, letter)Radu occupation:student address:luterana-15 Ioana occupation: schoolgirl Associate propertiesor attributesModel 2 args predicatesWhat about 3 args predicates?

  • - use ISA predicate- use Skolemizationto eliminateexistential quantifier

  • RaduISA:PersonOccupation:studentAddress:luterana-15IoanaISA:Person Occupation :schoolgirl

    T1 ISA:Sending-event Sender:RaduReceiver:Ioana Object:letter

    slots

  • ISA introduces a class-instance relationshipAKO predicate introduces a subclass-class relationship

  • Sending-eventAKO:EventSender:PersonReceiver:PersonObject:ObjectClass

    PersonAKO:living ThingOccupation:(student, engineer, )Address:string

  • Examples of SN

  • UnitsUnitsMemberOf - ISASubClass, SuperClass - AKO

  • FacetsFacetsFeatures associated to slotsPossible facets

    Value facetValue type facetDefault facetIf-needed procedure or functionDemon facetComment facet

  • Specific inferences in semantic networks: properties/attributes inheritance

    1) Inheritance of attributes along the ISA relation 2) Inheritance of attributes along the AKO relation

    Attribute's value inheritance

  • Attribute's value inheritance

    Mostenirea valorilor in retele semantice

  • Algorithm:Inheritance of attribute's value in a class hierarchyThe algorithm gets the value V of an attribute A of the object OFindVal (O, A, V)1.Create a list L with node O and all the nodes linked to O by an ISA relationship2.while L != [ ] do2.1.Remove first node N from L 2.2.if attribute A of node N has value, be it Vthen 2.2.1.Place V as the value of attribute A of object O2.2.3.return SUCCESS2.3.Add all nodes linked by AKO to N at the end of L3.return FAILend.

  • Attribute's default value inheritance

    Mostenirea valorilor implicite in retele semantice

  • Algorithm:Inheritance of attribute's default value in a class hierarchyThe algorithm gets the default value V of an attribute A of the object OFindDefault (O, A, V)1.Create a list L with node O and all the nodes linked to O by an ISA relationship2.while L != [ ] do2.1.Remove first node N from L 2.2.if attribute A of node N has a default value, be it Vthen 2.2.1.Place V as the value of attribute A of object O2.2.3.return SUCCESS2.3.Add all nodes linked by AKO to N at the end of L3.return FAILend.

    FindIfNeeded(O,A,V)

  • Control strategy the control strategy of inheritance indicates the order of considering the different facets

    2 basic strategiesN strategyZ strategy

  • Algorithm:The algorithm gets the value V of an attribute A of the object O using the N strategy

    FindValN (O, A, V)1.if FindVal (O,A,V) = SUCCESSthen return SUCCESS2. if FindDefault (O,A,V) = SUCCESS then return SUCCESS3. if FindIfNeeded (O,A,V) = SUCCESS then return SUCCESS4.return FAILend

    Strategy N

  • Algoritm:Strategia Z de determinare a valorii unui atribut.Algoritmul determina valoarea unui atribut A al unei instante O utilizind strategia Z.DetValZ (O, A, V)1.Formeaza o lista L cu nodul O si toate nodurile legate de O prin relatia ISA2.cat timp L != [ ] executa2.1.Elimina primul nod, N, din lista L2.2.daca fateta valoare a atributului A a nodului N este V then 2.2.1.Depune V in nodul punctat de atributul A al obiectului O2.2.2.intoarce SUCCESStrategy Z

  • 2.3.daca fateta valoare implicita a atributului A a nodului N este Vatunci 2.3.1.Depune V in nodul punctat de atributul A al obiectului O2.3.2.intoarce SUCCES2.4.daca fateta procedura necesara a atributului A a nodului N este proc (A1,..., An,V)atunci2.4.1.Determina valorile atributelor A1,..., An ale instantei O2.4.2.daca s-au gasit valori pentru A1,..., Anatuncii.executa proc (A1,..., An,V)ii.Depune V in nodul punctat de atributul A al obiectului Oiii.intoarce SUCCES3.intoarce INSUCCESsfarsit.

  • Problems with inheritanceDAG networks

    Multiple inheritance

  • DAG Semantic network

  • Multiple inheritanceDistance between unitsIf we look for the value of an attribute A of a unit U1 and find 2 paths : U1U2 and U1U3 to U2 and U3 containing values for Athen compute the length of the alternate paths from the instance/unit U1 to units U2 and U3 and choose the value from the closest unit (shortest path)May cause semantic problems

  • Distance and inferential distanceShortestdistanceShortestinferentialdistance

    Distanta si distanta inferentiala intre unitati

  • Multiple inheritanceInferential distanceUnit1 is closer to Unit2 than to Unit3 if and only if Unit1 has an inferential path to Unit3 which contains Unit2. Unit1 is closer to Unit2 than to Unit3 if and only if Unit2 is on an inferential path of ISA and AKO relationships between Unit1 and Unit3

  • Algorithm:Inheritance of attribute's value in a class hierarchy based on inferential distanceFind the value V of slot S of unit U

    1.Make a list L with unit U and all units to which unit U is linked by an ISA/MemberOf2.Initialize a list CAND = [ ] 3.while L != [ ] do3.1.remove first unit X from L3.2.if slot S of X has valuethen CAND = CAND {X}3.3.else add to L all units to which X is linked by a AKO/SuperClass4.for each unit C CAND do4.1.Verify if there is another C CAND having an inferential distance to U shorter than to C4.2.if such a C' existsthen remove C from CAND

  • 5.if card (CAND) = 0then return FAIL /* no value for S */6.if card (CAND) = 1then 6.1.Be C the one element of CAND6.2.Make the value V of slot S of C the value of slot S of U6.3.return SUCCESS7.if card (CAND) > 1 then return CONTRADICTIONend.

  • Combined representations

    Knowledge base contains:- declarative knowledge: units- procedural knowledge: rules daca Camion.Inaltime > 2 si Camion.Culoare = rosuatunci Camion.Pret = 1000

    Inferences: both specific to units and specific to rules

  • Semantic Web and Ontologies

  • Semantic WebWeb was invented by Tim Berners-Lee (amongst others), a physicist working at CERNTBLs original vision of the Web was much more ambitious than the reality of the existing (syntactic) Web:

    TBL (and others) have since been working towards realising this vision, which has become known as the Semantic WebE.g., article in May 2001 issue of Scientific American

  • Where we are Today: the Syntactic Web[Hendler & Miller 02]

  • The Syntactic Web isA hypermedia, a digital libraryA library of documents called (web pages) interconnected by a hypermedia of linksA database, an application platformA common portal to applications accessible through web pages, and presenting their results as web pagesA platform for multimediaBBC Radio 4 anywhere in the world! Terminator 3 trailers!A naming schemeUnique identity for those documents

    A place where computers do the presentation (easy) and people do the linking and interpreting (hard).

    Why not get computers to do more of the hard work?

    [Goble 03]

  • Impossible (?) using the Syntactic WebComplex queries involving background knowledgeFind information about animals that use sonar but are not either bats or dolphins

    Locating information in data repositoriesTravel enquiriesPrices of goods and servicesResults of human genome experiments

    Delegating complex tasks to web agentsBook me a holiday next weekend somewhere warm, not too far away, and where they speak French or English

  • What is the Problem?Consider a typical web page:Markup consists of: rendering information (e.g., font size and colour)Hyper-links to related contentSemantic content is accessible to humans but not (easily) to computers

  • What information can we seeWWW2002The eleventh international world wide web conferenceSheraton waikiki hotelHonolulu, hawaii, USA7-11 may 20021 location 5 days learn interactRegistered participants coming fromaustralia, canada, chile denmark, france, germany, ghana, hong kong, india, ireland, italy, japan, malta, new zealand, the netherlands, norway, singapore, switzerland, the united kingdom, the united states, vietnam, zaireRegister nowOn the 7th May Honolulu will provide the backdrop of the eleventh international world wide web conference. This prestigious event Speakers confirmedTim berners-lee Tim is the well known inventor of the Web, Ian FosterIan is the pioneer of the Grid, the next generation internet

  • What information can a machine seeWWW2002The eleventh international world wide web conferenceSheraton waikiki hotelHonolulu, hawaii, USA7-11 may 20021 location 5 days learn interactRegistered participants coming fromaustralia, canada, chile denmark, france, germany, ghana, hong kong, india, ireland, italy, japan, malta, new zealand, the netherlands, norway, singapore, switzerland, the united kingdom, the united states, vietnam, zaireRegister nowOn the 7th May Honolulu will provide the backdrop o

View more