This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy.ndimage import convolve | |
import matplotlib.pyplot as plt | |
import matplotlib | |
import copy | |
# Setup | |
BOARD_WIDTH = 10 | |
BOARD_HEIGHT = 10 | |
BOARD = np.zeros((BOARD_HEIGHT, BOARD_WIDTH)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IDEAS FOR COMPUTERIZED OPPONENT: | |
# [] Add prompt for 1 Player or 2 Player at start of game | |
# [] Based on number of players, override player selection with random computer selection | |
# [] Once random selection is working, add more intelligent computer selection (some ideas): | |
# * If computer could win game, it should win game | |
# * If computer can put board in state where next move it could win game, it should do that move | |
# * If computer can put board in state where next move it could win game REGARDLESS of human selection, do that move | |
# * Apply deep learning on millions of games of tic tac toe to become the ultimate RecurseTacToe algorithm (just kidding :D) |
NewerOlder