Ocean Critters - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Ocean Critters

Description:

crustacean(x) / eats(garbage) / size(small) - crab .7 ... invertebrate(x) / has(feet) - squid .7. invertebrate(x) / has(arms) - octopus .9. Demo! ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 12
Provided by: dyanar
Category:
Tags: critters | ocean

less

Transcript and Presenter's Notes

Title: Ocean Critters


1
Ocean Critters
  • Dyana Vause
  • Artificial Intelligence
  • Fall 2005
  • Dr. Lacher

2
A Working Platform
  • IBM Thinkpad - Pentium 4
  • Windows XP Professional
  • GCL (GNU Common LISP) 2.6.1 for Windows
  • Free
  • CLtL compliant, ANSI compliance is its goal
  • GNU Emacs for Windows
  • Free
  • Has a Common LISP mode
  • Can have multiple windows
  • Run, debug LISP inside Emacs

3
Where to Get It
  • Did I mention its free?
  • GCL - http//www.gnu.org/software/gcl/gcl.html
  • Emacs - http//www.gnu.org/software/emacs/
  • Good directions - http//www.cs.utexas.edu/users/n
    ovak/gclwin.html

4
My Working Platform
  • Im old school, so
  • Run the LISP executable directly
  • Still free and almost ANSI compliant!
  • Notepad for editing
  • Free if you already have Windows
  • Hey, I only use vi on Unix

5
The Expert System
  • What it does - takes a set of rules, asks the
    user questions to determine which rules apply,
    uses a depth-first search to find the goal, and
    gives the user the possible answers with
    corresponding certainty factors
  • Production system - has a set of rules, working
    memory, and the recognize-act cycle
  • Unification algorithm for matching
  • Depth first search
  • Goal driven, backward chaining
  • The rules do not support OR, or NOT, and so we
    are unable to say, for example, bald(x) -gt not
    hairy(x). The shell will ask both.

6
Borrowed Code
  • Expert system code is borrowed from Lugers shell
    in Chapter 16
  • unification.lsp
  • streamfuncs.lsp
  • expertshell.lsp
  • No porting necessary and it worked on the first
    try!

7
Code
  • unification.lsp
  • recursive algorithm that performs matching /
    substitution on two expressions
  • returns either failed, or the substitution list
    augmented with those bindings needed for a match
  • expertsystem.lsp
  • implements the shell, asks questions
  • streamfuncs.lsp
  • Implements the basic stream handling operations
    with delayed evaluation
  • filters bindings that do not allow the goal to be
    satisfied
  • oceanCritters.lsp
  • my rules for determining some common critters
    found in or near the ocean

8
Certainty Factors
  • Each rule has an associated certainty factor (cf)
  • The cf of a solution is the product of all cfs of
    rules used
  • Substitutions with a cf of less than 0.2 are
    pruned
  • for example,
  • (SKIN CRITTER FEATHERED) gt y
  • (BREATHES CRITTER AIR) gty
  • (COLOR CRITTER BLACKANDWHITE) gt y
  • (FLIES CRITTER)gtn
  • (SKIN CRITTER RUBBERY)gtn
  • (SKIN CRITTER SCALY)gtn
  • (SKIN CRITTER SHELLY)gtn
  • (KIND CRITTER PENGUIN) cf 0.64
  • notice that 0.8 0.8 0.64

9
How To Use the Expert Shell
  • (load expertshell.lsp), (load
    unification.lsp), etc
  • (lisp-shell)
  • ( kind critter ( var x ) )
  • answer the questions!

10
Expert Topic Ocean Critters
  • skin(scaly) /\ breathes(water) -gt
    fish(x) .9
  • skin(shelly) /\ breathes(water) -gt
    crustacean(x) .6
  • skin(feathered) /\ breathes(air) -gt
    bird(x) .8
  • skin(rubbery) /\ spinalColumnless(x) /\
    breathes(water)-gt invertebrate(x) .8
  • skin(rubbery) /\ breathes(water) -gt
    shark(x) .9
  • skin(rubbery) /\ breathes(air) -gt
    cetacean(x) .9
  • bird(x) /\ color(blackAndWhite)
    -gt penguin .8
  • bird(x) /\ flies(x)
    /\ color (white) -gt seagull .7
  • bird(x) /\ flies(x)
    /\ color(brown) -gt pelican .9
  • cetacean(x) /\ size(big) -gt
    whale .8
  • cetacean(x) /\ size(medium) -gt
    dolphin .8
  • fish(x) /\ bony(x)
    /\ snaky(x) -gt eel .9
  • shark(x) /\ eats(plankton) -gt
    whaleshark .6
  • shark(x) /\ eats(people) -gt
    greatWhite .9
  • crustacean(x) /\ eats(garbage) /\
    size(tiny) -gt shrimp .8
  • crustacean(x) /\ eats(garbage) /\
    size(small) -gt crab .7
  • crustacean(x) /\ eats(plankton) -gt
    barnacle .6
  • invertebrate(x) /\ has(feet) -gt
    squid .7
  • invertebrate(x) /\ has(arms) -gt
    octopus .9

11
Demo!
Write a Comment
User Comments (0)
About PowerShow.com