diff --git a/submissions/McLean/project b/submissions/McLean/project new file mode 100644 index 000000000..e1cd20dc4 --- /dev/null +++ b/submissions/McLean/project @@ -0,0 +1,22 @@ +AI Teeko Agent using Alpha-Beta Pruning +Kyle McLean, Noah Karman, Will Hess +Belmont University +Abstract +Teeko is a two player abstract strategy game, invented in 1937 by John Scarne. It’s board is a 5 x 5 checker board, and each player has 4 pieces at their disposal. The game has two different win-conditions; to get either 4 pieces in a diagonal, vertical, or horizontal row or to arrange the player’s four pieces into a square. What makes Teeko unique is that the game has two distinct phases, one that resembles tic-tac-toe, and another that resembles checkers. The players take turns placing pieces. Once all pieces are on the board, the players then take turns moving one piece into an adjacent square on the board, until one player has either arranged his pieces into a row of 4, or into a square. + For this project we will use an alpha-beta pruning search algorithm to generate the next best move for the ai player. We will test the ai by setting up close to win scenarios in which the ai should pick the best next move. We will also compare alpha-beta to other search algorithms to justify why alpha-beta is the best technique for this particular game environment. + +Introduction +Teeko is an innovative two player board game that combines elements of tic-tac-toe with checkers. Teeko was created by John Scarne in 1937 and was considered to be the “first skill game invented in 6,000 years, that equals, if not surpasses, checkers or chess in strategy” (Scarne, 1955). The game is played on a 5 x 5 checker board uses 8 game pieces (4 for each player). The objective of the game is for the player to place or arrange his game pieces to where all four game pieces are vertically or diagonally in a row or arranged into a square on the board. +Teeko has two distinct phases for arranging game pieces on the boar. In the first phases players take turns one at a time placing their game pieces onto the board similar to tic-tac-toe. If a player arranges his game pieces into one of the 4-in-a-row shape the game is over and the player wins. If both players have failed to place their game pieces into a wining arrangement and all 8 game pieces are on the board the game continues into phases two. In the second phase players move their game pieces around the board in order to achieve the same winning arrangements. Players can mover their game pieces in 6 directions; up, down, left, right, diagonally up to the right, diagonally up to the left, diagonally down to the right, or diagonally down to the left. If an opponent’s game piece is positioned in a spot that is blocking one of these direction, the player cannot move his game piece in this direction. There also exist a rule where if a player locks an opponent’s game piece in a corner or blocks the player in the player can evoke a ten move limit in which the player must move one of his game pieces that is blocking his opponent’s game piece from moving at least once with in ten turns. There is also a rule to prevent a dull game where a player stalls the game by moving a piece back and forth from the same position. In this situation a player can invoke a four move limit in which at least one of his next four moves must be a piece other than the one the player keeps moving. +Research on Teeko AI agents +There are a total of 44 possible winning positions in the game; 10 vertical positions, 10 horizontal positions, 8 diagonal positions, and 16 square positions (Scarne, 1955). There is also 75,710, 250 different ways to arrange the eight pieces on the 5x5 board (Steele, 1998). In 1955 the creator of the game John Scarne wrote a book titled Scarne on Teeko in which he list 17 winning plays for positioning and moving piece as well as 50 possible problems and solution for distinct game situations (Steele, 1998). In 1998 Teeko was solved in which the outcome of any postion can predict the chance of winning by Guy Steele at Sun Microsystems Laboratories by running a computer to enumerate all positions (Steele, 1998). The calculation of solving Teeko took his 300 MHz ultraSPARC processor server computer 32 hours and 15 minutes to complete (Steele, 1998). He discovered that in a standard game of Teeko if the first player placed his game piece in the center the game would usually end in a draw (Steele, 1998) Steele also found that when the ten-limit rule is invoked on a player the player can still maintain the draw while satisfying the limit rule. Using a modified version of Teeko named Advance Teeko in which there are 58 possible winning condition instead of the original 44 Steele found that the game is a first player win game. +Programmers Mihailo Despotovic and Vladimir Srdanovic created a Java applet tool named TeekoTeacher that teachers humans how to improve their skills by simulating mid-game scenarios using a database of moves created by an application called TeekoPlayer (Despotovic & Srdanovic, 2001). TeekoPlayer is a C program that uses a learning algorithm to improve the computer agents move skills by playing and recording several games against its self and then from these learning algorithm creates a sorting tree for possible moves(Despotovic & Srdanovic, 2001). These programmers were interested in improving on this model and inserted in the search vs knowledge debate in artificial intelligence. Their TeekoTeacher applet was created with three main parts a heuristic module, searching module, and learning model (Despotovic & Srdanovic, 2001). The heuristics used were make four in a row, make a threating three in a row move, and block opponent’s pieces. They used a searching module that used a one to two move look-ached minimax algorithm. The learning module uses possible moves based on reinforcement learning by simulating different games for the agent before the program is fully playable (Despotovic & Srdanovic, 2001). +Alpha-Beta pruning vs minmax agent in Teeko +Based upon this previous research our goal was to improve the search algorithm by switching from minimax to alpha-beta pruning algorithm used in the search module of Despotovic & Srdanovic work while also translating the game into a python environment. For our program, we used an alpha-beta pruning algorithm provide by Artificial Intelligence A modern Approach on GitHub. In an alpha-beta pruning algorithm a search tree is constructed as player place and move piece of possible moves similar to the minmax algorithm but instead of calculating all moves in the tree the search algorithm eliminates moves that would not improve the score of position of the player (Russell & Norvig, 1995). In our program the player was able to set how deep into the tree the opponent AI agent was allowed to search the tree. From our program we were able to evaluate possible moves much more quickly than in the TeekoTeacher java applet. + +Bibliography +Despotovic, Milhailo & Srdanovic, Vladimir. (2001). TeekoTeacher: A Tool for Learning Good Teeko Strategies. University of Belgrade. +Russell, S. J., & Norvig, P. (1995). Artificial intelligence: A modern approach (3rd ed.). Englewood Cliffs, NJ: Prentice Hall. +Scarne, J. (1955). Scarne on Teeko. New York: Crown. +Steele, Guy. (2001). Teeko: Solving A Game. Sun Microsystems Labs +