Tail Call Optimization

Tail Call Optimization appears in the March/April 2021 Issue of Analog

The story continues the Human Way series that has been appearing in Analog over the past few years. It takes place in the Recursion universe around 12 years after the events depicted in the novels.

Other stories in the series include The Region of Jennifer,  Threshold, The Human Way, Trapezium and Trespass

Trapezium

Trapezium appears in the September/October 2018 Issue of Analog

Fans of the Recursion series may recognise Craig, Armstrong and Joanna – as well as the Eva Rye – from the beginning of Divergence.

The story follows on from events in The Region of Jennifer,  Threshold and The Human Way

Threshold

My short story,  Threshold, appears in the October 2014 issue of Analog.

Like The Region of Jenniferthis story is set in the Recursion universe.  It introduces the S, the Foundation for the Enlightenment, and the Human Way.

There are more stories to come in this series – keep watching this space!

The Region of Jennifer

My short story, The Region of Jennifer, appears in the June 2014 issue of Analog

This is the first of a series of stories I’ve been working on set in the Recursion universe. The action takes place 8 years after the events in Divergence and deals with some of the questions raised by the Big Share Out that occurred at the end of Divergence.

I’ve had the idea for this series for some time, from around the time I finished writing Divergence, in fact, however I found myself distracted by Robots and Dream Worlds in the meantime.

But I was missing writing Hard SF, and I had reached the point where I just couldn’t not get the ideas down on the page, and The Region of Jennifer was the first result.

Watch this space, there are more to come…

Divergence

DivergenceMidThe robot Constantine notices an Artificial Intelligence spontaneously coming into being on a distant planet…and watches helplessly as it is destroyed.

In deep space, far from Earth, Judy senses a change of mood aboard the passenger ship she travels on…and a quick investigation reveals that the craft is succumbing to a mysterious alien infestation.  Just as hope seems lost, a group of combat drones appears to rescue all the passengers, except Judy – who is told she is the property of a forgotten mega-corporation based on Earth.

Returned against her wishes to an Earth under constant assault from the same alien infestation, Judy begins to learn her place in a conspiracy billions of years old.  But is she ready to take on the benign, omnipotent, all-seeing Watcher who guides human destiny?

And destroy it?

Buy Divergence on Amazon UK | Buy Divergence on Amazon US

Extract

Edward sat in the conference room, his hands covering his face, his feet on his chair so that his knees were drawn up to his chest.

“I don’t like them,” he said.

“Don’t be silly,” snapped Saskia, striding into the room.

“That’s not going to calm him down, is it?” said Judy, quite reasonably. She placed a reassuring hand on the big man’s shoulder, and said something softly that Maurice couldn’t hear.

The cause of Edward’s distress could be seen floating in a viewing field above the black shiny table.

“What are they?” asked Maurice.

“We don’t know,” admitted Judy. “Nor does Aleph.”

She pointed to a viewing field, where the system-repair robot they had picked up from the Petersburg could be seen clinging to the hull of their ship. Aleph gave Maurice a cheery wave.

Maurice gave a half-hearted wave in return as he moved closer to the images. They reminded him of flowers: they were all the same size and shape, roughly spherical. Their surfaces were spectacularly coloured, bursts of yellow and red and orange tangled around each other in fractally entwined patterns that deepened to a dark rose at a focus. Maurice understood why Edward seemed so frightened. The patterns on those flowers were unnerving: they gave the impression that they were looking straight at you.

To conceal his uneasiness, Maurice pulled out his console and brought up a scale reading. The flowers registered as just over thirty centimetres in diameter. He called up a topographical mapping.

“The readings suggest that they are not completely spherical,” he announced. “There is an indentation at the other side of these objects. They’re hollow. So what’s inside?”

“We don’t know,” said Saskia. “They’re turning so as to face us as we travel. It’s like they are always keeping their back to us, not letting us see what they’re hiding.”

Maurice rubbed his chin. “Oh. I’ve never heard of anything like this before.”

“Nor has Aleph,” said Judy.

“I don’t like them,” repeated Edward. He noted Saskia’s glare. “They’re not right,” he whined. “They’re alien!”

Judy rubbed his arm gently and spoke to him in a voice learned from Social Care.

“Edward, they’re not alien. Aleph says so.”

“Aleph is an alien himself! Why should we believe him?”

“There are no such things as aliens,” snapped Saskia, looking painfully thin and bristling with nerves. “I already told you that. We have never found aliens on any of the planets we’ve visited, and humans have travelled a very long way. Aleph is just a system-repair robot.”

“Easy, Saskia,” said Maurice. “Hmm, has there been any sign of the Bailero yet?”

“Of course not.” Saskia was scathing. “We got stiffed again.”

Maurice tapped at his console. “We’re in the middle of empty space,” he said thoughtfully. “The closest star is over three parsecs away. Hmmm, if I were an AI escaping from Earth on a warp ship, this would be just the place I would choose to hide. Right where no one ever comes.”

“Hide maybe,” said Saskia irritably, “but not a very good place to build an empire from. There are no raw materials out here. The Free Enterprise said it was manufactured by the Bailero. Out of what, though?”

“I don’t know,” said Maurice. He gestured at the orange-red eyes of the flowers. “Maybe out of those things. Are there any more of them around?”

“Not that we know of.”

Maurice concentrated on his console. The space flowers- or whatever they were- were about 200 kilometres distant. The Eva Rye was currently at rest relative to them. He checked back on the search pattern that he had programmed: a three-dimensional spiral that swept out a path through a volume of space that was covered by the limits of the ship’s senses. Long-distance senses had picked up the flowers from nine hundred kilometres back, and had watched them closely as the ship slowed to a halt. And the flowers had turned to watch the Eva Rye right back.

“Odd,” said Maurice. “I wonder what they are hiding inside? Let’s try and catch them out. Aleph?”

“Hi, Maurice.”

“I’m going to take the Eva Rye up and over to the other side of those things. Why don’t you let go of our hull and just stay floating here? If they turn to follow us, you might then get a look at what they’re concealing.”

“Maurice,” said reprovingly, “that wasn’t part of our contract.”

“Aleph, there should be an antique Warp Ship waiting here for us, payment for taking Judy to Earth. Instead we have found space flowers. Look at it this way, Aleph, if there is no ship, there is no contract, so we will not be going to Earth.”

“There’ll be a ship,” said Judy resignedly.

Saskia glared at her. Maurice ignored them.

“Help us, Aleph, and we’ll soon be on our way.”

“Oh, very well,” said Aleph. “I’m letting go of your hull. Off you go now.”

Maurice’s fingers danced across his console. “Where’s Miss Rose?” he asked, casually.

“In her room, of course,” said Saskia. “This is just wasting fuel, you know.”

“Well, what do you suggest?” asked Maurice. “Should we just ignore those things and sit here waiting for the Bailero to turn up of its own accord?”

Saskia said nothing to that.

“Fuel?” said Judy suddenly, her head tilted to the side. “The Eva Rye uses fuel?”

“Oh yes,” said Saskia bitterly. “That’s part of the FE deal. Apparently use of such things as AIs and VNMs and unlimited engine range only gives us the idea that we can get something for nothing. That’s contrary to the FE philosophy. Though, of course, in our case we seem to get nothing for something every time we do a deal…”

Saskia sensed that she had lost her audience’s interest. She took a green apple from the white bowl in the centre of the table, and bit into it. She crunched on it noisily as the Eva Rye began to move.

“I don’t like this,” moaned Edward. “I don’t like this!”

“Shh,” said Judy.

“The Petersburg did warn us,” complained Saskia, but Maurice tuned her out.

They watched the flowers intently. The red and yellow and orange blooms hung there, apparently motionless.

“…which means they are turning to follow us,” said Maurice. “They are still trying to conceal their contents. Aleph, what can you see?”

“Nothing as yet,” said Aleph. “Keep going. I can see them turning. They are… Oh damn!”

The crew of the Eva Rye saw it happening at the same time. The flowers seemed to move together, their hidden mouths joining together to kiss and conceal.

“Now what?” said Saskia.

Buy Divergence on Amazon UK | Buy Divergence on Amazon US

Capacity

CapacityMidWelcome to the year 2252—and congratulations! You’re now a personality construct. We know that can be a daunting stage of personal development,especially if you don’t remember making this life-changing decision. But we’re here to help….

Helen is waking to a dark new reality—one that she’s certain she didn’t choose. In this borrowed existence, she finds an unexpected guide in Judy, a geisha-faced virgin who’s on a mission of her own. Together, the two of them begin a dangerous run through dozens of imagined worlds in an attempt to trap a psychopath haunting the shadowed areas of virtual space—a killer who brutally murdered an earlier version of Helen and who plans to kill again. Meanwhile, Justinian is investigating a peculiar rash of AI suicides on far-off planets—and finds that not only is there more to these “deaths” than he thought, but that they may be linked to his wife Anya’s mysterious coma.

In a future where AIs have taken over human life and the Environment Agency runs everything for our own good, the fact that we can live on after physical death as sentient digital beings should have been a good thing. Instead, as Helen and Justinian are about to discover, it just means there are more ways to die.

Buy Capacity on Amazon UK | Buy Capacity on Amazon US

Extract

The AI pod rested in a little indentation in the bank. It seemed almost unchanged from its dormant state: a smooth fluorescent green kidney bean the size of Justinian, had he taken it into his head to curl up in the foetus position there in the stinking mud. Three BVBs had wrapped themselves around its surface, a few Schrödinger boxes were scattered across the mud before it.

“Hello,” said the pod.

“Hello, I’m Justinian.”

“Hello, Justinian.” The pod’s voice was eager, like a child, fascinated by the world.

“Have you seen these little boxes? As soon as you take your eye off any of them, they jump to another position. But as long as you are looking at them, they stay put.”

“I’ve seen them,” said Justinian, feeling fed up with this pod already. He had been conducting interviews all over the planet, asking the same questions over and over again, and each time receiving exactly the same answers. It was getting tedious beyond belief. For this pod, of course, it was all new.

“Do you know what they are?” it asked. “They’re amazing!”

“They’re called Schrödinger boxes,” said Justinian, carefully. The pod wasn’t fooled.

“Ah! So you don’t actually know what they are either. Maybe you can tell me about these bands wrapped around my shell. Do you know what they are, or do you simply have a name for them?”

Justinian was too tired to be insulted. Besides, it was all part of the script.

“We call them BVBs,” he replied. “Look, I’ve got one in here.”

He pulled the plastic rod from the thigh pocket of his passive suit, and waited a moment for the pod to scan it.

“Very interesting,” it said. “Where did you find it?”

“The plastic rod is a table leg. One of the other colonists found the BVB wrapped around it as they were sitting down to breakfast one morning.”

“One of the other colonists? How many are there now on Gateway?”

“Still just a hundred. And me, of course.”

Justinian gave an involuntary shiver as he said these words. It reminded him how far he was from home, and Justinian felt doubly alone. Here he was, standing on a remote mud slick, lost on a planet that floated between galaxies, and yet he felt himself an outsider to the only group of humans for millions of light years. The bright blue belt of M32 rose into the dark sky behind the pod. The Milky Way was a monochrome rainbow in the other direction.

Justinian rubbed a finger across the fuzzy surface of the BVB and wondered at the strangeness of this place. As far as he was concerned, reality was a force that diminished the further one travelled from home: the hundred colonists were treading in a place of dreams where nothing worked as it should. Nor should it be expected to.

The pod spoke in a thoughtful tone.

“I don’t remember anything about BVBs. I wonder why that is?”

“Probably because they weren’t known about when you were conceived. They were only discovered on this planet.”

Justinian crouched down before the pod, looking for external sense cluster formations. There seemed to be nothing. That implied the pod was still operating on internals. Just like all the other pods, in fact.

“BVBs are similar to the Schrödinger boxes,” he continued, his hands glowing fluorescent green as he felt the rubbery surface of the pod. Red mud squelched under his feet and he grabbed onto the pod to maintain his balance. “BVBs only form in spaces that are not being observed, and then they immediately begin to contract.”

“How do you know?” interrupted the pod.

“How do I know what?”

“How do you know that they begin to contract immediately if the space in which they form is not being observed?”

Justinian gave a tired smile

“Good point,” he said. “I hadn’t thought of that before.” He was struck by how much like children the AIs here on Gateway had become. Innocent, but with a sharp eye for detail.

“Someone probably did, they just didn’t explain that part to you.”

Justinian gazed coolly at the pod. And like a child, he thought, they could be incredibly tactless. They quickly figured out that Justinian wasn’t part of the scientific survey team, and then equally quickly lost all respect for him.

His legs were getting tired from crouching, so he straightened up and began to circle the pod, treading carefully on the slippery mud. One careless step and he could end up rolling down the slope into the dark water below.

“Anyway,” he said. “BVBs form in empty spaces. We believe they begin to contract immediately. Sometimes they get tangled around an object; like a pipe or a tree branch. The slightest touch on their inside surface stops them contracting; nothing can make them expand again. And they’re unbreakable. Nothing can cut through them.”

“Oh…” the pod’s voice was almost wistful. “What does BVB stand for?”

“Black Velvet Band. Named after an old song, apparently.”

Justinian rested a hand on the warm surface of the pod. He looked at the three BVBs that had formed on its supple skin. “If you rearrange your external structure to make your skin frictionless they’ll slip right off.”

There was a moment’s pause before the pod spoke.

“…I can’t,”

“You can,” said Justinian. “All AI pods have multiform integuments. Yours is just set to dormant mode at the moment. Wake it up.”

“I can’t,” said the pod. It sounded embarrassed. “I don’t understand how to work the mechanism. I can see the potentials arranged before me, but I don’t understand how to achieve them.”

Justinian yawned again; looking out across the water. A pale glow had appeared over there as dawn approached. He wondered if he could make out the shape of another mud bank, slowly materialising from the blackness.

“You’ve heard all this before, haven’t you?” said the pod shrewdly. “Who are you? Why are you here? You’re obviously not one of the regular surveyors.”

There it was again: all the pods so far had figured this out. They might be acting like children, but they still had intelligence at least equal to his own. And, stripped down though their intelligences were, they still had access to vast libraries of data. Data that covered many, many subjects. How to read body language would be just one of them.

Justinian played it straight. “My name is Justinian. I’m a counsellor. I’ve been brought to Gateway to try and figure out why AIs aren’t thriving here.”

“A counsellor?” said the pod. “What sort of a counsellor? MTPH?”

“Originally. I work mainly with personality constructs nowadays.”

“Personality constructs? Does that make a difference?”

“It shouldn’t do. You have to retrain in the use of MTPH….”

“I suppose that’s one reason for sending you here to speak to me,” said the pod thoughtfully. “Still, I would have thought the reasons for my failure would be beyond human intelligence. I would have thought the investigation would be a job for an AI.”

Justinian spoke in his most sarcastic voice.

“You’d think so, wouldn’t you? The trouble is, AIs don’t seem to want to work on Gateway. So far I’ve interviewed fourteen of the thirty two pods that were seeded here. All of them have been exactly like you: drastically reduced versions of their former selves. Virtual suicides.”

The pod seemed unbothered by his tone.

“Really? So it wasn’t just me, then…”

The pod was silent for a moment. When it spoke, Justinian thought that there was an edge of fear to its voice. That was silly, of course. The pod could make its voice sound however it wanted it to sound.

“So that’s why they sent a human. But why you, I wonder? There’s more, isn’t there, Justinian? There’s a reason why they chose you in particular.”

Buy Capacity on Amazon UK | Buy Capacity on Amazon US

Recursion

RecursionMidIt is the twenty-third century. Herb, a young entrepreneur, returns to the isolated planet on which he has illegally been trying to build a city–and finds it destroyed by a swarming nightmare of self-replicating machinery. Worse, the all-seeing Environment Agency has been watching him the entire time. His punishment? A nearly hopeless battle in the farthest reaches of the universe against enemy machines twice as fast, and twice as deadly, as his own–in the company of a disarmingly confident AI who may not be exactly what he claims…

Little does Herb know that this war of machines was set in motion nearly two hundred years ago–by mankind itself. For it was then that a not-quite-chance encounter brought a confused young girl and a nearly omnipotent AI together in one fateful moment that may have changed the course of humanity forever

Buy Recursion on Amazon UK | Buy Recursion on Amazon US

Extract

Herb 1: 2210

Herb looked at the viewing field and felt his stomach tighten in horror.  He had been expecting to see a neat cityscape: line after line of silver needles linked by lacy bridges, cool silver skyscrapers shot through with pink tinted crystal windows; artfully designed to resemble the spread of colours on a petal.  Instead he saw… bleak nothingness.  Cold, featureless, gently undulating wasteland spreading in all directions.

Something had gone badly wrong.  Suddenly the cosy white leather and polished yellow wood lounge of his spaceship was not the safe cocoon he had grown used to over the past few months.  Now they would be coming to prise him from this warm, cushioned shell to cast him shivering into the real world, all because he had made one tiny mistake.

Somehow he had made a mess of the code that should have told the Von Neumann Machines to stop reproducing and start building.

Herb’s machines had eaten up an entire planet.

 

But there was nothing to be gained now by crying about it.  Herb had known he was on his own when he embarked upon this project. It was up to him to figure out what had gone wrong, and then to extract himself from the situation.

He opened a second viewing field next to the first and called up an image of his prototype Von Neumann Machine.  A cylinder, nine centimetres long, with eight silver legs spaced along its body giving it an insectile appearance. Six months ago Herb had dropped out of warp right over this planet, opened the hatch of his spaceship, and stood in solemn silence for a moment before dropping that same machine onto the desolate, rocky surface below.

What had happened next?

Herb liked to pace when he was thinking, and he had arranged his spaceship lounge to allow him room to do so. Two white sofas facing each other occupied the centre of the room.  A wide moat of parquet flooring filled the space between the sofas and the surrounding furniture that lined the walls of the room. The smell of beeswax polish and fresh coffee filled the cabin.   Herb closed his eyes as he ran through the order of events after he had released the Von Neumann Machine- a mental dry run to try and isolate the problem.

He imagined that first VNM turning on six of its spindly legs, lifting them in a high stepping motion as it sought to orientate itself.  The remaining two legs would be extended forward, acting as antennae, vibrating slightly as they read the little machine’s surroundings.  It would have walked a few paces, tiny grains of sand sticking to its silver grey limbs, then maybe changed direction and moved again, executing a random path until it found a patch of rock of just the right composition and then settled itself down, folding its legs around itself to bring its Osmotic shell in contact with the surface.

His thoughts on track, Herb began to pace in a circle around one sofa, soft ships’ slippers padding on the wooden floor.  He was naked except for a pair of paper shorts.  Two hairs grew from his sunken chest; whose pallor had caused the ship’s computer to steadily increase the UV content of the lighting over the past two days, in order to stimulate vitamin D production.  Okay, what next?

In his imagination he saw that first machine, absorbing matter, converting it, working it, and sending it around that half twisted loop that no human mind could comprehend.  Soon there would be two identical machines standing on the rock, their legs waving in an explorative fashion. And then four of them, then eight…

The program was perfect, or so the simulations had told him. When they reached the optimum number the machines should have begun constructing his city out of their own bodies.  Clambering on top of each other using the sticky pads on the ends of their feet.  Herb was proud of the design of those pads: each seemingly smooth foot ended in a chaotic branching of millions upon millions of tiny strands.  Press one foot down and the hairs would spread out, reaching down and around to follow the contours of the surface beneath them so perfectly that they were attracted to it at a molecular level.

Not that any of that mattered now. This was the point where the error lay.  The machines hadn’t paused to build his city.  They’d just gone on reproducing, continued eating up the planet to make copies of themselves until there was nothing left. He opened his eyes again to look at the view field.  Maybe he had only imagined it.

No way.  Herb groaned as the view zoomed in on the cold grey shifting sea beneath.  He could make out the busy motion of thousands, millions of VNMs walking over and under each other, struggling to climb upwards to the surface only to be trodden on and forced down by other VNMs, each equally determined about seeking the light.  Wasn’t that part of the end program?  City spires, growing upwards, seeking the light in the manner of plants?  Herb groaned again at the endless perpetual motion beneath his ship. Everywhere he looked, everywhere the ship’s senses could reach; out to the horizon, down to the submerged layers of machines; it was the same:  frenzied pointless activity.

He paused and felt a sudden thrill of horror. That wasn’t quite true.  Something was happening directly below.  He could see a wave building beneath him: a swelling in the grey, rolling surface.  Thousands of pairs of tiny silver antennae were now waving in his direction.  They sensed the ship hanging there.  They sensed raw materials that could be converted into yet more silver VNMs.  Herb felt a peculiar mix of horror and betrayal.

He croaked out a command. “Ship. Up one hundred metres!”

The ship smoothly gained altitude and Herb began to pace again.   He needed to think, to isolate the error; but he couldn’t concentrate because one thought kept jumping in front of all the others.

He was in serious trouble.  The EA would have been upset enough by the thought of a private city being built on an unapproved planet.  Never mind the fact that the planet was sterile and uninhabited, they would still point out the fact that a city wasn’t part of this planet’s natural environmental vectors.

“We are uniquely placed to manipulate not only our environment, but also that of other races as yet unborn.  It is our responsibility not to abuse that privilege.”

The message was as much part of Herb’s childhood as the smell of damp grass, the dull brown tedium of Cultural Appreciation lessons and the gentle but growing certainty that whatever he wanted was his for the asking.   Everything, that is, but this.  Everyone knew the EA’s philosophy.

So what would the EA think when they discovered that in failing to build his illegal city he had accidentally destroyed an entire planet instead?

Herb didn’t remember setting out a bottle of vanilla whiskey on the carved glass slab that served as a side table.  Nonetheless, he poured a drink and felt himself relax a little. His next moves began to fall into place.

First he had to try and destroy any evidence linking this planet with himself.

Next he had to get away from here undetected.

Then he had to slot back into normal life as if nothing had happened.

Then, and only then, could pause to think about what had gone wrong with his prototype.

The first objective should be quite straightforward.  The original VNM had been designed with anonymity in mind: standard parts, modular pieces of code taken from public libraries.  The thought that someone might accidentally stumble across his planet had always been at the back of his mind. He gulped down some more whiskey and an idea seemed to crystallise from the concentrated alcohol. He prodded it gently.

Of course, so far as Herb knew, no one else even knew that this planet existed.  He had jumped across space at random and set his ships senses wide to find a suitable location.  What if this planet were just to disappear?  What if he dropped a second VNM onto it- one with a warp drive and access to a supply of exotic matter?  Set it loose converting all the original machines, and then, when that work was done, just jump them all into the heart of a star?

Could he do it?

Getting hold of enough exotic matter to build the warp drives of the modified VNMs would be a problem; but his father had contacts, so that could come later.  He had to get away first.

He could do that.  A random series of jumps around the galaxy, eventually returning to Earth.  Enough jumps, executed quickly enough and nothing would be able to retrace his course.

Good.  Now, how about slotting back into normal life?  Would anyone suspect him?  More to the point, would the EA suspect anything?  Their senses were everywhere.  They said the EA could look into someone’s soul and weigh the good and evil contained therein to twenty decimal places, and yet… and yet…

Herb was different.  He had known it since he was a child.  Sometimes it was as if he was merely a silhouette.  Like he was there in outline, but they couldn’t fill in any of the specific details.

If anyone could get away with it, it was Herb.

A gentle breeze brushed his face and he felt his spirits lift. He took another gulp of whiskey and felt its reassuring warmth as he swallowed.  Alcohol and the flooding sense of relief made the lounge resume its feeling of comfort and security.  The plan was good.  He could get away with it.

“I can get away with it,” he whispered to himself, his confidence growing. Another drink of whiskey and that familiar sense of his own invulnerability swung slowly back into place.  Get back home, and he would be able to examine the design of his VNM and discover what had gone wrong with it. He drained the glass and began to stride around the room, feet padding on the wooden floor, energy suddenly bubbling inside him.

“I’m going to get away with it!” he said out loud, punching at the air with a fist, whiskey slopping from the glass held in his other hand. And then, once he was home, once he had found the error in his design, he could find himself another planet.  Build his city there instead.

“I will get away with it!” he cried triumphantly.

“No you won’t.”

The glass slipped from Herb’s fingers.  He spun around and fell into a crouch position; ready to run or fight, though where he would run to in a three room spaceship his body hadn’t yet decided.

A slight, dark haired man with a wide, white, beaming smile and midnight black skin stood on the sheepskin rug between the facing sofas. He wore an immaculately tailored suit in dark cloth with a pearl grey pin stripe.  Snowy white cuffs peeped from the edge of his sleeves; gleaming patent leather shoes were half hidden by the razor sharp creases of trousers. The man raised his hat, a dark fedora with a spearmint green band, to Herb.

“Good Afternoon, Henry Jeremiah Kirkham.  My name is Robert Johnston. I work for the Environment Agency.”

Buy Recursion on Amazon UK | Buy Recursion on Amazon US