1 / 14

Artificial Intelligence as Representation and Search

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.

kirk-snider
Download Presentation

Artificial Intelligence as Representation and Search

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Artificial IntelligenceasRepresentation and Search

  2. 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

  3. 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

  4. Natural Language UnderstandingSemantic Net Representation vertebrate isa flies bird feathers property covering isa bluebird small blue size color

  5. Tic Tac Toe Representation

  6. Blocks World Search Find path from Start State to Goal State

  7. Backtrack Search for BW3 solution

  8. Backtrack Search for BW3 solution

  9. Semantic Net Searchfind attributes of specified object – CLIPS implementation

  10. Semantic Net Searchfind attributes of specified object – CLIPS implementation

  11. 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) • )

  12. BFS Semantic Net • CLIPS (V6.20 03/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>

  13. Tic Tac Toe Search

  14. 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.

More Related