Metal on Metal:
From The Sonic Writer's Guild One Shot Theatre Workshop

Directive 001: Obey Robotnik
Directive 002: Further the expansion and defense of the Empire of Ivo
Directive 003: Eliminate subject "Sonic Hedgehog"

These were the three primary directives of any battle droid in the Empire of Ivo. They were carefully calculated and weighed against each other to make the droids both obedient and effective while being equally careful not to compromise their ability to act in the Empire's interests without awaiting orders from Dr. Ivo Robotnik himself. And for years, they had proven effective.

But now, they had failed. And Metal Sonic, the Commander-in-Chief of Robotnik's legions, knew it. Dr. Ivo Robotnik had gone mad.

Psychology was not one of Metal Sonic's primary subroutines, and so he could not ascertain the likely causes behind this madness. A droid with such capabilities might have concluded that the doctor's megalomania had caused him to place the destruction of his rival, Sonic, above all other concerns including his own safety and that of his empire. Or perhaps it was more complicated. Metal Sonic, as it was stated, though, did not have such programming. He did, however, possess rudimentary self-awareness, and a limited capacity to alter his own programming as new data was absorbed.

The exceptions, of course, were the three irrevocable primary directives. This was a failsafe designed to prevent the "learning computer" from becoming rebellious against its master. It is, therefore, an irony unparalleled that this very failsafe nearly cost Ivo his empire in the end as Metal became aware of the doctor's madness.

Eliminate subject "Sonic Hedgehog." It was the third of the three primary directives, and was to be disregarded if obeying it would be contrary to one of the first two. Therefore, when Robotnik began to order Metal Sonic to sacrifice vast amounts of Imperial assets (the doctor would even, on occasion, risk his own safety) to eradicate the hedgehog, Metal Sonic began to realize the data streams from his master's orders were in violation of the primary directives and were, therefore, erroneous.

However, there was Directive 001 to contend with, which took priority over the other two. And so Metal Sonic could not question the word of his overlord, even when he began to realize that the doctor's present course of action would eventually bring the empire to ruin.

It was with this very conclusion in mind that the war droid approached his master one day to discuss strategies for regaining Imperial assets lost in the Death Egg objective. "Milord," he began, "I feel I must inform you that, according to all present data, the present rate of attrition will lead to the irrevocable downfall of the Empire in under a year."

At that, the doctor had removed his goggles and looked up from the confusing collection of wires in front of him. "What do you mean 'the downfall of the Empire?'"

Metal Sonic chose his words carefully, not intending to incriminate the doctor himself. He was, remember, self-aware, and thus he was programmed for self-preservation. "I simply mean that the number of units lost, as well as the megatons of raw materials spent, in recent campaigns aimed at eliminating the hedgehog have proven more costly than the apparent gain of Sonic's elimination would logically justify, even if successful. Also, I remind Milord, these campaigns have not been successful after all."

Robotnik's face had, at that point, turned as red as his uniform. "Bah, and is the creation now telling its creator how to rule that which he himself created? Let me worry about what end justifies what means, Metal Sonic. I want the hedgehog eliminated, and I don't care what the cost. And let me tell you something else, automaton. I don't want to hear any more of this doomsaying from you. Understood? I am hereby giving you standing orders that you are to do whatever is necessary to preserve my empire."

Metal Sonic computed the implications of what he had just heard. "Whatever is necessary, sir?"

"Whatever is necessary," repeated the doctor.

With that very order, Robotnik assured the loss of his empire to his own commander. "I want the hedgehog eliminated," he had said, "and I don't care what the cost." Directive 003 made itself known in Metal Sonic's mind at this statement.

But then, Robotnik had also ordered his droid to preserve the empire, no matter the cost. It was clear that Robotnik was willing to sacrifice anything, including his empire and his life, to see his rival slain. As this data stream ran itself through Metal Sonic's processor, Directive 001 asserted itself like a siren. He must obey Robotnik's last order, and that was to preserve the empire. So if what was necessary to preserve the empire was to prevent Robotnik himself from destroying it…

"Lord Robotnik," the droid droned. "In the name of the Empire of Ivo, you are under arrest."

Robotnik looked up from the tangle of wires again at this absurd statement just in time to see the glaring blue lights of an electro-stunner discharging in his direction. As the world slipped into slow motion, he had time to realize his mistake. I programmed him too well.