Lab 3 2014

From 6.034 Wiki

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
__TOC__
__TOC__
-
This problem set is due Friday, October 15th at 11:59 PM. If you have questions about it, ask the list ''6.034tas@csail.mit.edu''.
+
This problem set is due Friday, October 15th at 11:59 PM. If you have questions about it, ask the list ''6034tas@csail.mit.edu''.
-
 
+
<!--
-
 
+
-
<!-- Commented out until release FT2010 -kp
+
To work on this problem set, you will need to get the code, much like you did for earlier problem sets.
To work on this problem set, you will need to get the code, much like you did for earlier problem sets.
Line 184: Line 182:
* <tt>get_all_next_moves(board)</tt> (<tt>basicplayer.py</tt>) -- Returns a generator of all moves that could be made on the current board
* <tt>get_all_next_moves(board)</tt> (<tt>basicplayer.py</tt>) -- Returns a generator of all moves that could be made on the current board
 +
* <tt>is_terminal(depth, board)</tt> (<tt>basicplayer.py</tt>) -- Returns true if either a depth of 0 is reached or the board is in the game over state.
* <tt>run_search_function(board, search_fn, eval_fn, timeout)</tt> -- (<tt>util.py</tt>) -- Runs the specified search function with iterative deepening, for the specified amount of time.  Described in more detail below.
* <tt>run_search_function(board, search_fn, eval_fn, timeout)</tt> -- (<tt>util.py</tt>) -- Runs the specified search function with iterative deepening, for the specified amount of time.  Described in more detail below.
* <tt>human_player</tt> (<tt>connectfour.py</tt>) -- A special player, that prompts the user for where to place its token.  See below for documentation on "players".
* <tt>human_player</tt> (<tt>connectfour.py</tt>) -- A special player, that prompts the user for where to place its token.  See below for documentation on "players".
Line 206: Line 205:
* <tt>depth</tt> -- The maximum depth of the search tree to scan.
* <tt>depth</tt> -- The maximum depth of the search tree to scan.
* <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:
 +
* <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>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>
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.
 +
 +
==== Creating a Player ====
==== Creating a Player ====
Line 311: Line 318:
When you're done, run the tester as usual to submit your code.
When you're done, run the tester as usual to submit your code.
-
 
+
-->
-
commented out until release FT2010 -kp -->
+

Revision as of 23:25, 4 October 2010


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

Personal tools