![]() |
Assignment 3 Due 5:00 PM, Tuesday, Oct. 16th Department of Computer Science | ![]() |
Extra Credit Problem 1: This problem is related to Assignment 3 on A* search. Let's say that it
is harder for the robot to move diagonally than it is for it to move
N, S, E, or W. Modify this search problem to reflect this and solve
the problem again. Type some comments about the resulting search
paths and how they are different than the ones you get from the
original robot-path code.
Extra Credit Problem 2: This one is also related to Assignment 3. Write a lisp function that prints the robot's world, including the outer walls, barriers, start and goal states and the solution path, using characters as shown below:
CL-USER(57): (setf barriers (append
(loop for y from 2 to 12 collect (list 10 y))
(loop for x from 10 downto 5 collect (list x 12))))
((10 2) (10 3) (10 4) (10 5) (10 6) (10 7) (10 8) (10 9) (10 10) (10 11)
(10 12) (10 12) (9 12) (8 12) (7 12) (6 12) (5 12))
CL-USER(58): (show-maze '(1 1) '(20 20) 20 barriers
(robot-path 20 barriers '(1 1) '(20 20)
#'(lambda (n) (dist '(20 20) (node-state n))) t))
######################
# G#
# . #
# . #
# . #
# . #
# . #
# . #
# ......... #
# .###### #
# . # #
# . # #
# . # #
# . # #
# . # #
# . # #
# . # #
# . # #
# . # #
# . # #
#S #
######################
NIL
Now I did it again with higher diagonal action costs being twice the cost of non-diagonal costs:
###################### # G# # . # # . # # . # # . # # . # # . # # . # # ###### . # # #. # # #. # # #. # # #. # # #. # # #. # # #. # # #. # # #. # # #. # #S......... # ######################
Extra Credit Problem 3: This is not related to any required assignments. Choose or invent a two-player game, represent it in lisp in a way that is similar to how we implemented tic-tac-toe in class. Here is a link to our tic-tac-toe code. Include players that follow the prompt-from-human strategy and a random valid move strategy. In your lisp file, include comments explaining your representation of the game's state and the successor function. Also explain how to start your game.
You must try very hard to resist the urge to develop a complex game. Certainly do not try a full chess game! You can try a much-simplified form of chess. For example, invent a game that is played on a 4x4 board and involves two rooks and a king on each side.
Extra Credit Problem 4: If you have finished Problem 3 above, you may attempt this one. Add the alpha-beta strategy to your game. Use a simple evaluation function that returns zero for non-terminal states, and returns the value of your game's utility function for terminal states.
Extra Credit Problem 5: Add to your code from Problem 4 by designing at least two non-constant evaluation functions for your game. Characterize the performance of minimax search with alpha-beta pruning based on your two evaluation functions. You can do this by using two players, both using the alpha-beta strategy but with different evaluation functions. Also compare with the simple evaluation function that is zero for all non-terminal states.
More may be added here in the future.