Download presentation
Presentation is loading. Please wait.
Published byGinger Floyd Modified over 9 years ago
1
Music AI Lecture 3 More on Knowledge Representation (anaparastasi gnosis) Introduction to searching (anazitisi)
2
Overview Forwards and backwards deduction More on Semantic nets Frames and scripts Grammars and syntactic trees in NLP Break Introduction to searching Exercises Reading for next week
3
Forwards deduction Knowledge base: Mary coughs. Mary has temperature. Mary and John are together. Is someone coughs and has temperature, then he has a cold. If someone is together with someone else, then the someone else is together with the someone. (?!) If someone has a cold and is together with someone else, then this someone else also has a cold. Task 1: Translate the above into a KR formalism.
4
Forwards deduction Knowledge base: coughs(mary).has_temperature(mary).together(mary,john). coughs(X) ^ has_temperature(X) hascold(X) together(Plato, Socrates) together(Socrates,Plato) hascold(A) ^ together(B,A) hascold(B) Task 2: Prove that John has a cold
5
Forwards deduction: write here the correct answer
6
Tips for deductions: In predicate unification, make sure the names of predicates match exactly. You don’t have to use all the facts and rules in the knowledge base to prove something. Don’t get confused with variable names. Variables start with a capital, and if they are confusing, substitute them with X,Y etc. If you are unsure, write down what you want to say in English. Then translate it into predicate logic notation.
7
Backwards deduction Knowledge base: coughs(mary). has_temperature(mary). together(mary,john). coughs(X) ^ has_temperature(X) hascold(X). together(Plato, Socrates) together(Socrates,Plato). hascold(A) ^ together(B,A) hascold(B). goes_swimming(Snoopy) hascold(Snoopy). hascold(Beast) ^ together (Beauty, Beast) takes_care(Beauty, Beast). hascold(Cold) ^ drinks_from_same_glass(Hot, Cold) hascold(Hot). weather(freezing) hascold(House). hastemperature(mary) says_nonsense(mary). (What is the problem with the last rule?)
8
Backwards deduction Task: Using the above KB, prove that John has a cold. In doing that, show all the options of rules and where they lead to.
9
Backwards deduction: Write down the answer here
10
Semantic Networks, frames and scripts
11
Task In groups, think of a different example of a frame, and of a script. Write it out into some detail.
12
Syntactic rules so far: s np, vp. np det, n. np n. vp v. vp v, np.
13
Task: Draw the syntactic tree: The baby cries. Obelix ate the Roman.
14
Ungrammatical sentences : A sentence that cannot be explained with our grammar is Ungrammatical. Which of the following are ungrammatical? I am reading.I am reading. Tarzan kissed Jane in the rain.Tarzan kissed Jane in the rain. I hate Mondays.I hate Mondays. A dictionary of philosophy.A dictionary of philosophy. Sing!Sing! The book is on the shelf.The book is on the shelf. Chris wears glasses.Chris wears glasses.
15
Searching (anazitisi) Lets play tic tac toe (triliza)... What is a search space? (xwros anazitisis) What is a search tree? (dentro) What is a search strategy? (stratigiki) What is depth first search (DFS)? (kata vathos) What is breadth first search (BFS)? (kata platos) What is a heuristic? (euristiki sinartisi) How can we use heuristics to cut down the search tree?
16
Task: Think of a favourite game or problem that needs solving. Create the (part of) the first two levels of the search space in a tree diagram.
17
Reading for next week Revise everything so far Question: Can we devise grammars for music? (200-300 words)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.