Скачать презентацию Music AI Lecture 3 More on Knowledge Representation Скачать презентацию Music AI Lecture 3 More on Knowledge Representation

86b1180ca89c9122b4522dfd647f887e.ppt

  • Количество слайдов: 17

Music AI Lecture 3 More on Knowledge Representation (anaparastasi gnosis) Introduction to searching (anazitisi) Music AI Lecture 3 More on Knowledge Representation (anaparastasi gnosis) Introduction to searching (anazitisi)

Overview Forwards and backwards deduction More on Semantic nets Frames and scripts Grammars and 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

Forwards deduction Knowledge base: Mary coughs. Mary has temperature. Mary and John are together. 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.

Forwards deduction Knowledge base: coughs(mary). has_temperature(mary). together(mary, john). coughs(X) ^ has_temperature(X) hascold(X) together(Plato, Socrates) 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

Forwards deduction: write here the correct answer Forwards deduction: write here the correct answer

Tips for deductions: In predicate unification, make sure the names of predicates match exactly. 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.

Backwards deduction Knowledge base: coughs(mary). has_temperature(mary). together(mary, john). coughs(X) ^ has_temperature(X) hascold(X). together(Plato, Socrates) 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? )

Backwards deduction Task: Using the above KB, prove that John has a cold. In 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.

Backwards deduction: Write down the answer here Backwards deduction: Write down the answer here

Semantic Networks, frames and scripts Semantic Networks, frames and scripts

Task In groups, think of a different example of a frame, and of a Task In groups, think of a different example of a frame, and of a script. Write it out into some detail.

Syntactic rules so far: s np, vp. np det, n. np n. vp v, Syntactic rules so far: s np, vp. np det, n. np n. vp v, np.

Task: Draw the syntactic tree: The baby cries. Obelix ate the Roman. Task: Draw the syntactic tree: The baby cries. Obelix ate the Roman.

Ungrammatical sentences : A sentence that cannot be explained with our grammar is Ungrammatical. Ungrammatical sentences : A sentence that cannot be explained with our grammar is Ungrammatical. Which of the following are ungrammatical? • • I am reading. Tarzan kissed Jane in the rain. I hate Mondays. A dictionary of philosophy. Sing! The book is on the shelf. Chris wears glasses.

Searching (anazitisi) Lets play tic tac toe (triliza). . . What is a search 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?

Task: Think of a favourite game or problem that needs solving. Create the (part 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

Reading for next week Revise everything so far Question: Can we devise grammars for Reading for next week Revise everything so far Question: Can we devise grammars for music? (200 -300 words)