Lecture 7 - Logic and Knowledge Graphs
• Goal is to evaluate the properties of Card given a card deck
• Pros and Cons of propositional logic in the gaming world (mostly cons)
o For a game like Schnapsen, it will create 1000’s of clauses, not efficient.
Pros of propositional logic
• Propositional logic is declarative
o You write out the properties that something should have
▪ In machine learning you can predict something, but do not know why.
• You can deal with partial information better.
o When some information gets known, you can infer things better since you can already make up
the rules (even without knowing the info).
• Propositional logic is Compositional
o You can derive meaning
▪ And the meaning is context independent (unlike NLP, where context is dependent).
RULE-BASED REASONING
An inference rule is a logical form consisting of a function which takes premises, analyzes their syntax, and
returns a conclusion (or conclusions).
Monotonicity
• The set of entailed sentences can only increase as information is added to the knowledge base.
• It is an only growing function, the higher the input gets, the higher the output gets.
o
KNOWLEDGE GRAPHS
Ontology
• An ontology is an explicit specification of a shared conceptualization that holds in a
particular context
o Explicit, declarative, logical, machine interpretable language
• Conceptualization classes, instances and relations
• Context tied to a particular domain or task
• Conditions on class membership
o You want to define classes (groups of things)
▪ All mammals are warm-blooded
▪ If you don't eat meat -> you're a vegetarian
• Relations between classes
o You want to define relationships between classes
▪ All cities are populated places
▪ Every class is equivalent to itself
• Assertions of class membership
o Define instances (unique things)
▪ Amsterdam is a city
• Characteristics of properties has
o Capital only relates countries to cities partOf is a transitive property
• Assertions of property relations
o hasCapital(Netherlands,Amsterdam)
• Assertions of equality
, o morning star = evening star = venus
Modelling with triples (S P O)
Resource Description Framework (RDF)
• A (one) vocabulary defining a language (logic) to model knowledge graphs
Specify that something is a member of a class
A triple (S P O) consists of a Subject – Predicate – Object
Basic Schema Vocabulary
Some predicates in the middle have the type “rdf:”, which have a special meaning.
Some entailment Rules
, Two different languages:
Rdf - only objects
Rdfs - objects and vocabulary
RdfSchema = rdfs
Methodology - stages in ontology development
1. Determine domain & scope
2. Consider reuse
3. Enumerate terms
4. Define taxonomy
5. Define properties
6. Define classes and their properties
7. Define instances
8. Check for anomalies
Step 3: Enumerate terms
Some examples of the Schnapsen game:
• Cards
• Trump
• Diamond
Step 4: Define taxonomy (make sense of the terms)
• Jack is a Rank
• Diamond is a Suit
• Diamond is a Trump