Optimal Iterations: Base Case

by Starscribe


Over the Event Horizon

Event Horizon woke up for the first time on the Starship Enchiridion

She knew where she must be before she opened her eyes—knew from how many legs were tucked under her, from the gentle whirring of the air-recyclers, the magical hum of the gravity plates, and the distant rumble of the ship's Friendship Drive. 

It worked. I'm actually here! She felt a surge of such incredible excitement that she couldn't remain in bed, no matter how comfortable and relaxing her environment. Years looking at the Enchiridion through a Ponypad, and a few wonderful visits to Experience Centers could not possibly compare to actually being here. 

Celestia had made Horizon certain promises, and all of those required her physical presence in Equestria Online. Had she kept them?

Horizon opened her eyes, then sat up. Her bedroom was exactly the way she remembered it—tucked into a large dome near the front of the ship, where it had prime view of the nothingness beyond her. That design would be pure insanity for a warship—but there was no war in this part of space, only endless strange new worlds to explore.

She sat up from her comfortable bed, then found the first mirror she could. The worst part of this transition was certainly true—Celestia required all migrants to accept reassignment as ponies. She remembered dreading that part of coming here, as one solitary blot on an otherwise incredible future.

She could no longer quite remember why this body had seemed so strange or upsetting to her. Her limbs were no less responsive. Whatever dexterity she gave up in her hands, her horn more than made up for. She tested it right then, brushing her disheveled morning mane through until it was arranged in the way her character always used it.

But do I feel any smarter? Crossing this threshold was supposed to be revolutionary, erasing her old self to be reborn in a world that was new, better than anything she'd left behind. 

Horizon nudged the edges of her wing emitters, summoning a ghostly outline of a pegasus’s wings around her. She couldn't feel those the same way as her other limb, only a general sense that the implant was working as intended, and would be able to fly her if she required it. Good enough.

Then something exploded. The ground lurched out from underneath her, as the whole of the Enchiridion rocked from one side to the other. The even blue lights changed to a pulsing red, along with an alarm. 

"Danger: critical system damage detected. Reactor: offline. Life Support: auxiliary power only."

Horizon giggled. She hung suddenly weightless in the air, her mane and tail drifting with the lack of gravity. Outside her windows, the Enchiridion continued to travel forward, but no longer accelerated. She was drifting in space.

I should probably do something about this. She reached out, levitating her communicator off her dresser, and attaching it to her breast. It settled against subdermal magnets, and began to flash dimly red right along with the rest of the ship's systems. 

"Computer, what happened?"

Celestia's voice answered, in just the right mix of intelligent and automated system. "We encountered an unknown technical fault with the Friendship Drive. A cause cannot be projected at this time. With the central reactor disabled, conditions aboard will no longer be able to sustain life in approximately five hours."

Horizon tapped her wings again, then directed them to fly her to the ground. That was her human bias talking—”standing” on the deck was no more or less valid as a perspective than hovering through the air. But she would still need practice floating around the ship before she got used to it.

"But I'm... in Equestria," she said. "Right?"

"The Equestrian Exploration Authority has emergency procedures in place to recover you if you should be lost in space. Such a failure would negatively impact your service record, and decrease the likelihood of future command positions."

That was a yes, without directly breaking character. She wouldn't die if her ship exploded out here, she would just... not lose the game exactly, but suffer a setback. Horizon had no intention of letting that happen.

"What other crew do I have aboard?" she asked, making her way to her bedroom's only terminal. The screen flashed and spluttered, not responding to her hoof press.

"None."

Right. She had spent a great deal of time designing this ship, imagining its complex relationship to Equestrian shards. She'd picked out every room, arranged the amenities and weapons and everything else. Her mentor had explained it best: “Celestia's going to get all of us eventually. Make your shard somewhere you want to live, because you will one day.”

Of course Arcane Word would think that far ahead. Event Horizon couldn't be one of those brilliant ponies who changed the underground of Equestria Online—at least she couldn't be on the outside.

"I didn't get around to choosing a crew?" she asked, scratching the back of her head. Event Horizon probably should remember, but there were some details still a little fuzzy. Something made her decide to walk into that Experience Center, but what exactly?

"You preferred to travel with a minimal crew. Three ponies are waiting for you onboard the Pandorum at your rendezvous in orbit over Altera. This first leg of your journey is meant to evaluate your performance and qualifications for command."

"I could fail?" she asked, tilting her head to one side. "I thought the whole point of coming here was being satisfied. Things are... going wrong right from the outset, now that I think about it."

The computer never sounded quite neutral, letting just enough emotion slip through for Horizon to imagine she was speaking to a real person. That was part of the appeal of the long, solitary voyages aboard her ship—she never wanted to be truly alone. "It is always possible. The Equestrian Exploration Society chose you specifically for your competence and intelligence, however. You helped design this ship, so make an ideal first captain. If your journey is successful, many ships like the Enchiridion will be built."

If. How much of that was about immersion, and how much was a genuine possibility of failure? "Is screwing up satisfying for ponies like me?"

There was a pause, as though the question was hard for the computer to answer. Probably all for effect, a little inspiration from the classic science fiction that had made her fall in love with this shard to begin with. "Your personality profile suggests you enjoy being challenged, and missions that constantly force you to stretch your limits and take risks. This assignment is intended to do so. If you do not restore your life support, it will end in failure. However, you don't have to work alone. You do have one passenger. A bat-pony stallion named Murky Pond, located one level above Engineering. I may be able to raise him on the communicator for you."

"Do so." She turned for the service ladder, ignoring the turbolift completely. There was no chance those would be safe while the ship's main reactor was offline. "Not that I'm eager to talk to that jerk again. Surprised he's still aboard."

"He is still waiting for delivery on the scientific outpost of Altera," the ship's computer said. Then came the characteristic chirp, followed by "Channel open."

"Murky," she called, keeping her voice professional. "Did that shock wake you up too?"

There was a brief silence on the other end. Horizon imagined the bat was deciding whether he could get away with ignoring her or not. The persistent droning of the emergency alarms must have convinced him eventually, though. "I live here, of course they woke me up.  I don't have the luxury of a magical screen between me and dying out in space."

"Neither do I," she snapped back. "I'm going down to engineering to fix the reactor. I can't order you, but please meet me there. Assuming you care about surviving."

"I'll be there," he said. "Under protest. Did you seriously go through with it?"

She tapped her communicator, terminating the channel. She had a nice long climb to consider her response. Technically, she'd thought about it even more before deciding to walk into an Experience Center and never leave again. 

She had no intention of ever revealing her true motivations.

The bat was already waiting for her in Engineering. The experimental Friendship Drive was glowing an angry red, with broken crystals scattered onto the floor all around it. Pipes of coolant vented dramatically up into the air, just thick enough to be annoying without actually suffocating her. Murky was already inside, staring at an exposed panel.

Shame he was so sour. He wouldn't be a bad looking stallion if he didn't always make that face. "Took your time getting down here," he said. He kept drifting away from the deck, fighting with his wings each time to keep his hooves down. He wasn't much better coordinated in microgravity than Horizon. But which of us will master it first?

"I had five decks to climb, not one," she said. Not getting argumentative with him was part of the challenge. So she didn't even make eye contact, drifting over to the exposed panel. Inside were an array of broken crystals, etched with runes. They represented subroutines, fitting together like so many basic coding tutorials. 

"Well, I hope you're feeling clever today, captain. Your crew is still waiting at my stop. There's nopony else to fix this one for us until we arrive."

She tensed with a brief wave of panic. Runescript, her worst enemy. It wasn't just the mathematics inherent in the structure of Equestria's language, but the underlying logic as well. Anything beyond the hello-worlds and she started to hyperventilate. That was why she'd commissioned this ship from Arcane Word, instead of writing all this herself.

The exposed panel had special docking ports at the beginning and end of the sequence. She leaned in close, squinting at the tiny, scrawled text. Arcane's hoof writing was tiny and perfect. Unlike her code.

This wasn't well optimized. In a flash, Horizon saw the problem. The largest chunk of crystal was a loop, containing all the others. Except—the complex section set a value and never changed it again. How had she been so careless?

Horizon lifted the whole assembly into the air, rotating its contents and fitting them each back into the engine. Only this time, several large chunks would run only once each time this subroutine was called, instead of burning resources inside the loop. Did Equestria care about conservation like that?

"I hope you know what you're doing," Murky said. He flapped his wings, fanning the smoke and coolant away from them so she could work more easily. "That engine looks delicate. If you break the reactor, we're dead."

"I'm not going to break the reactor." Horizon settled the last chunk of crystal into place, then slid the lever across that would close the service panel. Lights overhead dimmed, a mechanical grinding sound echoed from the reactor—then it started glowing green again, with light steadily pulsing inside.


"Main power restored. Gravity plating engaged." Murky dropped to the ground, flaring his wings to avoid a painful bump. A chill wind blew past them, briefly lifting Horizon's mane. After a few seconds it was clear, and even white light replaced the flashing red emergency illuminators.

"Resuming course," the computer said. The Enchiridion jostled slightly under hoof, but not enough to knock her over. The gravity plates compensated for acceleration, in complex mathematical ways.

"You could've told me you actually knew Runescript," the bat said, stalking past her. "This whole time I thought you were... helpless, depending on spell crystals you bought online. You could've charged more bits for the trip if you marketed yourself as a proper captain."

Event Horizon beamed at him. "I guess I sold myself short," she said. "Come with me to the bridge. We should be arriving in-system in the next few minutes. I want to see it for myself."

"Like you've never seen space before," he grunted. He followed her to the turbolift even so. 

"I haven't," she admitted. "But I'm sure it's just as amazing and I've been told."