Meet The Chuck Norris Robot

HTML Dog logo

Updates

Dec 11 - Final Project!

Prelab:

1. I will demonstrate how different algorithms lead to different speeds while solving the same problem. By reversing the keyboard layout while the students try to solve a maze, we will show that certain input schemes are better than others. Because the maze driving algorithm will be differnt during the reversed trial, students will understand the different speeds of different algorithms.

2. The program will ask users to drive through a maze using the keyboard. They will complete the task twice, once with a normal keyboard layout and once with a reversed layout.

3. The interface will first ask the user to input their name, which is stored in a kid object. Then they will be guided through the steps to drive the robot. The demo function will call a maze session twice, once for each layout. After the user has finished the maze, he will indicate that he has done so by pushing a specified key.

4. Each maze attempt will be timed and the difference between reversed-layout attempts and normal-layout attempts will be tabulated. The mean and standard deviation of the time differeces will be calculated and written into an evaluation report.

5. By showing a difference in speed - which is a measure of ease-of-use - we will show that certain user interactions are harder than others. This will be summed up in the report file that will automatically be generated at the end of the trials.

6. As soon as the first maze is begun, the current time will be recorded. When the user has indicated that the maze is solved, the time will again be recorded. The difference in the two times will be recorded as Maze 1 time. A similar calculation will be performed for the reversed Maze 2. The difference will be found using a simple built-in kid method written into the kid class.

7. After all the trials are complete, the program will open the data file and will read all of the data into an array. After that, it will perform a few simple calculations, such as mean and standard deviation, and then will write a report file with these statistics and will include the data. It will also include a short conclusion on both user interfaces.

Dec 5 - Homework 4!

Prelab:

1. The search is very simple; it only involves checking RGB values to see if they fall in a specific range. If the pixel seems to be background color, it is marked with a 0. If the pixel falls into one of the three alien body color ranges, it is marked with a 1, 2 or 3. The pixel markers are stored in a 2-D array the size of the image.

2. My class alien stores the important important information about each alien. It stores location with an x and y data member. It stores size in terms of absolute number of pixels occupied, as well as maximum and minimum acceptable RGB ranges. It’s member functions involve setting and getting the data members, size and x and y. These functions allow the user to view and edit the private data correctly.

3. I wouldn’t call it object recognition. In any case, what the algorithm essentially aims to do is to find the sizes of connected pieces of pixels of the same type. Each pixel is marked as background or one the three alien color types, and so the algorithm recursively checks a pixel’s value, if it is the same as the original type, it adds one to the size variable and then calls the checking function (all inside the checking function) on all the neighbors. In this way, the searched region branches out to the whole alien, only continuing the check pixels that are the right type. After all the checks show that the available neighbor pixels are all of a different type, it stops and returns the size of the alien.

4. I used MARS4 because it included a variety of alien colors and sizes. It would give me an opportunity to try the algorithm on all the possible colors and sizes I would see.

5. I basically used selection sort, always picking out the maximum of the remaining items, and putting it at the front. This sorts the list biggest to smallest.

6. I sorted them according to decreasing x coordinate. The algorithm was the same as the sorting algorithm for size, comparisons were just done with the x attribute rather than size attribute.

7. Selection sort has a big O of n^2, where n is the number of items to be sorted. This can be seen by noting that it takes O(n) comparisons to find the maximum item, which has to be done n times to mind the maximum n times. Doing a task of size O(n) n times takes O(n^2) time.

Nov 11 - Homework 3!

Prelab:

1. We will spread out and cover as much ground as possible, pausing after each move to take a picture and asses the surrounding situation. We will primarily be using the camera, but we will also use the other sensors at the beginning to check the robot’s environment for safety. The robot’s algorithm will consist of a while loop that continually asks for the next behavior. We will tell it to either move, take a picture, or end mission.

2. The robot will be told to move in small increments, after each of which it will take a picture, in the hopes of showing a robot and also to inform the driver of the surroundings. This will involve using the above mentioned while loop to input behavior.

3. The sensor used will be the camera. A picture will be taken, and then a human labeller will use pre-written code to draw a box around the scribbler for ease of identification. The program will color rows and columns of pixels green in such an order that it will produce a box shape surrounding the scribbler.

4. Using the data from the slideshow, we will piece together the map of the room, incorporating all the available information for a particular picture before moving on the the next. We will integrate different picture data with our recorded movement commands to increase confidence and accuracy.

Here are my teammates' websties:

Eamon

Anjali

Greg

Oct 4 - Homework 2!

Prelab:

1. The code for the robot Opening Ceremony was created by group member Eamon. It begins with a void function for the fight on song. The tempo is a flexible number that can be manipulated in the terminal. The fight song uses robot.beep(second,hertz). The user is allowed to input a character and a double for the movement of the robot. WASD are the keys for movement and any number following that signifies the duration of that movement in seconds. “cin” is used to allow the user to input characters and doubles and a series of “if” statements using “robot.turnRight/left” and “robot.forward/backward” for the movement.

2. The line following behavior will use a loop and several if statements. Depending on the readings of the line sensors, the robot will execute one of several behaviors. If the line sensor indicates that the robot is on the line, it will continue forward. If one side is off the line, it will turn in the opposite direction so as to bring the robot back on the line. If the robot is completely off the line, it will retrace its steps until it is back on the line.

3. The maze solving portion of the performance uses only the obstacle sensor. The robot will continue forward until the obstacle sensor reports an obstacle in the front. When this happens, the robot will turn 90 degrees to the left and take another obstacle reading. If this reading indicates that there is still an obstacle in front of the robot, it will then turn 180 degrees, or what would have been a right turn from the first obstacle sighting. Then, because we’ve been told that the mazes will only include 90 degree left and right turns, the robot will find a clear path either to the right or left, and continue forward in that direction. This continues until the robot has found its way through the maze. The maze traversal could be made considerably faster if one could take advantage of the left and right obstacle sensors, choosing the clear direction first, but unfortunately, the sensors do not provide valuable information (they are not really left and right sensitive, as one might expect them to be). Therefore, the simple rule of always turning left first has been used.

4. Anjali did the “Fastest drawing” part of the robot Olympics. To do this, she created 2 functions, T and R, standing for travel and rotation. These functions were created by measuring the number of inches traveled in one second and the number of degrees rotated in one second. It then compiled this information into an equation that allowed to enter parameters for inches and degrees, incorporating the robot.forward commands and the robot.turnRight commands. The robot can draw the sierpinski triangles without overlapping any lines and without having a user pick up a pen out of the robot at any time. The entire function was then placed in a new function called “Draw,” which can be triggered by user input. This part of the program does not start unless the battery level is above 6.0, thus incorporating an if/else loop.

5. The performance will be structured with a main menu allowing the user to decide on a behavior by entering a certain number. This will be accomplished by using a while loop that constantly takes input, and using if statements, executes the correct behavior. There will also be an option to stop performance and disconnect from the robot.

Here are my teammates' websties:

Eamon

Anjali

Greg

Performance code

Sept 27 - Insect-like bahaviors

Today I worked with Greg, Anjali, and Eamon to create different behaviors in our robots. I worked on the indecisive bahavior, which I created by setting a light sensor threshold, reversing the direction of the robot's movement whenever the threshold was reached.

Here's a link to my code:

Indecisive/Vecicle Behaviors Code

Sept 20 - Here's the code I used in my robot talent show!

Talent Code

Sept 20 - Here's the Fibonacci spiral that my awesome group and I drew! Roflmao!

My group consisted of Eamon, Greg and Anjali!

HTML Dog logo

Sept 7 - Here's the data from our robots' sensors:

Here's mine

HTML Dog logo

Here's Daria's

HTML Dog logo

Here's Joey's

HTML Dog logo

And here's Paige's

HTML Dog logo

About Chuck

Here are a few facts to help aquaint you with Chuck:

About Gabe

Here are a few facts to help aquaint you with Chuck's best boi, Gabe Mel:

Further Reading

If you'd like to learn more about The Chuck Norris Robot's human counterpart, please visit the following biographical website: Chuck Norris Facts

Here are a few facts that can be found at the above website:

Valid XHTML 1.0 Transitional!Valid CSS!

The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees