PSYC 315 Lecture Notes - Lecture 7: Sierpinski Triangle, C4.5 Algorithm, Pseudocode

19 views5 pages

Document Summary

1: define a function and as a part of that definition there is a call to the same function you are defining. Recursion in syntax: rewrite rules, s np vp, np v s, john thinks mary wrote a book. Sierpinski triangle: means-ends analysis, subgoal n, subgoal 2, subgoal, goal current state. Tower of hanoi: to move n discs from tower a to tower b, move n-1 discs from a to c, move disc n from a to b, move n-1 discs from c to b on disc n. Recursion in: back-chaining rule interpretation, c4. 5 node expression. Factorial of n (cond ((zerop n) 1) (t (* n (factorial (- n 1)))))) Zerop (zerop : return t if number is 0, otherwise return nil. Trace factorial: 0: (factorial 3, 1: (factorial 2, 2: (factorial 1, 3: (factorial 0, 3: returned 1, 2: returned 1, 1: returned 2, 0: returned 6.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents