Docsity

LISP Project Instructions for Artificial Intelligence Course - Prof. Amauri Antonio Arroyo, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
EEL-5840 LISP Project
Fall 2008 Dr. Arroyo
1
LISP PROJECT
Instructions: Choose from I-V below. You may do ONE additional problem for extra credit.
I. Write a general LISP program to implement A* search, where both the heuristic function h(n) and the fixed cost
function g(n) (and therefore f(n)) are specified by the user. (a) Test your program with the 8-puzzles used in classand
with case (a) below; (b) Using a diferent heuristic function (e.g., Manhattan Distance) use your program to solve the
case (b) puzzle below; (c) Use your program to solve the following 15-puzzle (if you do not like my test puzzles,
test with at least 3 cases of your own volition). In class we used h(n)=W(n)=# tiles out of place and g(n)=d(n)=depth
of each node.
Test Case (a) {Approx. 8 moves 11 nodes} {Approx. 10 moves 29 nodes}
INITIAL GOAL INITIAL GOAL
2 3 4 1 2 3 2 3 4 1 2 3
1 6 8 8 _ 4 1 6 _ 8 _ 4
7 _ 5 7 6 5 7 5 8 7 6 5
Test Case (b) {Approx. 18 moves 206 nodes} Test Case (c) {Approx. 24 moves 6000 nodes}
INITIAL GOAL INITIAL GOAL
2 3 1 1 2 3 1 2 7 8 1 2 3 4
8 6 4 8 _ 4 5 6 3 4 5 6 7 8
7 _ 5 7 6 5 9 10 14 15 9 10 11 12
13 11 12 _ 13 14 15 _
II. Repeat problem I using IDA*
III. An "artificial ant" lives in a two dimensional grid world and is able to react to a pheromone trail that decays (each
individual trail left by an agent ant is one cell wide, but there can be multiple ants laying pheromone trails) with the
following behaviors: (1) follow the food trail, (2) become agitated and start a circular-type motion (danger) and (3)
attack (sting opponent). In addition the ant has a (1) build the nest behavior, (2) go out and do random wandering
behavior and a (3) return home behavior. You may wish to add other behaviors or modify the ones I have given
(without watering down the problem) to make the problem more realistic. Write a LISP-based simulator for the ant
world and demonstrate and test your system with sufficient detail to see the effects of a small colony of ants living in
your world. You may demonstrate that you are well on the way to the development of an ant simulator without
actually completing the program for full credit.
IV. Implement the LISP-based GP system described Nilsson Chapter 4. Use your system to attempt to evolve a wall-
following and/or obstacle avoiding robot.
V. Write a general LISP program to test the Grid-World Robots of Chapters 2, 5 in Nilsson. Inputs include: (1) the size
of the grid, (2) the number and location of boundaries, (3) the sensory input and feature vector set and (4) the
production rule set used to simulate robot behavior. (a) Use your program to generate the robot motion for the wall-
following system on page 28, (b) The system on page 73, (c) Solve Problem 3 in Exam 1, (d) Specify and test a
production system to do obstacle avoidance with (1) a robot whose sensor set is {s1,s2,s3,s4,s5,s6,s7,s8}, (2) a robot
whose sensors are defective and can only sense {s1,s3,s5,s7}and (3) a robot whose sensors are defective and can only
sense {s2,s4,s6,s8} and (e) Repeat part (d) for a robot that does obstacle contouring.

Partial preview of the text

Download LISP Project Instructions for Artificial Intelligence Course - Prof. Amauri Antonio Arroyo and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

EEL-5840 LISP Project Fall 2008 Dr. Arroyo

LISP PROJECT

Instructions: Choose from I-V below. You may do ONE additional problem for extra credit.

I. Write a general LISP program to implement A* search, where both the heuristic function h(n) and the fixed cost

function g(n) (and therefore f(n) ) are specified by the user. (a) Test your program with the 8-puzzles used in classand with case (a) below; (b) Using a diferent heuristic function (e.g., Manhattan Distance) use your program to solve the case (b) puzzle below; (c) Use your program to solve the following 15-puzzle (if you do not like my test puzzles, test with at least 3 cases of your own volition). In class we used h ( n )= W ( n )=# tiles out of place and g ( n )= d ( n )=depth of each node.

Test Case (a) {Approx. 8 moves 11 nodes} {Approx. 10 moves 29 nodes}

INITIAL GOAL INITIAL GOAL

1 6 8  8 _ 4 1 6 _  8 _ 4

7 _ 5 7 6 5 7 5 8 7 6 5

Test Case (b) {Approx. 18 moves 206 nodes} Test Case (c) {Approx. 24 moves 6000 nodes}

INITIAL GOAL INITIAL GOAL

8 6 4  8 _ 4 5 6 3 4  5 6 7 8

7 _ 5 7 6 5 9 10 14 15 9 10 11 12

13 11 12 _ 13 14 15 _

II. Repeat problem I using IDA*

III. An "artificial ant" lives in a two dimensional grid world and is able to react to a pheromone trail that decays (each

individual trail left by an agent ant is one cell wide, but there can be multiple ants laying pheromone trails) with the following behaviors: (1) follow the food trail, (2) become agitated and start a circular-type motion (danger) and (3) attack (sting opponent). In addition the ant has a (1) build the nest behavior, (2) go out and do random wandering behavior and a (3) return home behavior. You may wish to add other behaviors or modify the ones I have given (without watering down the problem) to make the problem more realistic. Write a LISP-based simulator for the ant world and demonstrate and test your system with sufficient detail to see the effects of a small colony of ants living in your world. You may demonstrate that you are well on the way to the development of an ant simulator without actually completing the program for full credit.

IV. Implement the LISP-based GP system described Nilsson Chapter 4. Use your system to attempt to evolve a wall-

following and/or obstacle avoiding robot.

V. Write a general LISP program to test the Grid-World Robots of Chapters 2, 5 in Nilsson. Inputs include: (1) the size

of the grid, (2) the number and location of boundaries, (3) the sensory input and feature vector set and (4) the production rule set used to simulate robot behavior. (a) Use your program to generate the robot motion for the wall- following system on page 28, (b) The system on page 73, (c) Solve Problem 3 in Exam 1, (d) Specify and test a production system to do obstacle avoidance with (1) a robot whose sensor set is {s 1 ,s 2 ,s 3 ,s 4 ,s 5 ,s 6 ,s 7 ,s 8 }, (2) a robot whose sensors are defective and can only sense {s 1 ,s 3 ,s 5 ,s 7 }and (3) a robot whose sensors are defective and can only sense {s 2 ,s 4 ,s 6 ,s 8 } and (e) Repeat part (d) for a robot that does obstacle contouring.