Project 2: Connect Four: Part C Details

For your simulations in Part C, when you run the full Connect Four game (rows=6, cols=7), the number of times the computer wins will be highly dependent on your heuristic and how deep the minimax/alpha-beta search looks. When I use d=1, the computer still wins at least 94 games out of 100. Remember, the computer is playing against a player that picks randomly, so the computer, even with a one-move-lookahead, is much better than random.

When d=2, my algorithm wins at least 98 times out of 100 the vast majority of the time.

When d=5, my algorithm (and yours too!) should essentially never lose.

My heuristic in Parts B and C is 10 points for each 3-in-a-row found in the game board, and 3 points for each 2-in-a-row. Points are positive for MAX and negative for MIN. A win for MAX is +100000 and a win for MIN is -100000. Note that this heuristic doesn't even look for open spaces on the ends of the 3-in-a-rows or 2-in-a-rows, so it will make dumb moves every so often. But playing against a random player still lets it win most of the time.