Please note that all the source code provided contains this advisory: // Example code for CS 361. Copyright 2013 by Tom Hayes. // Important note: This file contains working code for implementing // retrograde analysis for general games. It is provided for informational // purposes only. You may play around with it and study it to help // yourself learn what needs to be done. However, you may not copy // any part of the source code to turn in for assignment 5. I haven't used packages, so to compile, just put all the .java files in the same directory, and run "javac *.java" java GameGraph to demonstrate the code working. Additional Notes: (1) For tic-tac-toe, if you don't eliminate duplicate positions when expanding your starting position, you will end up with about 255,000 nodes in your game graph (a tree). By identifying and eliminating duplicates, you end with about 5000, and a DAG rather than a tree. If you modify the hashCode and equals methods to combine all possible rotations and reflections of a game position into a single one, you should end up with about 950 positions. The case is very similar, and even more dramatic, with sprouts. You will get big savings in both time and memory use if you can eliminate duplicate positions. (2) I apologize for the coding sins committed in this Java code. In particular, there is an egregious lack of documentation. It is really only intended to demonstrate: - some algorithmic ideas, and - how the retrograde analysis code can be separated cleanly from the code for the specific game to be analyzed. Please email hayes@cs.unm.edu if you have any questions or comments.