1. Our strategy is to divide the room into four quadrants and have each robot explore and map one quadrant. This will allow us to best understand and navigate
the room. The sensors are output but I do not use any other sensors to explore the area because they are too unrealiable to help exploration.
2. To navigate through the area I have a while loop that allows me to choose which direction to move or turn. It also allows me to input the time for how long
the robot will move or turn. I don't use any sesnsors in this sub problem.
3. To locate lost robots I will use the camera sensor. I take a picture and then store it an array. I can later then go through and then use x-y coordinates to
add a box around any found scribbler.
4. We will look at the photos that we have found and combine them to form an overall impression of the room. The quadrant system used to split up exploration
will allow us to easily map the area.
1)I search the picture and then change the color of the first found alien. I then use recursion to research the picture, and the first alien will be ignored because
its color will no longer be within the color range I am searching for.
2)My alien class will hold all the information about each alien, such as its size and location. I hold the area in pixels and use a struct to hold the cooridinates of
the alien. I also have functions for bounding the area with a frame and getting the area.
3)My algorithm had to do mainly with the recursion. This allows me to continue to search the picture after I find one alien, and to guarantee that I find all possible aliens.
4)I started with the Mars 2 photo because this is the first photo with multiple aliens. I used this picture because I needed multiple aliens to test my recursive methods
5)I used selection sort to sort my data. I compare the areas using the getArea function and sort from the largest to the smallest.
6)I used selection sort to sort by location as well. I use the lower right boundary to compare the different aliens and find which one is closest to the bottom of the picture.
7)The big O is n^2 because of the selection sort.
Final Project PreLab
1)The computer Science topic that I am trying to teach and demonstrate is the basic concept of what is a variable. I want to show how a user can input a number that will be stored
throughout the entire program. This should help to explain not only what a variable is, but why they are so useful.
2)The program that I have developed to do this takes a number as user input from one participant and then asks a second one to guess numbers until they guess the correct number.
The program outputs whether the guess was too high or too low to help the player in guiding their next guess.
3)My computer human interface is through the keyboard and the game that the participants will play. The game is designed to be competitive to see if you can guess a number in attempts
then your friends so I hope this will make the short demo fun as well as informative for the players.
4)I evaluate the interface by sending how many guesses it takes for a player to guess correctly to an output text file. It stores the player number as well as their number of guesses.
5)I further evaluate this by finding the average number of guesses for all players which will show us approximately how long the player stayed engaged with my demo.
6)The program collects user interaction information using iteration and vectors. A counter adds up all of single player’s attempts and then adds their total number of attempts on to the end of a vector that stores all of the various player data.
7)I generate the file report using some fstream and file I/O code that allows me to output to an external text file. I will then iterate through the vector and output the players, their guess totals, and the average. I will be using the unique vector function to get the size of the vector.