Dark Souls is full of tough boss battles, but the most difficult challenge might not be one created by developer From Software, but by one of the game’s players.

Redditor metal-crow spent the last 10 months figuring out how to create a computer program that would act like a Dark Souls player. The finished product is a tough-as-nails bastard of an artificial intelligence called “The King.”

The original game in what has become a trilogy for From Software, Dark Souls always had a feature that allowed players to “invade” each other’s games—either to help out against tough bosses, or to murder one another. As metal-crow puts it, the player-vs.-player scene for the original Dark Souls is dwindling and seems not much longer for this world, so the King, a vicious program that invades games and attacks other players, was created to be the game’s “ultimate send-off.”

Even cooler than a player-made boss that hunts and kills other players to give them the ultimate challenge is the ridiculous amount of work that went into creating it. Metal-crow didn’t have the kind of access that From Software developers do when they make bosses, like looking at Dark Souls’ source code—which meant there was no way for the King to get basic information critical to fighting, like his opponent’s location in the game. Since the King is a program and not a player, it can’t just look at the screen to see where it’s opponent is standing, so metal-crow had to reverse-engineer all of From Software’s work, testing it with a second computer to simulate an enemy player.

Metal-crow also released the King’s code as open source to the world, so other players have the opportunity to create an army of player-killing monstrosities. Sounds cool, but then again, everything is fun and games until Dark Souls births some kind of real-life human-slaughtering Skynet.

Via Kotaku.