Hey, I have an idea for a really short one-shot, I said. It'll only take a week to write, I said. I'll have it written by next episode, I said.

-TWO YEARS LATER-
('next episode' was, in fact, Ash vs Clemont at the Lumiose Gym, which should give some perspective lol)

A mountain of heartfelt thanks and gratitude to my friend who both beta-read this for me and also put up with me screaming to them about this fic for the past two years. Thanks for your patience, your support and your help! C: Any mistakes that remain are mine alone.

This is NOT a WIP fic - the story is already finished. Updates will be Tuesdays and Fridays, assuming I remember (sorry if I don't). This has been on AO3 for a few chapters now so I'm finally getting around to posting it here too lol

Hope you enjoy!

EDIT [27/6/17]: Just realised this site is eating all my section breaks which must have made it a horror to read, so as of ch 17 I'm going back through and adding them all back in :\ I trusted you, ffnet...


Chapter 1

Hrm, I just need to attach this blue wire here and that red one to the port over there…

Clemont's brows furrow in concentration as he works on his latest invention. The wires click into place effortlessly. There! Now I just close this panel like so…

After screwing the panel into place, Clemont sits back and wipes his forehead. "Okay, all done!" A quick glance at the clock tells him he's already been at this for hours and his stomach is complaining that he's skipped lunch, but his invention is almost done. This is one of the most complicated machines he's ever built so far, and Clemont has a feeling it's going to be one of his best. Well, he corrects himself sheepishly, assuming it doesn't decide to blow up in my face like the last ten or so attempts, that is

Still, there's no time to worry about that now. The future is now, thanks to science!

Hands on hips, he studies the robot before him, double-checking the blueprints one final time. Everything looks in order. "Next up is the programming!" he tells it cheerfully.

"First up is making this AI into the ideal Gym Leader…" Clemont has thought long and hard before now about what specific qualities he wants to include in his programming alongside the base programs. His fingers fly over the keys as he muses aloud. "The challenger should have about four badges…" Four badges is a good midpoint for skill… and this way my Pokémon can grow as well. Hrm, what else…? "Oh, right. You need to be kind to the challenger, but sometimes you need to be strict as well…"

Clemont inputs a bit more data – battle strategies, statistics, a learning system so that his robot can improve and become more experienced with every battle without needing his input – until he is satisfied that his AI system is perfect. Only then does he stand up and stretch, feeling cramped muscles groan before looking down at his newest creation with a pleased air. This time it'll work for sure, he can feel it!

"Now I just have to set the voice code for the recognition system…" he says aloud, tapping his chin thoughtfully. "I can always change it later, so for now, how about… 'sandwich'!"

"Clemont!" The doors to his workshop swish open and Bonnie runs in, skidding to a stop. "Hurry up, there's a challenger waiting!"

"Got it!" Clemont replies, sighing internally. He's so close to finishing! However, his duty as Gym Leader must always come first.Besides, there's the chance that this time it'll be an interesting challenge! he thinks, mood brightening as he heads towards the door. "I'm –"

His foot catches in one of the cables lying across the floor. Clemont flails uselessly in midair for a moment before gravity takes hold, sending him crashing face-first into the ground. He pushes himself up with a wince, his entire body smarting. At least I didn't break my glasses… he sighs with relief. His relief is short-lived.

CRAAAAASH!

Oh no, don't tell me–! Heart in mouth, Clemont looks back over his shoulder to find his precious robot sprawled across the floor. "Ahh! Clembot!"

He rushes over to pick up the fallen robot and lean him against the platform's edge carefully, running his hands over smooth metal to check for any damage. Aside from one small dent, Clembot appears to be fine. His worry leaves him in a huff of breath.

"What have you made this time?" Bonnie asks, peering over his shoulder curiously and he remembers that he hasn't yet told her about his plans for this particular invention of his.

"It's a robot to help me out with the Gym," he explains. "So I can have time to do other stuff as well, since we have so many challengers nowadays…" Clemont smiles at his creation, reaching out to brush away some dust from Clembot's encounter with the floor. "I'm the Gym Leader, Clemont. Please bear with me from today on," he tells it quietly.

"Wow," Bonnie breathes. "That's brilliant, bro! You made it from scratch?"

Clemont flushes a little with pride. "Yes. His name is Clembot."

Bonnie makes a face at him. "Geez Clemont! You can't name it after yourself! That's so lame!"

His cheeks flare pink. "Well, what would you call him then?" he retorts. Bonnie actually appears to give this serious thought, holding a finger to her chin as she 'hrm's.

"How about… Ash?"

"Ash?" Clemont repeats. "Why that name?"

"Maybe if we pre-emptively call him Ash, he won't explode and turn into ash!" she explains brightly. Clemont just buries his face in his hands. He's sure his things don't explode that frequently, do they…? Bonnie pats him on the back sympathetically.

A few more moments of silence, and then –

"Ah!" they both suddenly exclaim in unison, leaping to their feet. "The challenger!"

/\/\/\

His strategies are sound and his Pokémon battle extremely well; the challenger and his Pokémon, less so. Clemont sees off the previously hopeful Trainer with an invitation to try again later, but sighs when the Trainer is gone. It's not that it wasn't a good battle, but so many of his Gym matches nowadays just have no spark to them, no opportunity to learn.

"Thank you for your hard work, Heliolisk," he tells the Pokémon at his feet, kneeling down to pat Heliolisk's head before returning it to its Pokéball.

"Clemont!" Bonnie comes running up to him. "You did it! Well done!" He barely has time to thank her before she's tugging on his arm, almost making him lose his balance and fall over. "Now we gotta go test your robot, come on!"

He laughs and stands up. "It's not going anywhere, Bonnie." His sister doesn't appear to have heard him, bouncing around him in excitement. Clemont isn't going to lie; his heart is starting to pound with anticipation as well. "Let's go!"

Somehow they manage to carry the robot down to the Gym arena – well, Clemont manages to carry it down since Bonnie is too small to carry its weight, but she helps her brother navigate the stairs and corridors between the Gym and his workshop. They set it down in the middle of the battlefield and stand back, looking the robot over. The metal figure is not that much bigger than Clemont.The design may be a little basic, the inventor concedes , but it's functional. I can always improve it later if I need to. The most important thing is that it works!

"Amazing!" Bonnie cries, jumping and clapping in excitement as she looks up at her brother's newest creation. The robot looks a lot more impressive standing here than he did sprawled out over the floor of her brother's workshop. "Quick, activate it!"

"Very well!" Clemont replies. "Ah – Clembot, activate!" He can see Bonnie making a face at him out of the corner of his eye and winces. It's not that bad of a name, surely?

Before them, the robot blinks and straightens. "Welcome to the Lumiose Gym!" it announces.

A wide grin breaks across Clemont's face. It's working! he thinks excitedly. Right, first let's try Pokémon battles…

"I'd like to have a Gym match," he requests in a clear voice.

"Sure!" is the excited reply, making Clemont blink. Robots can't get excited… can they? Before he can contemplate it further, the robot manages to look sheepish, raising a hand to the back of its head. "Oh wait, I'm meant to ask how many badges you have…"

Clemont frowns. This response is unexpected, in more ways than one. "Huh? Um, I don't have any badges…"

It folds its arms in a surprisingly human gesture. Clemont gets the feeling the robot would be frowning, if it had eyebrows. "Mmmm, this is a problem then," it mutters, more to itself than to the two confused siblings.

"Um, sorry, what do you mean?" Clemont asks, bewildered. As far as he can remember, there's absolutely nothing in the code he wrote that would make it act like this!

"You're meant to have at least four badges before you can challenge me," the robot explains, still looking as troubled as a robot can possibly look. "But I really wanna battle…!"

Clemont blinks. "Huh? I only put in that I'd like them to have around four badges, if possible…" he trails off, watching the robot's posture brighten. Its eyes glow brightly for a second.

"Oh, really?" it asks excitedly. "Awesome! In that case, let's battle!"

Clemont and Bonnie both watch in bemusement as the robot hurries off to the Gym Leader's side of the field. Part of Clemont notes absently the way its stride sometimes wobbles and starts to plan out what adjustments are needed to fix it; the rest of him is still feeling off-balance by just how… excited the robot seems to be.

"Ah, Clemont…?" Bonnie asks, as the robot starts patting down its chest plate. "Are you sure it's working okay…?"

"I… think so…?" he replies honestly. Over on the other side of the field, the robot apparently can't find whatever it was looking for and jogs back towards them.

The reason soon becomes apparent when he stops in front of them. "I don't have a Pokémon to battle with…" it says. Again, there's that strange note in his voice that Clemont would swear is disappointment, not to mention the robot's almost mournful air.

"Oh, yes, my apologies!" Clemont says, deciding he must be imagining it. Considering he doesn't think he's slept much the last few days, it's quite possible. "Here, you can borrow one of mine for now." He holds out Magneton's Pokéball and the robot takes it carefully.

"Thanks!" Its eyes light up again and it bounds back to his side of the gym field, Clemont's Pokéball in hand. Clemont watches it go thoughtfully, still feeling a warm spark of pride that his invention seems to be working so far.

"Come on Clemont, you've got a battle to win!" Bonnie calls out from the sidelines and Clemont blinks. Oh, right, the battle!

He takes his place on the opposite side of the field. It feels a little odd to be standing here as a 'challenger' when he's so used to being on the other side of things, but it's an interesting new perspective. Clemont already knows what Pokémon he's going to battle with. "Go! Heliolisk!"

"A Heliolisk!" The robot exclaims as Clemont's Pokémon emerges, looking ready to battle. "Alright then, here's my Pokemon!"

Magneton bursts from its Pokéball and swirls a little in mid-air, confused as to why it's facing its own Trainer in battle.

"It's just a practice match, Magneton! That's my Gym Leader robot, please listen to it like you would me! And come at me with all your strength!" Clemont calls. The magnet Pokémon buzzes happily in understanding and swirls down to hover beside the robot. "Pleased to meet you, Magneton!" the robot tells it. "Let's do our best!" Magneton twirls in agreement.

Clemont's heart is already starting to pound with excitement. Right, it's time to test out the battle strategies I programmed and see if it can keep up!

The robot wastes no time in calling an attack: "Let's go! Thunder Shock!"

A Thunder Shock as a way of greeting, Clemont thinks in satisfaction. That's a procedure I programmed! Still, there's a long way to go to win yet and Clemont has no intentions of losing. "Heliolisk, neutralise it with Mud Slap!"

Heliolisk flicks his tail and sends dirt flying towards Magneton, just as the magnet Pokémon releases a bolt of lightning. The electricity slams into the dirt and discharges without making contact with Heliolisk, the Thunder Shock cancelled out.

That was a good opening exchange. Let's see what happens if I do this...! "It's our turn! Dragon Tail!" Clemont calls. Heliolisk leaps into the air, tail glowing with green scales as it sweeps down towards the other Pokémon.

"Magneton, dodge!" the robot calls. For a split second, Magneton separates into individual Magnemite, letting Heliolisk's tail pass through harmlessly before magnetic force pulls itself back together. "Good work! Now, while it's recovering! Thunder Shock!"

Clemont can see that Heliolisk isn't going to be able to dodge in midair as easily as Magneton had done earlier. "Heliolisk!" he yells in worry as the lizard Pokémon takes a direct hit from Magneton's attack, crashing to the ground. "Are you alright?"

Heliolisk leaps back onto his feet with a noise of affirmation. Clemont breathes a silent sigh of relief – an electric attack wouldn't have done much damage to an electric Pokémon, but even so – and studies the two figures opposite him. More specifically, he studies his robot. So far, it's holding up both physically and strategically; Clemont can't help the small smile of pride that appears. It's working! he thinks gleefully. His AI is picking good countermoves to everything he's thrown at it so far.

"Magneton! Follow up with Flash Cannon!"

Flash Cannon uses light energy to attack; it's Magneton's most powerful move. Unfortunately for his opponent, Clemont knows just how to counter it. "Use Mud Slap to blind it, please!"

Mud splatters across Magneton, preventing the Pokémon from being able to see. Furthermore, the mud blocks the light shining across Magneton's steel body, stopping it from generating light. Magneton spins around frantically, trying to shake off the mud. It's an easy target. "Dragon Tail!"

Magneton crashes to the ground. Internally he winces, mentally apologising to his Pokémon for causing it damage. Still, he needs to make this battle hard, to see what his robot is actually capable of.

"Nice one, Clemont!" Bonnie calls from the sidelines.

Clemont chuckles at the robot's sound of dismay. "You'll have to do better than that!" he admonishes. There's something odd about this battle that Clemont can't really put his finger on. Then it dawns on him – he's having fun.

"Magneton, can you still battle?" the robot asks. Magneton recovers and floats back up, buzzing determinedly. "Great! Let's give it our all!" the robot declares. "Flash Cannon!"

Again? Clemont thinks in dismay. But it clearly failed the first time around… "Mud Shot!" Maybe he'd congratulated himself too soon; it looked like his AI wasn't learning from previous mistakes. Still, until now it had done a good job, so with a few more tweaks maybe…

"Quick, Magneton, dodge and use Mirror Shot!"

What?

The air in the Gym flashes brightly, Magneton's steel body catching the light and sending it back threefold. Heliolisk skids to a stop, blinded by the light. Magneton's Mirror Shot isn't usually this bright! Clemont thinks, shielding his eyes with an arm and squinting through his glasses. The light seems like it's coming from all directions –

His eyes widen. They're using the light tubes around the Gym to reflect and multiply the light as well!

"Now, Magneton!" Clemont hears the robot call, although he can't see a thing. "Flash Cannon, one more time!"

With all this light, Flash Cannon will get a massive power boost! "Heliolisk, dodge it!"

Even as he says the words, he knows it's in vain. How is Heliolisk meant to dodge an attack that comes from all sides? None of the strategies I programmed were anything like this! Clemont thinks in shock, hiding his face as the light intensifies around them, signalling Magneton charging his attack. What kind of a combination is that?!

Heliolisk cries out and the light fades. "Heliolisk!" Clemont yells the second it doesn't hurt to open his eyes. His Pokémon gets up with difficulty, staggering to its feet.That last attack did a lot of damage… Clemont frowns to himself. I don't think Heliolisk can take another hit like that!

"Let's finish this! Tackle!" the robot calls.

If you're going to attack from all sides, then so will I! "Parabolic Charge!" Clemont counters.

Heliolisk's frill flares out as he lets loose a ball of lightning. Magneton's Tackle carries it almost directly into the lightning's path. The magnet Pokémon lets out a trilling cry before it crashes into the ground in a faint.

"Magneton is unable to battle!" Bonnie announces. "Clemont wins!"

Battle over, Clemont dashes out onto the battlefield to drop his knees beside the fallen Pokémon. "Magneton! Are you alright?"

He breathes a sigh of relief when Magneton wakes up and buzzes at him happily. "I'm glad. You battled really well!" Heliolisk bounds up beside him, health recovered by the Parabolic Charge's effect. "You did a great job as well," Clemont tells his Pokémon with a smile. "I'm proud of both of you."

A shadow falls over the three of them. Clemont looks up to find his robot standing over them and scrambles to his feet. "I lost, but that was really fun!" it tells him, eyes glowing. "Your Heliolisk is really strong!" To Clemont's surprise, the robot kneels down and reaches out a hand to pat Heliolisk before looking towards Magneton floating beside him. "Still, Magneton and I gave it our all; we'll just have to do even better next time! Right, Magneton?" The magnet Pokémon makes an agreeing noise.

His robot stands up and holds out a closed fist. "Here, you earned this." Clemont's hand rises automatically in response, catching the object that it drops into his palm. It's a Voltage Badge, he realises with some bemusement. Well, I did request a Gym battle, I suppose…

"Ah, thanks…?" I don't really need my own Gym's badge though…

"Let's battle again sometime!" it says enthusiastically. Clemont smiles at the robot's eagerness, although he knows he'll have to do some reprogramming, not to mention figure out where such an unorthodox combo came from. For now, though, it seems his invention is a success.

"Clemont!" Bonnie appears next to them. "That was amazing!" Her attention is caught by the shiny badge still sitting on Clemont's palm and she giggles. "Oh hey, you got your own badge."

The robot tilts his head to the side, looking confused. Clemont realises that he hasn't introduced himself to it yet – although surely the recognition software should've kicked in? – and closes his hand around the badge, smiling up at his newest invention.

"I'm the Gym Leader, Clemont," he tells it. "And you're the Gym Leader robot…" he glances over at his sister. She raises her eyebrows at him, mouthing 'It's a lame name!'. Clemont sighs internally. Well, since I have no other ideas… "Ash. Your name is Ash from now on."

"Ash," the robot repeats. "I like it! Sounds good."

"And I'm Bonnie, Clemont's younger sister!" she pipes up, raising a hand. "Pleased to meet you!"

"From now on, you'll be helping me out at the Gym. Please bear with me!" Clemont holds out his other hand.

Ash's eyes light up again and Clemont suddenly wonders if that's the robot's way of smiling. He doesn't get time to wonder about it too long, however, before his hand is clasped in a firm grip. The metal of Ash's hand is cool against his skin. "Yeah!" Ash replies enthusiastically. "I look forward to working with you!" The robot glances down toward Bonnie. "It's good to meet you too, Little Sister Bonnie!"

Bonnie laughs. "Just 'Bonnie' is fine! And you can just call him 'Clemont'!" She tugs on Clemont's jumpsuit to get his attention. "You really outdid yourself on this one, Clemont!"

It's Clemont's turn to laugh, embarrassed. "Thanks… I've still got some adjustments to make though, so Ash, can you go back to my workshop please?"

"Sure." After glancing around, Ash turns around and starts heading towards the stairs that lead to his workshop, waving to Magneton as he goes. Clemont blinks in surprise – what was that? – as Magneton buzzes happily next to him.

"That was a really exciting battle, wasn't it, Clemont?" Bonnie asks from beside him, bouncing on her feet.

"Hrm?" Clemont replies absently, watching the robot start to climb the stairs. His eyes flick down to the badge still in his hand and then back up to Ash thoughtfully. "Yeah, it was…"

He just needs to figure out what in the world happened in that battle.

/\/\/\

Up in his workshop, Clemont's fingers fly over the keyboard as he searches through Ash's code for abnormalities or errors. He hopes that he can use whatever he finds to figure out exactly how Ash had come up with such an unorthodox – and unprogrammed – move combination. So far, however, the inventor has found absolutely nothing.

"Nothing here either…" he sighs. That can't be right, there's got to be something! Pushing his glasses further up his nose, Clemont decides to look elsewhere for the glitch. "I'll try the battle logs, there might be something in there…"

Unfortunately, scrolling through the logs gets him no further than he was before. It's easy enough to track the robot's logic at the start of the battle – Clemont recognises a lot of it as strategies he himself wrote into the code. But after that…!

This bit here makes sense… Clemont thinks, studying the screen intently. That's the first Flash Cannon attack and here's my response with Mud Slap…

He frowns. According to the data here, Ash's AI had decided using Flash Cannon a second time was too risky and blacklisted the move… but then the robot had gone ahead and used it anyway? That's definitely odd. Even more troubling is that there isn't any sort of record here to explain how or why Ash had decided combining Mirror Shot and Flash Cannon would work. There's absolutely nothing in the code that should allow anything like this!

Clemont sits back with a sigh. "What am I going to do with you?" he muses quietly, looking up at the still form of his robot hooked up to the computer system. His invention works, but is it safe to let it run the Gym for him for a while? It would be terrible if something happened during a Gym battle… but Ash had seemed so excited about helping out…

That's another thing, Clemont thinks, leaning back on his hands and staring out the window at the city nightscape below. How in the world does a robot get excited about anything? I don't remember programming that either.

His thoughts are interrupted by a beep from the computer. Clemont sits up straight again, curious as to what the computer has found. That's weird, he thinks, leaning in for a closer look. None of these files should be locked. This could be what I was looking for!

When he tries to access the file, however, the screen beeps angrily at him:

*ACCESS DENIED.

*VOICE CODE REQUIRED.

"A voice code?" Clemont repeats aloud, scratching his head. "Oh wait, wasn't it something like… 'Sandwich'!" he says triumphantly, only to wilt when the computer beeps angrily at him again. "What? It has to be 'sandwich'!" Clemont wails back at it. The computer beeps at him again. He wilts further, face sinking into hands. This is bad, I don't know what else it could be!

He sighs. "Well, I guess it's not causing any harm to leave it for now…" Clemont unplugs the cables connecting Ash to the computer and closes the robot's back panel. I'll just have to keep a close eye on things for a while, I guess…

The lack of sleep of the past few days finally catches up to him in the form of a wide yawn. Clemont stretches and stands up, patting his robot on the head gently as he leaves. "Good night, Ash," he tells it as he switches off the lights and shuts the doors behind him, hiding another yawn behind his hand.

After he's cleaned his teeth and said goodnight to Bonnie, Clemont crawls into bed. Despite being unable to find anything in the code to explain the abnormalities during the battle, Clemont still feels the glow of pride and success that his invention seems to be working properly. He looks down at his hand, unfurling fingers to reveal the Voltage Badge that Ash had handed him earlier. The sight of it brings a quiet smile to his face and he reaches out to set it carefully on the bedside table, next to his glasses, before he switches off the lamp.


Thanks for reading! :D