; This file shows how you can use the procedures in "ab-test" to test ; your alpha-beta minimax by running it on the game tree from A4p1 and ; comparing the answer ; ; ; (load "ab-minimax") ; this loads a4code and connect4 ; [output deleted] ; now load the special "c4-eval" and other procedures (load "c4kludge") ; assign the player procedure to the variable "p" ; ; if you change your "create-c4-player" procedure, then you MUST ; REDEFINE "p" ; (define p (create-c4-player c4-eval 4)) ;Value: p ; now run the player procedure which will run ab-minimax on the A4p1 ; game tree ; (p c4-start 'x) ;Value: 1 ; it returns 1 which corresponds to the move for the leftmost child of ; the root node ; ; you can check which states were evaluated by looking at the variable ; "states-evaluated". Before running another test, you should: ; ; (set! states-evaluated '()) ; ; or else the states from your next run will be appended to the end. ; ; You can verify from the solutions (posted on webct) that these are ; the correct states to evaluate when evaluating the children from ; left to right. ; states-evaluated ;Value: (2 20 -13 21 -1 11 -26 13 22 -10 -8 3 -30 6 24 19 10 -15 -6)