Download your copy of the Predator sorting algorithm animator predator.exe, by, John Haskins, Jr. today!
What is Predator and where did it come from?
Predator is a program which illustrates the mechanics of several sorting algorithms---shell, bubble, merge, quick, insertion---through animation. It starts by generating a random assortment of bars which represent numerical values. (Blue bars represent negative numbers and green bars represent positive numbers.) These bars are then shifted into their appropriate sorted positions according to the sorting algorithm.
Predator (like STAX) was inspired by my algorithms professor
who made it---the semester project, that is---30% of the total grade in
the class. [NOTE (to my CS661 classmates): Heeeeeeeeeeeeeeeeeey! I
narrowly escaped suffering from the Deep Impact phenomenon.]
What is predator.exe and how do I use it?
predator.exe is a DOS executable that can run in Windows[95|98|NT]. To run the program, enter the command according to the following template below:
predator #bars [insertion|shell|bubble|merge|quick]
The first parameter, #bars is an integer between 1 and 75 which will be the number of bars used in the animation. Finally, select one of the following sorting algorithms to animate: insertion, shell, bubble, merge or quick. For example,
predator 75 shell
Will randomly generate 75 bars and move them into sorted position using the shell sort algorithm.
How about some screen shots.
Click on any of the thumbnails to go to a full-sized image.
Be aware, however, that this program was compiled using the Borland's
(ancient) Turbo C++ 3.0 for DOS compiler. Furthermore, may of the
graphics routines do heinous things like write directly to video RAM
(at segmented address $a000:$0000) and changes the video mode in
raw assembly. (DOS graphics programmers should feel right at home
with all this.)
What kind of name is Predator for a program that animates sorting
The name Predator is just... well... a complete lack of imagination. It makes no since what so ever, I know. I just decided to name my assignment after my favorite movie: Predator.
Why do the error messages say "Nice try, Gabe?"
The professor who created this assignment is known for thoroughly testing our projects. If someone were to tell him to enter a number between 1 and 75, he'd often enter -100 just to see what happens. Knowing this about him, I decided to customize my error messages. He (Gabe) was very amused.
What are the author's plans for the future of Predator?
I haven't any plans for Predator, really. It's served its purpose; I got an A on the project and passed the course. I have made its source code downloadable, however, so that if anyone else should be so inclined, he/she may further develop it, port it to another system, etc. If you do so, please send a copy to me.
How do I contact the author?
I can be contacted via e-mail at firstname.lastname@example.org. Please note that I am a full-time student. Therefore, I will not be able to provide proper support for Predator. I will attempt to respond to all e-mails, bug reports, et cetera in a timely fashion, but offer no promises.
Notes and final comments...
Predator is a look at the computer sciences' lighter side. It is an example of how computers may be more effectively used for teaching. After all, which is more likely to sink in: several pages of text and pseudocode describing quicksort alone or all of the above augmented by an animation of quicksort in action?
Neither I, the author nor the University of Virginia guarantee the suitability of Predator for any purpose, that the executable or any other part of the distribution be stable, correct or bug-free. Predator is free software, offered in the hope that others will find it useful and elucidating. Use at your own risk.
Latest version: 13 July 1999
The Predator Sorting Algorithm Animator. Copyright (C) 1999 John Haskins, Jr.