Artificial Intelligence as Representation and Search.

Slides:



Advertisements
Similar presentations
COSC2007 Data Structures II
Advertisements

Artificial Intelligence
Tic tac toe v1.2 Made by Rogonow XX PC: X YOU: O The PC-player with mark X goes first. After the PC, you place the mark O at the position of a green oval.
Chapter 11 :: Logic Languages
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
Expert System Shells - Examples
Part2 AI as Representation and Search
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
Over view on Clips By: Mohsen Faghihi. Clips view.
Chapter 8 Pattern Matching
Inference Methods Propositional and Predicate Calculus.
Simple Rule Based Systems Directly implementing rule based systems in Java Need vocabulary Simplicity sometimes works.
Introduction to CLIPS (Lecture Note #17)
Chapter 7: Introduction to CLIPS
All rights reserved ©L. Manevitz Lecture 61 Artificial Intelligence Planning System L. Manevitz.
Automated Planning & Computer Games: Perspectives and Applications Hector Munoz-Avila.
Constraint Satisfaction Problems
Chapter 8: Advanced Pattern Matching Expert Systems: Principles and Programming, Fourth Edition.
Data Structures 1- Course Syllabus. 2- Introduction about Data Structures.
Abstract Data Types (ADTs) and data structures: terminology and definitions A type is a collection of values. For example, the boolean type consists of.
Review Topics Test 1. Background Topics Definitions of Artificial Intelligence & Turing Test Physical symbol system hypothesis vs connectionist approaches.
Logic Programming Lecture 7: Search Strategies: Problem representations Depth-first, breadth-first, and AND/OR search.
Artificial Intelligence Lecture 9. Outline Search in State Space State Space Graphs Decision Trees Backtracking in Decision Trees.
Chapter 7: Introduction to CLIPS Expert Systems: Principles and Programming, Fourth Edition.
Artificial Intelligence Tarik Booker. What we will cover… History Artificial Intelligence as Representation and Search Languages used in Artificial Intelligence.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 02 : Search.
CSC 205 Programming II Lecture 18 The Eight Queens Problem.
Data Structures Using C++ 2E1 Recursion and Backtracking: DFS Depth first search (a way to traverse a tree or graph) Backtracking can be regarded as a.
AI Topics  Search  Reasoning  Expert Systems  Natural Language Understanding  Planning and Robotics.
Expert Systems Chapter 7 Introduction to CLIPS Entering and Exiting CLIPS A> CLIPS  CLIPS (V6.5 09/01/97) CLIPS> exit exit CLIPS> (+ 3 4)  7 CLIPS>
TIC TAC TOE. import java.util.Scanner; import java.util.Random; public class PlayTTT{ public static void main(String[]args){ Scanner reader = new Scanner(System.in);
Artificial Intelligence and Knowledge Based Systems Fall 2009 Frank Hadlock.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Outline Intro to Representation and Heuristic Search Machine Learning (Clustering) and My Research.
Artificial Intelligence Lecture No. 24 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
CS 100Lecture 191 CS100J Lecture 19 n Previous Lecture –Two dimensional arrays. –Reasonable size problem (a past assignment). –Stepwise refinement. –Use.
Artificial Intelligence Lecture No. 19 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
COSC 2007 Data Structures II
Introduction to State Space Search
Tic tac toe XX PC: X YOU: O The PC-player with mark X goes first. After the PC, you place the mark O at the position of a green circle. If you succeed.
Search in State Spaces Problem solving as search Search consists of –state space –operators –start state –goal states A Search Tree is an efficient way.
Artificial Intelligence Lecture No. 22 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
When constructing a two-dimensional array, specify how many rows and columns are needed: final int ROWS = 3; final int COLUMNS = 3; String[][] board =
Logic Programming Lecture 7: Search Strategies:
Intelligent systems Lecture 11 Tools for development of Expert Systems.
Introduction to CLIPS 2 Session 13 Course: T0273 – EXPERT SYSTEMS Year: 2014.
Jörg Kewisch, June 10, 2013, LILUG Meeting CLIPS C Language Integrated Production System Developed at the Software Development Branch, NASA Lyndon B. Johnson.
Backtracking, Search, Heuristics
Intelligent Systems JESS constructs.
DDC 2423 DATA STRUCTURE Main text:
Chapter 8 – Arrays and Array Lists
Iterative Deepening A*
Intro to Computer Science II
A fun reading Comprehension Game
Adversarial Search.
Fundamentals of Programming II Backtracking with Stacks
Chapter 7: Introduction to CLIPS
Artificial Intelligence Lecture No. 6
Chapter 8: Advanced Pattern Matching
Chapter 8: Data Abstractions
بسم الله الرحمن الرحیم آموزش نرم افزار CLIPS
NIM - a two person game n objects are in one pile
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Haskell Tips You can turn any function that takes two inputs into an infix operator: mod 7 3 is the same as 7 `mod` 3 takeWhile returns all initial.
Backtracking, Search, Heuristics
Computer Based Tutoring
CS51A David Kauchak Spring 2019
Backtracking, Search, Heuristics
Unit II Game Playing.
Presentation transcript:

Artificial Intelligence as Representation and Search

Representation The purpose of representation is to abstract out the problem features which are non-essential to solving the problem and to capture those features which are essential. An example is “blocks worlds” where the problem is to construct a sequence of actions for a robot arm to transform the initial arrangement of blocks into a goal arrangement. –Essential Features Which blocks are on top of which blocks Which blocks are clear Which blocks are on table

Blocks World Representations Predicate Calculus –Predicates : Clear(a), Ontable(a), On(b,a) –Rules :  X ¬  Y on(Y,X)  Clear(X) Arrays or Strings –Stack : ABC State Space Graph –Graph with 3 blocks –Start and Goal states

Natural Language Understanding Semantic Net Representation vertebrate bird bluebird smallblue feathers flies isa property colorsize covering isa

Tic Tac Toe Representation X O O R1 O O R2 O O R3 X X C1 X X C2 C3 O O OO D1 X O XO D2

Blocks World Search Find path from Start State to Goal State

Backtrack Search for BW3 solution Private Function extend() As Boolean Dim ex As Boolean = False Dim children As New Stack(Of String) If ns.Count = 0 Then lbHistory.Items.Add("Goal unreachable ") Return ex Exit Function ElseIf nextV = CInt(goal) Then lbHistory.Items.Add("Path to goal: " & showS(s)) Return ex Exit Function End If ex = True children = NextChildren() If children.Count = 0 Then 'backtrack While s.Count > 0 And nextV = s.Peek de.Push(nextV) labels(CInt(nextV)) = "D" s.Pop() 'remove first element of s ns.Pop() 'remove first element of ns nextV = ns.Peek End While s.Push(nextV) labels(nextV) = "S" Else 'next level Dim nc As Stack(Of String) = NextChildren() For Each state In nc 'save children on ns ns.Push(state) Next nextV = ns.Pop 'get next child s.Push(nextV) labels(nextV) = "S" End If Return ex End Function

Backtrack Search for BW3 solution

Semantic Net Search find attributes of specified object – CLIPS implementation

BFS Semantic Net (deftemplate concept (slot cid) (slot name) (slot depth)) (deftemplate link (slot start) (slot end) (slot linkName)) (deffacts snet (concept (cid 1) (name bluebird) (depth -1)) (concept (cid 2) (name small) (depth -1)) (concept (cid 3) (name blue) (depth -1)) (concept (cid 4) (name feathers) (depth -1)) (concept (cid 5) (name bird) (depth -1)) (concept (cid 6) (name flies) (depth -1)) (concept (cid 7) (name vertebrate) (depth -1)) (link (start 1) (end 2) (linkName size)) (link (start 1) (end 3) (linkName color)) (link (start 1) (end 5) (linkName isa)) (link (start 5) (end 4) (linkName covering)) (link (start 5) (end 6) (linkName property)) (link (start 5) (end 7) (linkName isa)) ) (defrule initsearch (concept (cid 1) (name ?n) (depth -1)) => (assert (concept (cid 1) (name ?n) (depth 0)) ) ) (defrule search (concept (cid ?s) (name ?n) (depth ?d)) (test (> ?d -1)) (concept (cid ?e) (name ?m) (depth -1)) (link (start ?s) (end ?e) (linkName ?x)) => (bind ?dep (+ ?d 1)) (assert (concept (cid ?e) (name ?m) (depth ?dep))) (printout t "Name : " ?m ", relation: " ?x ", depth : " ?dep crlf) )

BFS Semantic Net CLIPS (V /31/02) CLIPS> (load SemanticNet2.txt) Defining deftemplate: concept Defining deftemplate: link Defining deffacts: snet Defining defrule: initsearch +j Defining defrule: search +j+j+j TRUE CLIPS> (reset) CLIPS> (run) Name : bird, relation: isa, depth : 1 Name : vertebrate, relation: isa, depth : 2 Name : flies, relation: property, depth : 2 Name : feathers, relation: covering, depth : 2 Name : blue, relation: color, depth : 1 Name : small, relation: size, depth : 1 CLIPS>

Tic Tac Toe Search

If Start then Mark Center Else Find Row, Column or Diagonal which is a win for Player and Mark Else Find Row, Column or Diagonal which is a win for opponent and Mark Else Construct a Fork if possible.. Etc.