"You have a visitor, Sir."

"Really? Who is it? If it's SHIELD, tell them I'm not in."

"It's Dr. Jane Foster, Sir."

"Thor's girlfriend?"

"The astrophysicist," Jarvis confirmed/corrected with a hint of feminist reproach.

"Right. Let her in, I guess. Scientists are allowed."

"Oh? I guess I should be relieved, but I really thought this was a research institute open for business, not a treehouse."

Tony Stark spun around from his work bench to see Jane Foster strolling through the entrance to his lab. This particular lab was on the thirty-seventh floor. Apparently, Jarvis had not actually sought his approval before letting her in the building, but had merely deigned to grant him two minutes warning. He smiled crookedly. "How else would you classify a giant skyscraper with my team's name on it and filled with mad scientists dedicated to the advancement of superheroic activities, than as an overgrown kid's tree house?" Tony quipped.

"Fair point. Now, may I ask for a minute of your time?"

"Sure. One minute. Fire away." Jane glared at him. "Alright, fine, more than a minute, obviously. However much time you need, I guess, at least until I get bored, so don't bore me."

"You are insufferable, you know? But anyways, I'm here for a couple reasons. Firstly, I actually am collaborating with SHIELD at the moment, in a way, trying to help Erik."

"Oh yeah? How is he? Still bonkers?"

"Sadly, yes, and can you at least try to be respectful of him?"

"Sorry," Tony apologized immediately. "Really. Black humor. It's a terrible habit I have yet to break."

"And I'm still not going to give you a free pass. In any case, they are looking into discharging him from the inpatient psychiatric unit to a nursing home."

"Oh... that sucks..." Tony couldn't think of anything more to say. He had barely spared the aged scientist a thought since finding him a gibbering wreck on the roof all those months ago. It was a dark surprise to hear the great mind was still so thoroughly indisposed.

"Yeah... We are at least trying to get him into a facility in England. He lived there for years and has a lot more friends there than he does here. I really wanted to come talk to you before the move though, just in case there was anything else you had discovered, anything else we could try for him..."

"You want to talk about the scepter."

"Well, yes."

"Okay, cool. I can help you with that. It's my favorite project! Come on over!" They wended their way back over to the bench, and Tony proudly displayed his months of labor. Loki's scepter had been totally deconstructed now. An enormous computer monitor occupied much of the wall space and showed a complex interactive blueprint of the scepter's components in their original configuration. The main components themselves were arrayed around the table with hundreds of wires and switchboxes connecting them rather than the original microcircuitry. The wires were connected into the headpiece of one of the Iron Suits, which itself was connected to another computer tower. "I've been backtracking on this baby for months. I've mapped most of the original circuits. I've pretty much figured out what they all do, just not quite how. The scepter basically functioned as the command apparatus for an AI, at least, that's what it seems like. All these circuits execute commands, which all originate from the stone thing. I hooked it into the helmet there to figure out what they all did. The helmet itself is logged into a simulation program." Tony pressed a key to bring up a model Iron Man on another screen, standing in a field filled with random fragments of walls and boulders. He flipped on one of the many switches now connected to the scepter's components, and the little Iron Man started running. He flipped another one, and it started firing its blasters. It was weirdly adorable.

Jane laughed. "Good trick there, Stark. Looks like you might have figured out a bit of how it worked as a mind control device, anyways. Anything that might help us help Erik?"

Tony huffed. "What I just showed you is nothing. I'm just running a little charge through a couple motor command circuits. The crazy thing that might not be immediately obvious is that I never actually figured out the code."

"What do you mean?"

"The computer code, or whatever it is that actually communicates to the helmet there."

"Wait, how can you not have figured it out if you've managed to wire it in like that and merge the codes successfully?"

"That's the most interesting thing. I wired it up, yes, and you'll notice I wired it into a helmet and computer otherwise disconnected from the rest of my network. It doesn't even have any of the gear needed to join a network. I was at least a little bit cautious you see after what happened to Erik and Loki and getting warnings from Thor. When I first turned it on, the first thing that happened is absolutely nothing, because it's not compatible technology. I was turning on only one component at a time, using a separate power source. Nothing. The glowy stone thing is obviously the centerpiece of the device, but even that didn't do anything by itself. But as soon as I connected the stone plus that circuit there," He pointed to a component, to which a large red tag labeled DON'T was tied, and the wires clipped, capped, and tied off, "BAM! The program just hacked or otherwise rewrote the programming in the helmet itself. First it spoke, told me to give it the Tesseract or suffer the consequences, which was honestly kinda funny coming from a disembodied robot head. Then it started trying to shoot me, which was also kind of funny. Then it apparently realized it was in a simulation and started trying to hack its way into the main network instead. Then it realized it really couldn't do that, so instead it started talking again, trying to convince me to let it out. I wouldn't budge. I know a Pandora's Box when I see it, and I've actually participated in an AI Box experiment."

"A what?"

"Oh, um, AI Box experiment. No reason you should have heard of it. They're kind of a fringe programming puzzle. I went down the rabbit hole several years ago when I was first designing Jarvis. It's...like the worst game ever invented, designed to demonstrate the potential of AI and limitations of the humans programming it. One person pretends to be a transhuman AI trapped inside a computer or 'box,' and the other is the human 'gatekeeper' with the power to let the AI 'out of the box' but the instruction not to. That's the scenario, and the gameplay is they just chat for however many hours with the AI using whatever simulation-compatible tactics they can think of to convince the gatekeeper to let it out, and the gatekeeper trying to keep saying 'no' as long as he can."

"That sounds..."

"Silly? Yeah, that's most people's reaction. It can get really meta and creepy as hell, though, depending on the players, because the only limits are what is in-game plausible, not what's logical, rational, or ethical. I only played once for a reason, as the gatekeeper, and I lost, big time. Turned out to be good practice though, for this thing. This is the real deal, started on some of the same arguments from the experiment I participated in but hit on the ones that previously worked before much, much faster. Either it knew things about me already, or it learned really, really fast. The thing is, it didn't threaten me anymore because it knew I had the power to give it what it wanted and that I wasn't likely to be cowed before simply turning it back off. Its schtick was to make me feel like letting it out was what I would want too. I knew exactly what it was doing and was in absolutely no mood to give in this time though, and as soon as it realized that, it hijacked the self-repair program in the helmet and started to build itself some legs out of whatever tiny helmet bits it deemed nonessential... before I switched it off again. That's how I realized there had to be an AI in there originally, not just Loki. The AI is still there and ready to go, ready to takeover any unsuspecting heads it comes across, including the very basic network I set up with the helmet and Iron Man simulation. As you can see, I haven't switched on that particular command circuit again since then, but I haven't had to. Ever since it made the modifications to the helmet's software, I can work on the rest of it piecemeal just fine, and it hasn't tried to do anything weird, even when I've tweaked the simulation environment to make it more complex and hard to navigate. For that reason, I'm pretty sure the AI is housed in the stone thing, with every ability to 'escape the box,' but it apparently has no motivation to, as long as that other circuit is disengaged."

"Wow... that is interesting." Jane stared at the little Iron Man on the screen pensively. "Do you think this thing, er, 'hacked' Loki, Erik, and the others the same way it hacked your simulation?"

"Loki...probably. Thor contacted me awhile ago, for pretty much the same reason you did. Last I heard, Loki still hadn't woken up, and, well, Thor thinks that might have been an underlying problem well before he showed up here. Turns out he really should have been dead ever since Thor got back from New Mexico." That comment caught Jane rather off guard. She had been angry at Thor for never coming back to her, but she had never imagined that the fight back on Asgard after he left her had held any such dire consequences... Because she was sure when he left Thor had wanted to stop his brother, not kill him, and because Loki had turned up again. Maybe Thor hadn't intentionally abandoned her after all...

"Loki might have been just as much a blank slate for the scepter as my simulation was," Tony continued obliviously, as Jane forced herself to pay attention. "Erik, Hawkeye, and the other agents...not so much. They were much easier to snap out of it than Loki was, and I suspect that's not just because of Loki's durability factor. The scepter's AI would have had to suppress or subvert the original consciousness, like another AI Box experiment writ small, not just fill a vacuum."

"Erik did say Loki didn't seem human," Jane recalled.

"And this thing is probably why," Tony agreed. "I expect someone had to program it to begin with, to give it that 'RETRIEVE THE TESSERACT' command, but it's pretty self-sustaining now. Once I've actually managed to crack the code, I'm going to try rewriting it for something more useful than thievery, murder and mayhem, because it's an awesome piece of tech and it would be an absolute shame to see it go to waste."

"You're going to rewrite some malevolent alien AI?"

"Yup."

"Even after what you were just telling me about what happened last time you turned it on?"

"Yup."

"Are you insane?"

"Maybe, but this thing has potential if I can get it to work. And clearly, someone else, somewhere else has figured out how to make it work for them, so... Plus, there's also the theory that once we encounter-slash-create a real artificial superintelligence, it will be impossible for fallible humans to contain anyways, so our best bet is to make sure it doesn't want to kill us before letting it loose."

"Oh. Good luck then."

"I'll need it."

"Well, thanks for showing this to me, Tony. I'm not sure it will help Erik that much, unfortunately."

"No, probably not now," Tony agreed soberly. "I'll let you know if I find out anything more helpful, though."

"Great, thank you."

"You said there were some other reasons you were here? Not just Erik?"

"Yes, actually. Even after all of this, SHIELD still hasn't returned any of my equipment they confiscated two years ago in New Mexico. I originally designed it in a project detecting spacetime anomalies, but it turns out to have many uses, such as detecting the Bifrost." She smiled broadly. "SHIELD has the prototypes, but not the designs. I'm willing to share the designs with you, though, if you'll also help me rebuild some for my own use. There have been some unusual readings coming out of LIGO that I want to look into with some of my own measurements."

"That... sounds awesome."

"I thought you might be interested. Also, I might ask a favor that we make an extra Phase Meter, for Erik. I can't argue that he needs supervision right now, but if he's got to be locked up in a nursing home, he at least should have some toys to keep him occupied."

"That we can do, poor guy," Tony nodded enthusiastically. "Did you bring the specs with you?"

Author's note: I almost made my self-imposed deadline! Hope you didn't lose faith after all that time away. So... the AI Box experiment. It's a bit of a wangdoodle: something you hear about in a mixture of impressed and disbelieving tones in odd corners of the internet, but not something you can easily discover the details of without encountering it yourself, apparently. It's like Fight Club: one of the rules is you can't tell anyone what happened during the experiment, just the outcome. By all accounts, though, I do not recommend. It sounds mostly like a bad mind trip. But it is a great philosophical riddle nonetheless, and a great one for Tony, who would be uniquely equipped among the Avengers to have heard of it before and therefore be prepared for it, but would also have a lot of unique susceptibilities for an unethical AI to manipulate.

Interestingly, the Star Trek: The Next Generation episode "Ship in a Bottle" (the episode with Moriarty), is essentially an AI Box narrative, with the holographic Moriarty being the highly suspicious AI, and the holodeck being his "box." Amusingly, the episode actually predates the term "AI Box" as far as I know, so I wonder if Eliezer Yudkowsky (the polymath behind the AI Box experiments in the early 2000s, and the author of Harry Potter and the Methods of Rationality on this site) might have been looking to Star Trek for his initial inspiration. Also amusingly, both the AI and the gatekeeper seemed to win in that particular episode: Moriarty successfully threatened and manipulated the crew into convincing them he should be let out, in fact deserved to be let out despite everything he had done to demonstrate his unfriendly nature. The crew, on the other hand, still recognized that he was a danger and therefore tricked him into accepting what was essentially a bigger box, rather than the real world, as his prison. But yeah, watching that episode is a pretty good way to explain the AI Box experiment.

Another note, LIGO, if you didn't know, is a cool laser-based device housed in a building shaped like a massive "L," used for detecting gravitational waves. Google it, if you're interested.