Episode 20: Racing

episode-20-racing“You done there, Jaxon?”

Jaxon looked up from the library mech’s propeller. “Yeah, pretty much. It might be a little better if we rebalanced it now that the wiring’s changed.”

The de-facto captain of Jaxon’s audition team shook her head. “Better to leave it now. We’ve only got a few minutes until testing starts. Don’t want to break it before then.”

“It’ll only take half a minute to balance, all going smoothly,” someone objected. “That leaves plenty of time for damage control.”

“Yeah, and what do we gain if we take the risk and it works out?”

“Not a heck of a lot,” Jaxon said. “It might not even technically need rebalancing.”

“I’d do it anyway, but I’ll bow to the wisdom of experience. Gives me a chance to stretch, anyway.” The dissenter stepped back from the lab bench and yawned widely. “It feels like years since lunch.”

He wasn’t the only one looking forward to supper, Jaxon thought. A regular day at the academy was energy-intensive, but at least there were breaks between lectures and classes that didn’t take quite so much work. Today, even lunch had been more like a planning session over a meal than the usual hour of free time.

“Does this mean we’re pretty much done?” Jaxon asked. “We just turn it on in the library and hope for the best, right?”

“All going according to plan, yes,” the captain said, “but if something goes wrong, we’ll probably be allowed to make emergency repairs.” She pulled a tiny toolset out of the pocket of her gown. “You learn to keep one of these on you.”

“Or you rig up your notebook to modify the software on the fly,” said the last group member. “Even the A-leaguers pull stunts like that between rounds.”

The captain’s eyebrows rose. “Modding depending on what you’re facing is just good tactics, but it’s hard to do on the fly. I suppose you can think of emergency repairs as the very first step in that directions if you like. It’s not ‘even the A-leaguers’, though.”

A buzzer went off, reverberating through the room. Mike stood up at the front. “Alright folks, that’s time. Please make sure your benches are tidy and then head on to the library.”

Jaxon’s group only took a minute to pack things back into place: that was why they hadn’t rebalanced the propeller, he supposed. On the way out they passed Ken scribbling frantically in his notebook. A few tables later Buhle was watching dubiously as one of her groupmates finished attaching something to their mech. The A-league captains were keeping an eye on those tables too, Jaxon noticed. He guessed that whether or not you could finish on time might be part of the audition. It was actually a pretty critical skill.

The library issue desk had been divided into shoebox-sized squares. Jaxon, as the group’s youngest member, was given the honour of placing their mech in one of the start points. It seemed a little silly, but he was as proud of that mech as just about anything he’d ever done and appreciated the task. Just placing it on the counter felt flat, so he called out “Go team!” before heading back to the crowd. Somebody cheered in response, although he didn’t think it was one of his groupmates. He didn’t care: this was exhilarating.

They’d built a mech from the ground up. It flew and he was pretty sure it wouldn’t fly into anything. Even if it did fly into something, they’d spent a lot of time developing an elegant exit strategy and demonstrating it to Mike’s satisfaction. Whatever happened next, he thought, they’d achieved a heck of a lot over the course of the day.

It took a few minutes to position all the mechs. Then Mike gave the signal to power up remotely. Jaxon had to squint to see their mech’s lights come on. Some models immediately started whirring and rose into the air, so that the neat line became a lot more straggly. One mech began circling somewhat erratically. Another crash landed almost immediately.

“Blighted Earth!” Somebody was unhappy about that.

Mike was watching from behind the issue desk. “You may reclaim your mech and make emergency repairs,” he announced. “However, we’ll be continuing without you, so it had better be quick.”

A lanky young man rushed forward, gown billowing, to grab the mech.

“As you know,” Mike continued, “The signal beacon is located somewhere in the stacks. We’ll be turning it on in three, two, one, now!”

A few mechs rushed forward immediately, but most had at least a little lag. Jaxon waited anxiously for their model to finish calculating and start flying. He couldn’t imagine how people had made their lag times so short.

That question was answered, at least in part, when one of the early starters flew into a bookshelf and began a shutdown routine.

“You may reclaim your mech and make emergency repairs, if you wish,” Mike announced.

“What could they change?” Jaxon asked his neighbour. “Won’t it just fly into something again?”

“Depends what went wrong. They might’ve just forgotten to activate something, say. Look, there we go!”

Their mech rose and, to Jaxon’s surprise, began to catch up with the scattered array of mechs already in the air.

“She’s an efficient little thing,” his neighbour said with some satisfaction.

A few moments later the mech that had originally crashed relaunched and began wobbling in what seemed to be the generally correct direction.

“Good on them to get her back in the air. Not the easiest thing, under pressure.”

Jaxon nodded fervently. He seriously hoped their mech wouldn’t go down now. The possibility of his careful wiring suddenly failing didn’t bear thinking about. But, if anything, the mech was slowly gaining on its competitors.

Something clanged and a collective gasp went up from the crowd. Two mechs had collided: one was now emitting electric blue sparks, but to its builders’ credit still managed to land with some control. The other seemed to be continuing fine. “You may collect your mech for repairs if you wish. Both groups involved in the collision please send a rep to me immediately,” Mike said.

The frontrunners were now out of sight between the bookshelves. Jaxon had lost track of his group’s mech in the excitement of the collision, but he didn’t think it was still visible.

“Don’t think we’ll win, but we’re doing solidly,” Jaxon’s neighbour said. “And we did some fancy weaving work getting ahead there, which compares favourably, I think.”

“It seems very orderly and controlled,” Jaxon said.

“That’s really the trick. If you don’t know exactly what a mech’s going to do, you can assume that sooner or later it will do the opposite of what you want. And that’s if you’re lucky.”

Jaxon shivered. It seemed far too easy to mess up something very fundamental. He’d never really thought about how carefully messenger mech and cleaner mechs and other everyday things must need to be tested.

“Team number twelve, your mech has arrived.” Mike was reading off a notebook connected to the library system. “Team three, you’re in. Team five has arrived.”

Jaxon cheered. Third place was exciting and he’d been part of it. The day’s work had stripped him of any illusions of being good enough to play in the A-league, but he knew that learning more was going to be exciting.

Find it on Wikipedia:

Episode 19: Audition

episode-19-audition“Do you think I’m allowed to take books?” Melinda flipped through her carefully organised collection of microchips. “Or would that be considered cheating?”

“I’m sure they’ll tell you.” Bryony sat cross-legged on her bed, painting her nails lime green. “If you’re not supposed to have them, you can just bring them back or put them away or whatever. It’s an audition, not a final exam.”

“Yeah, I suppose so.” Melinda sighed. “I don’t like this state of not knowing how things are going to work. I’ll be much happier once I can actually do something.”

Bryony shrugged. “You could work on your modelling project if that makes you happier.”

“I wouldn’t be able to concentrate! Not on the morning of my first ever audition for a robo-duelling team! It starts pretty soon, so I guess I’ll go see if anyone else is waiting in the lab.”

“You make it sound so dramatic, Melinda. Don’t forget to have fun.”

“Don’t worry, I won’t!” Melinda grinned. “Have a good day. I’ll see you later.”

As Melinda had anticipated, there were already a few students scattered about the laboratory, waiting for the auditions to start. Buhle was the only one Melinda recognised, so she made her way over to her classmate. “All ready?”

“I guess so. I’m not really expecting to get into an A-league team anyway, so this is more of a learning experience than anything. But I couldn’t concentrate on my project, so I thought I’d see what was going on here.”

“I hear you.” Melinda flicked through her book collection, using up nervous energy as she spoke. “I don’t think there’s a chance I’ll be on an A-league team, but I still kinda feel like I need to prove myself. Like, I’m not imagining I’ll make it into a team, but it would be nice to make people think I could get there someday.”

Buhle laughed. “You overthink things, Miss Mirreme. Did you bring Poly?”

“In my pocket. I wasn’t sure if it’d be allowed.”

“Well, it’s certainly allowed before things start and some less obsessive conversation might not be a bad thing.”

“Humph.” Melinda took the mech out of her pocket and toggled the power. “Buhle prefers your company to mine, Poly.”

Poly’s gears whirred. “Today is the day of the robo-duelling auditions.”

Buhle groaned.

“I appreciate the compliment, Buhle,” said Poly.

“Now you’re all out of order,” Melinda said. “That sounded more like a groan than a compliment to me.”

“Commencing system scan and error diagnosis.” Poly sat and whirred.

“What happened?” Buhle asked.

“I must have set of the self-consistency checking algorithm, but I’m not sure how. It’s usually fine to say that Poly’s muddled.” Melinda watched the mech for a few moments. “It’ll probably work itself out.”

“All systems go,” Poly reported. “Nothing detected as out of order, Melinda. Would you like to check manually?”

“Ohhhh. No that isn’t what I meant, Poly, but I guess that was a correct response.”

Buhle looked from Poly to Melinda. “What happened?”

“I said Poly was out of order, meaning that the replies weren’t keeping up with the conversation, but ‘out of order’ is a special key phrase which starts a scan.”

Buhle laughed. “I’m relieved I didn’t break anything with my request then.”

“Of course you didn’t, silly.”

“Ladies and gentlemen, your attention, please.” The laboratory had filled up and Mike le Roux was speaking from the lecturer’s platform. “Welcome to robo-duelling auditions! As you know, there are a very limited number of A-league places available, but our goal is to make this a useful and educational experience for everyone, regardless of where you eventually find a team. To that end we have persuaded Preveshin Moodley, whom most of you should know from the library, to let us assemble his new mechs.

“Let me emphasise right from the start that these mechs belong to the library and you are not allowed to make irreversible changes to them. That said, standard assembly of these mechs is non-trivial and we don’t expect most of you to be able to do it without some assistance. Even if you’re sure about what you need to do, please check with one of us before doing anything significant.” Mike indicated a group of older students standing near the doorway. “As your prospective captains, we want to be involved in how you’re solving the problem, not just comparing your solutions.

“You have a bit more leeway when it comes to the software side of things, as we will overwrite all the mechs with the standard software after the event anyway. We still want you to be talking to us about what you’re doing, though, so please talk to us about your algorithms and especially your testing. We don’t want any accidental berserker robots.”

Melinda giggled along with the rest of the group, even though she knew he was perfectly serious. Testing software properly was hard. Finding out that you hadn’t tested properly could easily end badly.

“Now, specifics of your task. The mechs are supposed to take instructions for archiving purposes and they’re summoned by a radio frequency signal that we’ll give you with your equipment. At the end of the afternoon — we’ll decide on the exact time as things go — we’re going to take all the mechs to the library and set off the signal somewhere in the main library hall. Your mech needs to arrive at the signaller as quickly as possible. You can think of it as a race, but there’s a lot more to today than winning that race.” He paused and looked around the audience.

Melinda’s mind was already teeming with ideas on how to direct a mech along a previously unknown route. It was a pretty standard problem, but she’d never worked through it for herself.

“You can find your team allocations and locations on the noticeboard outside. You may not work with anyone outside of your team, but otherwise make use of whatever resources you have available. To minimise disruption to the library, we’re giving you all the pertinent measurements with your building sets. If you need anything more, it’s probably in the Academy records. Remember to ask before you start putting anything together! Alright, that’s it. Ask when you think of more questions.”

Melinda joined the general rush to the noticeboards. A few minutes later she was back in the lab, at one of the corner tables. Two of her groupmates were happily exploring the mass of parts that were supposed to eventually form a mech. The third had agreed that she should look for pathfinding algorithms while he spoke to the organisers about firmware specs. Melinda wasn’t quite sure what the issue was there, but having been assured that having a pathfinding algorithm to plug in would probably be useful, she was looking at that.

The first thing she found in her big book of algorithms was called Dijkstra’s algorithm. It took a while to decode the mathematical structure of the algorithm into something that related to the real world. Melinda covered several pages of her notebook.

All the space that mattered in the problem was divided up into zones. Each zone connected to all adjacent zones and the connections were given values related to the physical distance between the zones. Dijkstra’s algorithm was a set of rules for finding the shortest path between two zones, given the values of all the connections between them. Melinda wasn’t sure she’d found the perfect way of using it, but she was quite proud of herself for coming up with something that might be useful at all. As she was checking that she could follow the algorithm through on her picture, one of the A-league captains arrived to peer over her shoulder.

“So you’ve found Dijkstra. That’s good. If you‘ve got time to get fancier, have a look at the ay-star algorithm. It’ll help with bookshelves.” She grinned and walked on.

“Uh, thanks.” Melinda wasn’t sure if that was a good sign or not.

“Don’t worry, Amillah’s like that,” one of the tinkerers at the end of the lab bench said. “She can always find a way to improve things, but if she was actually worried about you she would’ve stuck around much longer.”

“Okay, that’s a relief. So do I have time to look at the more complicated one?”

“There’s definitely still time to look. You can’t go too far into implementational details until I figure out how we’re going to interface with the system anyway. I’m hoping we can just load up some library and interact with that based on understanding the algorithm. We can worry about speed ups if we get there. Frankly, just getting the thing running will be an achievement this year. But if Amillah thinks that ay-star algorithm will help, have a look at it.”

“Awesome. I’ll just make sure I’ve got this one sorted and do that.” Melinda went back to tracing out the steps of her algorithm.

wikipedia-logo Find it on Wikipedia: