Lab 3 2014

From 6.034 Wiki

(Difference between revisions)
Jump to: navigation, search
Line 206: Line 206:
* <tt>eval_fn</tt> -- The "evaluate" function to use to evaluate board positions
* <tt>eval_fn</tt> -- The "evaluate" function to use to evaluate board positions
-
And optionally take two functions:
+
And optionally it takes two more function arguments:
-
* <tt>get_next_moves_fn</tt> -- Which given a board/state, returns the successor board/states.  By default get_next_moves_fn takes on the value of <tt>basicplayer. get_all_next_moves</tt>
+
* <tt>get_next_moves_fn</tt> -- a function that given a board/state, returns the successor board/states.  By default get_next_moves_fn takes on the value of <tt>basicplayer. get_all_next_moves</tt>
-
* <tt>is_terminal_fn</tt> -- Which given a depth and board/state, returns True or False.  True if the board/state is a terminal node, and that static evaluation should take place.  By default <tt>is_terminal_fn</tt> takes on the value of <tt>basicplayer.is_terminal</tt>
+
* <tt>is_terminal_fn</tt> -- a function that given a depth and board/state, returns True or False.  True if the board/state is a terminal node, and that static evaluation should take place.  By default <tt>is_terminal_fn</tt> takes on the value of <tt>basicplayer.is_terminal</tt>
 +
You should use these functions in your implementation to find next board/states and check termination conditions.
The search should return the ''column number'' that you want to add a token to.  If you are experiencing massive tester errors, make sure that you're returning the column number and not the entire board!
The search should return the ''column number'' that you want to add a token to.  If you are experiencing massive tester errors, make sure that you're returning the column number and not the entire board!
-
TIP: We've added <tt>tree_searcher.py</tt> which contains code that tests your alpha beta implementation on a game tree of the kind that we've been working through by-hand in class. You should run <tt>python tree_searcher.py</tt> to see whether your alpha-beta implementation is working correctly before running the full game tests.
+
TIP: We've added a filed called <tt>tree_searcher.py</tt> to help you debug problems with your alpha_beta_search implementation.  It containing tests of alpha-beta-search on static game trees of the kind that you can work out by hand (as done in class).   To debug your alpha-beta-search, you should first run: <tt>python tree_searcher.py</tt>; and visually check the output to see if your code return the right next moves on simple game trees.    Only after you've passed tree_searcher then should you go on and run the full tester.
-
 
+
-
 
+
==== Creating a Player ====
==== Creating a Player ====

Revision as of 01:58, 6 October 2010


This problem set is due Friday, October 22th at 11:59 PM. If you have questions about it, ask the list 6034tas@csail.mit.edu.

Personal tools