Methodologies for Analyzing Algorithms Essay Example
Methodologies for Analyzing Algorithms Essay Example

Methodologies for Analyzing Algorithms Essay Example

Available Only on StudyHippo
  • Pages: 5 (1370 words)
  • Published: November 1, 2017
  • Type: Research Paper
View Entire Sample
Text preview

Now you have new games like Gears of War 3 that is so graphically intense that there is plenty of coding involved. But Just basic programming isn't enough for these video games, you need algorithms. The more advanced the video game is, the more advanced the algorithm is as well. Algorithm in video games was not created recently. In fact, it has been placed in video games for a long time.

In the following essay, I will discuss the methodologies or analyzing algorithms. I will also discuss the game that I chose, the original Pace- man. Then I will explain what algorithms were used in the game Pace-man. Finally, I will use Big-O notation to predict the effectiveness of each of the three algorithms that I have selected, and then I will discuss the impact, to the quality o

...

f the game, if these algorithms are not used. Knowing the methodologies for analyzing algorithms is very important. When you look at an algorithm, there are certain things you need to know. First there are two main ways that we can analyze algorithms.

The two ways are experimentally and analytically. When analyzing algorithms experimentally, we must run our algorithm many times with different sized inputs, tracking the running time for each different sized input. (The goal is to repeat each of these many times to get average values for run-times. ) Once we have a graph of run-time versus input size, we would like to find a function (within a constant factor) that best fits the given data. This can be done by analyzing the fraction t(n)/f(n), where t(n) is the experimental run time, and f(n

View entire sample
Join StudyHippo to see entire essay

is a function you are testing to see if it is the actual runtime.

In order to analyze algorithms analytically you must look at the steps of the algorithm and determine how many "simple instructions" an algorithm will execute in terms of the input size, n, to the algorithm. Then we will try to show that the amount of steps is O(f(n)), for some function f(n). There are three different types of algorithmic running times. The following are the running times; Average running time, Worst case running time, and Best case running time. This is listed by the importance of each one. The most common goal is to minimize the average run time of an algorithm.

This is why this is the most important value to find. Next, you want to know the longest your algorithm will take. The last part isn't as important, but you can find the fastest your algorithm will take. Once this step is completed, then the next will be to develop your methodology for algorithm analysis. This process includes the following: A language for describing algorithms, a computational model that algorithms execute within, a metric for measuring algorithm running time, and an approach for characterizing running times, including those for recursive algorithms. This is how the methodologies for analyzing algorithms work.

For this essay, the game that I chose was Pace-man. Pace-man is an arcade style game developed Day Monaco. In tans game, ten player controls Pace-man tongue a maze, eating pellets. When all pellets are eaten, Pace-man is taken to the next stage, between some stages one of three intermission animations plays. There are four enemies that try to

kill Pace-man. These enemies are ghosts named Slinky, Pinky, Inky and Clyde. The enemies move around the maze trying to kill Pace-man. When the ghost touches Pace-man, a life is lost. Once there are no lives left, Pace-man dies and its game over. For every 10,000 points Pace-man get a life back.

Near the corner of each maze in each level, there is a power pellet. If Pace-man eats the power pellet, he can temporarily turn around and eat the ghosts. At this time, the ghosts are running away from Pace-man instead of chasing him. The game has its bas controls, up, down, left, or right. The AY is pretty impressive. The ghosts try to find the shortest route to Pace-man without turning around. This has its own algorithm which I will discuss. Pace-man is a fun game that gets more difficult as you get to higher levels. As you go into a higher level, the algorithm gets more advanced.

For the gamely, the levels become increasingly difficult due to modifications to Pace-Man's speed, as well as changes to both the speed and behavior of the ghosts. The algorithm used for this makes sure that when each level is passed, the Pace-Man's and the ghosts speed change which makes the game harder. This algorithm is needed to increase the difficulty of the game, as well as to make each level seem to be completely different, even though the mazes are almost the same. There is also an algorithm to render the game. After each stage, the algorithm will make the game render and then load a ewe maze.

After 3 mazes there is a cut

scene. Without this algorithm, the game wouldn't be able to tell when it is time to load a new level. This is crucial in any level system in any game. The next part and probably the most important part of the game is the AY algorithm. Pace-man AY algorithm is very detailed. Each ghost has their own algorithm because they each move around the maze in a different way. "The ghosts are always in one of three possible modes: Chase, Scatter, or Frightened. The "normal" mode with the ghosts pursuing Pace-Man is Chase, and this is the one that hey spend most of their time in.

While in Chase mode, all of the ghosts use Pace- Man's position as a factor in selecting their target tile, though it is more significant to some ghosts than others. In Scatter mode, each ghost has a fixed target tile, each of which is located Just outside a different corner of the maze. This causes the four ghosts to disperse to the corners whenever they are in this mode. Frightened mode is unique because the ghosts do not have a specific target tile while in this mode. Instead, they randomly decide which turns to make at every intersection" (generational. Com). The changes in chase and scatter mode come in timed waves.

Here are the steps according to generational. Com: 1 . Scatter for 7 seconds, then Chase for 20 seconds. 2. Scatter for 7 seconds, then Chase for 20 seconds. 3. Scatter for 5 seconds, then Chase for 20 seconds. 4. Scatter for 5 seconds, and then switches to Chase mode permanently. After the first level, the wave from

the third step to fourth changes severely. The time now takes even longer. Scatter Mode As you can see on the graph, there is set paths each ghost character can move at a e I nee algorithm noels ten angst Tina ten snorted Elegance to Pace-man as long as they are following their proper grid.

So Pace-man uses a type of Disaster's algorithm for the ghosts AY. You can now see the importance of all of the algorithms used in this game. Think of it as rules for the game the computer must follow. If these algorithms are not used, this game would not be successful. If the algorithm for the gamely isn't used, then the computer would not allow certain movements for Pace-man himself. The player would not be able to control Pace-man. If the algorithm for rendering was not use, then the player would not be able to go to he next level upon completing a level.

This is crucial to the game. The Ai algorithm is what makes Pace-man so challenging. Upon placing the rules for the ghosts, you get the sense of why Pace-man must dodge the enemies. Without the AY algorithm, the player will have no competition when collecting all of the pellets. After completing this paper, I learned a lot about the Methodologies for Analyzing Algorithms. I feel that Pace-man was a perfect example to use. This game was not a new game, but it still used plenty of creative algorithms in order to achieve a specific tasks.

Hopefully one day I will be able to use algorithms in such great detail as in Pace-man.

Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New