Software Design Final Project
Our end product was a working Othello AI that, to some extent, mimicked a move made by a human player. This game also had a graphical visualization, although the user had to make moves through a command-line interface. The player can also input whether he/she wants the computer to play against a human, for a human to play against a human, or even a computer to play against a computer, as well as the depth of the recursive function for each computer. By putting together this algorithm in a functional fashion, we achieved our minimum deliverable. We went beyond our minimum deliverable by adding the visualization. However, our maximum deliverable was to have a graphical user interface, where user input is through the visualization instead of the command line. We also were not able to program different types of artificial intelligences, such as using Monte Carlo Tree Search, Neural Networks, and regressions on the weights of each board position, each of which would have been spearheaded by a member of our team.
The labor, while divided evenly, was not very efficient. Each of the team members contributed a significant amount of time to the project, however, much of the code was written while pair-programming. Two of our group members worked on restructuring the code we found online as well as implementing a GUI, but only one person was programming at a time. Rather than splitting up the work between themselves to work efficiently, they worked on the same piece of code at the same time. Though inefficient, they ended up learning a lot about what the program was doing and debugging was very efficient. Also, they both learned how to work with Pygame better. However, this ended up slowing us down in finishing the project.
Goal wise, one of the best decisions we made was simplifying our original goal of making an AI for the Chinese game, Go to making an AI for a simpler game, Othello. Making this simplification allowed us to focus more on the complexity of different algorithms than the complexity of the game. Another positive decision we made was implementing pseudo code rather than attempting to program dense concepts found in research papers. Next time, we would first restructure the code we found online before adding any of our own. Integration of our code would be much easier and we could have been more efficient, not wasting several minutes each day to reunderstand the original code. The time saved could have been devoted to completing a GUI.
As we developed our software, the most difficult bug we encountered was in the recursive tree that our minimax function generated. When we first made our Othello AI, the one-ply computer would always beat the three-ply computer, but this should never happen in any case. We knew that something was wrong in the way that the program picked the next move, but we weren’t sure why. So in order to track down the bug, we made the recursive function print out the heuristic of each node that it analyzes to see if the numbers are propagating up the tree properly. As it turned out, the error was in our ‘if’ statements, which we kept tuning to make sure that alpha-beta pruning was working as intended. By continuing looking at the heuristics of each node and by having the one-ply and three-ply AI’s playing against each other, we were able to track down the problem and have the AI working properly. Initially, we tried to just change the function blindly, until the three-ply computer beat the one-ply computer. It took a long time for us to realize that this wasn’t the ideal solution, and we could have made this realization sooner to save a lot of time.