This is the Chuck Norris robot. Enough said.
My name is Adrian Mendoza. I am a computer science(Games) major from Santa Ana, California. I love movies, and I acknowledge Chuck Norris as a supreme power in this world.
Other Senser Tests
1. The song is the Super Mario Theme song. It is triggered by waiting 5 seconds after it draws a shuriken.
2. My robot draws a ninja star after it checks its battery sensors.
3. My robot acts like a cockaroach and runs away from a light behind it. When it hits an obstacle, it makes the death noise from Super Mario.
4. My robot runs from function to function and changes after waiting a set amount of seconds.
The Robot Games .
and I formed team "Wu Tang" to compete in the hopes of a gold medal.
1. Write a description of your robotís performance for the Opening Ceremony. What is your algorithm and sensors used for this event? Collectively, the class will spell out the letters ďUSCĒ. Our teamís robots will be a part of the ďUĒ. The algorithm we used was assigning each position along ďUĒ a number. Specifically, my robot is in the eighth position of the formation. To reach the position, the robot will be controlled via user input. Using WASD will move the robot, and F will stop it. This is activated through the light sensor. If the user presses Q, the robot will sing the Fight Song. This is to be done in unison with all of the other robots.
2. Write a description of your robotís Line Following behavior. What is your algorithm and sensors used for this event? The robot will use an infinite while loop to follow the line. The body of the while loop consists of an If, Else If, and Then statement. \ First the robot will check to see if its left sensor returns 0 for white if it does then it adjusts itself till itís line sensors report 1,1. It does the same for the right sensor. Then if itís sensors do return 1,1, then it just moves forward. Basically, the robot always tries to get itself back to itís line sensors being 1,1.
3. Write a description of your robotís Maze Solving ability. What is your algorithm and sensors used for this event? The robot will use an infinite for loop in order to solve the maze. It starts by moving forward. If it sees an obstacle through the obstacle sensor, it moves left. From there, it checks to see if there is another obstacle - if so, it will turn right by 180 degrees. This is because the robot assumes that there must be a rightward path, since the left is obstructed. From there, it will continue to move forward and repeat the logic.
4. Write a description of your robotís Fastest Drawer behavior. What is your algorithm and/or sensors used for this event? The robot will draw the triangles without going over any lines. I used three different forward amounts for each triangle. Since each triangle has a 120 degree turn radius,i used mots with number -1 and 1 for left and 1,-1 for right turns. Other than that I used the IR sensor in a if else statement to utilize this sensor.
5. Write a description of what is your algorithm for structuring your robot teamís behaviors. Upon running the program, the user is given a menu in the Terminal. The user can then press the numbers 1 - 4 in order to select an action. Each action is given its own function, so by pressing a number, the program calls the appropriate function.
Our Arrays Lab code makes it so that the robots can play 6 songs:
The Super Mario Theme
The Tetris Theme
The Pokemon Theme
He's a Pirate
The robot will also be able to draw various things such as a skull, a bike, a star, and alf
Here is the code: Array Lab Code
MARS Lab Report 1. Write a description of your search algorithm for finding aliens in pictures for MARS. My search algorithm searches the picture like a barcode until it hits a green pixel or the color of an alien in MARS 4. It then creates a 2d array of surrounding pixels and checks each pixel to see if it is red or green. If it is not, then it will change the color to red to make it a border pixel. If it is green, then it will recursively pass that pixel location to its own method so that it can check all the surrounding pixels and change those. This way, it changes the border pixels of the alien like recursively as if moving through it like an infection. 2. Write a description of your class Alien. What are its data members? What are its member functions? Alien has instance variables of size and location. Location is the farthest front y-location of the pixel and size is the farthest back pixel minus the farthest front pixel. It also has functions getLocation() and getSize() to return their respective instance variables. 3. Describe your process for developing your object recognition algorithm? I first came up with the ďinfectionĒ idea but was not sure how to implement it. It was then that I learned about other uses for recursion and I began to apply that. If I surrounded my object with a distinct color then it would be easier to identify an object. 4. Which picture did you start testing your algorithm with first? Why did you choose to start with that picture? I started testing it with MARS 4 just to see if it was up to snuff from the beginning. 5. Write a description of your sorting algorithm for the aliens by size? I used an insertion sort to sort the Aliens by size. Since the pictureís pixels increased as you moved down, the max and min values were swapped somewhat. 6. Write a description of your sorting algorithm for the aliens by closeness to the rover? The sorting algorithm I used for closeness was the same that I used for size. 7. What is the Big O of your sorting algorithms? The Big O is n^2. Final Project Pre-Lab 1. We were trying to demonstrate how CS can be used to program something fun for the kids such as video games. In it we used and described many things such as for loops. 2. The program constantly asks the user for input. Since it is Blackjack the program asks the user for name and whether they want to hit or not. 3. My human-computer interface involves the players having to use the robots light sensors in order to hit in the game. 4. I will use the light sensors to evaluate the human-computer interaction. 5. The time that it takes for the user to shine the light on the robot while it is spinning is recorded and is given out to the players to tell them who is the fastest. 6. The program will store it in a text file and then relay it out to the players. 7. The times will be taken down and compared to see who is the fastest. The fastest person will get the card that they need to get Blackjack.