Artificial Intelligence Physics Problem Solving
Artificial Intelligence Physics Problem Solving
http://www.cs.utexas.edu/users/novak
0
Artificial Intelligence as Science
1
AI as Engineering
2
Areas of Success in AI
• Perception
– Vision: drive vehicle across the desert, in traffic
– Understanding speech
• Robotics
• Natural Language Processing
– Natural Language Understanding
– Machine Translation
• Expert Systems: capture human expertise to create
a program that can diagnose blood infections
• Theorem Proving: prove that the Divide instruction
works correctly
• Symbolic Mathematics: algebra, calculus
• Game Playing: world chess champion
3
Simple Model of Intelligence
6
Perception ?
Action
Real World ¾ Motor Control
4
You vs. Your PC
Human PC
Speed 1,000 Hz 2,000,000,000 Hz
Parallel very 2
RAM 7 1,000,000,000
Disk 10,000,000,000 500,000,000,000
Content Addressable Yes No
Humans think slowly – a million times slower than
computers.
The only thing that is much good about the human
brain is the large content-addressable memory.
5
Fundamental AI Problems
6
Symbolic Representation
• Objects.
• Properties of objects.
• Relationships among objects.
• Rules about classes of objects.
• Understanding English:
(show me a good chinese restaurant in los altos)
• Reasoning based on general principles:
if: the patient is male
then: the patient is not pregnant
• Symbolic mathematics:
If y = m*x+b, what is the derivative of y with
respect to x?
7
Lisp
• Atoms: 3 X MASS
• Structures: (+ X 3)
– a list of three things: +, X and 3
– a tree
+
¡
¡ @
¡ @
¡ @
¡ @
@
X 3
– Lisp code: add X and 3
– an algebraic expression, x + 3
8
Solving Equations
(= Y (+ (* M X) B))
=
¡
¡ @
¡ @
¡ @
¡ @
@
Y +
¡
¡ @
¡ @
¡ @
¡ @
@
* B
¡
¡ @
¡ @
¡ @
¡ @
@
M X
9
Recursion and Search
10
Patterns
(= F (* 4 3))
11
Doing Algebra with Patterns
• Algebra: if x = y + z , then x − y = z .
• Patterns:
>( (= ?x (+ ?y ?z)) (= (- ?x ?y) ?z) )
(= (- V 3) W)
12
Equation Solving Program
(defvar allpats ’(
( (= ?x (+ ?y ?z)) (= (- ?x ?y) ?z) )
( (= ?x (+ ?y ?z)) (= (- ?x ?z) ?y) )
( (= ?x (* ?y ?z)) (= (/ ?x ?y) ?z) )
( (= ?x (* ?y ?z)) (= (/ ?x ?z) ?y) )
( (= ?x (- ?y ?z)) (= (- ?y ?x) ?z) )
( (= ?x (- ?y ?z)) (= (+ ?x ?z) ?y) )
( (= ?x (/ ?y ?z)) (= (/ ?y ?x) ?z) )
( (= ?x (/ ?y ?z)) (= (* ?x ?z) ?y) ) ))
13
Examples of Equation Solving
(= X 3)
(= X 3)
(= X (- Y B))
(= X (/ (- Y B) M))
14
Solving Sets of Equations
Given:
• a set of equations
fall:
15
Solving a Set of Equations by Search
16
English
17
1
Expression Trees to English
1
file expenglish.lsp
18
Generating English
%lisp
>(load "/projects/cs375/expenglish.lsp")
>(exp->english ’x)
(X)
19
Parsing as Search
Search:
(deflexicon
’((propname (radius diameter circumference area
volume height velocity time
weight power height work speed mass))
(a/an (a an))
(the/its (the its))
(objname (circle sphere fall lift)) ))
(defgrammar
(s -> (what is (property) of (object))
(list ’calculate $3 $5))
(property -> ((the/its) (propname)) $2)
(property -> ((propname)) $1)
(quantity -> ((number)) $1)
(object -> ((a/an) (objname) with (objprops))
(cons ’object (cons $2 $4)))
(object -> ((objname) with (objprops))
(cons ’object (cons $1 $3)))
(objprops -> ((objprop) and (objprops))
(cons $1 $3))
(objprops -> ((objprop)) (list $1))
(objprop -> ((a/an) (propname) of (quantity))
(cons $2 $4))
(objprop -> ((propname) (quantity)) (cons $1 $2)
(objprop -> ((propname) = (quantity)) (cons $1 $
21
Solving Physics Story Problems
12.566370614359172
12.279920495357862
122.583125
22