Wednesday, August 29, 2007

Code Ruler Results

I constructed this code alone. I attempted to implement a ruler that would divide his knights into groups and attack the enemy in groups. My peasants would wonder around and claim the nearest land that did not belong to me. This was my basic approach to implementing a ruler. Below is a link to my implementation:

CodeRuler Implementation


Test Results:


My Ruler vs. Migrate Ruler
1: 934 - 0 W
2: 958 - 0 W
3: 936 - 0 W
My Ruler vs. Gang Up Ruler
1: 812 - 98 W
2: 641 - 526 W
3: 36 - 600 L
My Ruler vs. Split Up Ruler
1: 157 - 635 L
2: 356 - 485 L
3: 86 - 627 L

My strategy worked well against rulers that did not have an overly sophisticated strategy. Gang Up Ruler and Migrate Ruler are relatively simpler rulers. Gang Up Ruler groups his knights into one large group and travels around the grid. Migrate Ruler simply groups his peasants and knights and moves around the grid. These two rulers do not have a terribly sophisticated implementation and thus, I was able to defeat them (5-1 against them). Split Up Ruler, however, has a more sophisticated implementation in terms of capturing opponents. When my knights and his knights went into head-to-head combat, Split Up Ruler's knights always won. Since he always defeated my knights, I was defeated relatively easily (0-3).

The lessons that I learned from this assignment were getting more familiar with Eclipse, JavaDoc, and the new Java 5 features. I still need to figure out how to fully utilize JavaDoc, as I was unable to generate comments for my fields in my HTML file.

No comments: