; CSCI 4150 Intro. to AI, Fall 2005 ; Assignment 4, create-c4-player (Problem 2) and c4-eval (Problems 3 and 6) ; (load "a4code") ; don't change these lines! (load "connect4") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Problem 2 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; 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) (let ((m (get-opening-db-move board))) (if m ; if there was a move specified in the opening database ; then return it m ; otherwise, call alpha-beta minimax (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. ;