AiS Challenge Team Interim


Team Number: 037

School Name: Highland High School

Area of Science: Computer Science and Mathematics

Project Title: Rules of Engagement



Problem Definition:

Our objective to design a C++ program to model the interaction of the two opposing armies. The end result would be a working graphical interpretation of the interaction of the individual characters. We will begin working on a small number of basic characters and program them to react to each other when they get within a certain radius. We will then start adding more characters and with more detail. To be able to complete our objective we will begin by researching game programming, graphical appearance and rules of engagement derived from aspects of game theory.



For the background, we will use an array of 100 by 100. Each square will represent either a character accessible square or an object square, like a tree or water. Each square will be color-coded: water blue, trees green and character accessible ground brown. The characters will be programmed to only be able to walk upon squares that are brown. Trees and water will not be accessible areas.


We are using logic based on the game Dungeons and Dragons to figure out how our characters are going to react to each other. We will set a radius of ‘sight’ around the characters and when another character comes within that distance the character will see it and examine if the character is a friend or foe. If it is an enemy character then a randomizing attack program is activated. This program first chooses a number for each character between 1 and 20. If the number is 13 <= then the player can attack, if the number is 13 > then they can’t.

If only one player is able to attack, then the opposite player becomes the defender and is given another random number. If the second number is greater than the attacking players’ number, the attack is blocked. If both characters are able to attack with the first random number, then the player with the higher number is the attacker and the other is the defender. The defender is given another random number and defends the same way as in the first case.

If both characters are given the same random number, then the program is run again and a new number is chosen for each.

This system continues until one of the players hits the other three times.


As our project progresses, we will add different attributes to the characters on each side. One army will have more strength and life points, and the other will have greater speed and agility. By examining the outcome of the battle, we can determine which attributes produce the best characters.


Our program will be created using C++. So far, we have a small sample program that produces a 25 by 15 background array. We also have a random number generator program. These programs can be adapted and expanded for our final program. No one on our team is experienced in programming so we are still doing a lot of research in game theory and learning how to program graphics.


Bradford, Rex E. (1995) Real-Time Animation Toolkit in C++, John Wiley and Sons, Inc. USA

Knowlton, Todd (1997) Programming in C++, South-Western Educational Publishing. Cincinnati, Ohio.

Team Members

Team Mail

Teacher Sponsor(s)

Project Mentor(s)