; Jane Student ; CSCI 4150 Intro. to AI, Fall 2002 ; Assignment 4, Problems 4 & 5 ; (load "a4code") (load "connect4") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Problem 4 ; ; Here's a possible "create-c4-player" procedure. Note that this is a ; procedure that returns a procedure created by a lambda form. ; ; Remember that your "create-c4-player" must be able to run with any ; evaluation function --- it cannot be specialized for only your ; evaluation function. ; ; This procedure is only a suggestion. It assumes that the ab-minimax ; function takes the four arguments as I've given them here and that ; it returns the best move. You may want to do this differently when ; you implement the alpha-beta minimax search, but if not, you can ; just use the procedure below. ; (define (create-c4-player eval-fn depth-cutoff) ; the "player procedure" returned must take the following arguments: (lambda (board player-symbol) (ab-minimax board player-symbol eval-fn depth-cutoff))) ; IMPORTANT!!! ; ; In your alpha-beta minimax, you must evaluate the children in the ; order that they are given to you by c4-children. Otherwise your code ; will not test properly on the web tester. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Problem 5 ; ;(define (c4-eval board current-player max-player)