Episode 22: Optimisations

epsiode-22-optimisationsMelinda was idly flipping through The History of the Academy, which she’d found on the common room shelf. “Wow, that’s ridiculous.”
“What’s ridiculous?” Bryony enquired from behind the mass of papers spread across her desk.
“Apparently back on Old Earth, whether or not you could actually do the work was only a secondary requirement for getting into their equivalents of our Academy. It says as little as five percent of some populations would even be considered on the basis of ability.”
“That’s tiny! What were the primary requirements, then?” Bryony turned her chair to face Melinda.
Melinda ran her finger down the text. “Depends, I think. Money, apparently. I can kind of see that; they say you had to pay for everything on Old Earth. Some people think that was better, I think. Must’ve been horrid if you were the smartest kid around, but you couldn’t afford to keep learning. And it could depend on where you were born.”
“To be fair, we have that too. Everyone in our class was born on Mechatropolis.”
“I never really thought about that. But it’s not like other people aren’t allowed. And — this is beyond ridiculous — some of them only let you in if you had the right skin tone. Apparently it was quite common.”
“If you had what?” Bryony tilted her head so that her braids swung out beyond her chair.
Melinda shrugged. “The right skin tone. Don’t ask me. It says it had something to do with culture, whatever that means.”
Bryony flicked at her braids absentmindedly. “It makes you think. I wonder if we do things that seem perfectly normal, but would sound completely unfair to someone else. Probably you ought to think about that every once in a while.” She pulled out a bright pink pen and made an addition to her to do list. “Let me know if you have any ideas on it. But aren’t you supposed to be going to play with your robots now?”
Melinda looked at her watch. “I’d better run, thanks Bryony. See you!” She grabbed her bag and ran out into the corridor.

Because she’d run, she arrived at the lab out of breath, but just on time. It wasn’t quite how she’d planned to meet her new robo-duelling team, but it would have to do. She gulped down some air, tightened her ponytail, and tried to walk nonchalantly into the laboratory.
“Ah, and that’s all of us.” A heavyset young man ran his hand over the black stubble on his equally dark scalp. “I think we can start now, although we are technically thirty seconds ahead of time. My name is Mandla Buthelezi and I will be the captain of the team this year. I tend to be more interested in the hardware side of things, but of course I’ll be looking at a bit of everything this year as captain.
“Suppose each of you gives a short introduction too. We’ll start here.” He pointed to Verashni, the only person Melinda recognised in the group. Melinda didn’t hear much of Verashni’s introduction, but she imagined it involved her passion for taking things apart. By the time Melinda had found a lab stool and a place at the table, the fourth member of the team had just finished introducing himself.
“Last one.” Mandla gestured to Melinda.
“Uh, hi, I’m Melinda. I mostly do software stuff. Like Poly.” She gestured to the mech, which had found a perch on the edge of the lab bench.
“It drives me crazy,” Poly said. “Literally.”
Verashni giggled.
“Nice.” Melinda’s neighbour leaned over to inspect Poly. “Your build?”
“I just sorta spliced some stuff into the default software. There are some really cool algorithms in the public libraries.”
“Getting anything to talk halfway decently is a fine job.”
“I know how to stop talking too, which is more than can be said for some humans.”
“Poly! You’re not supposed to insult people.” Melinda turned to apologise, but the whole table was laughing.
“Sometime we have to sneak Poly into lectures,” Verashni said.
“I don’t think that would end well.” Melinda could all too easily imagine one of the Mathematicians confiscating Poly for being a disruption.
“In any case, we are here now to discuss robotics. Not just any robotics,” Mandla added, “but robo-duelling. We have a standard issue B-league robot, so if we don’t do anything we’ll get into the ring, but we won’t last long.
“The exact model that gets handed out changes each year, so we’ll have to get accustomed to what this one can do before we begin to make improvements. Here are the manuals.” He tipped the microchips onto the lab table. “And here’s the robot.” He pulled a controller out of his pocket and flipped a switch. From the far end of the lab, a mech about the size and shape of a large bucket came rolling down the aisle. It squeaked as it came, prompting somebody to produce an oil can almost immediately. When it reached the table it stopped for a few seconds, before rolling on to where Mandla was sitting.
“As you can see, it’s essentially functional, but we have some understanding and improving to do, beginning with that can of oil. For now, I’m just going to encourage you all to play around with it a bit. We’ll get into serious strategy later.”
Melinda wasn’t sure what to play around with — the possibilities for the robot seemed endless — so she figured she’d start with the manual. She grabbed one of the microchips and in a minute was the only one left at the table. Mandla seemed surprised, but once she’d assured him she was happy, she was left to read in peace.
She skimmed through the whole manual, although she didn’t even look beyond the headings of the hardware sections. She got drawn into the section on the pathfinding algorithms the bot used in different situations. There was plenty Melinda would have struggled to come up with, but plenty she could think of improving too. Somebody had done some careful design there, she thought. She looked up from the manual when she heard Verashni complaining.
“I have oiled that! I don’t know why it insists on turning so slowly, but I can’t make it any slicker.”
“But it’s not turning slowly for mechanical reasons,” Melinda said.
“Hmm?” Verashni turned to face her, hand on hip.
“It does about a bajillion checks before starting in a new direction. They can probably be trimmed down and optimised, but not with an oil can. I’m not sure which ones are important, though. Look here.” She flipped to the list of checks in the manual.
Verashni came and peered over her shoulder. “Dear stars, that’s a long list. I don’t know what half those things are. But you think you can speed it up?”
“Should be able to.” Melinda passed the manual around the group. “There’s a bunch of redundancy that doesn’t seem particularly helpful in most of the code.”
“Yeah, they usually do that. We have to rewrite a bunch of stuff every year. You can see which teams don’t in the ring.”
“I bet you can, if they’re moving this slowly,” Verashni said.
“Well, looks like you’ve found our first assignment,” Mandla said. “Get that code tidied up.”
Melinda pulled out her pen and opened her notebook to a blank page. “I’m on it!”

wikipedia-logo Find it on Wikipedia:

Facebooktwittergoogle_plusredditpinteresttumblrmailFacebooktwittergoogle_plusredditpinteresttumblrmail

Episode 21: Doubts and Uncertainty

episode-21-doubts-and-uncertaintyKen was in the lab early, having fled the lunchtime robotics conversation. One day of trying to wrangle mechs into shape without even knowing what that shape should be had been more than enough for him. Even Kelly Jean, who usually managed to make herself unwelcome, had joined the group eagerly awaiting the B-league team lists. Ken pulled his notebook out of his bag and dropped it onto the bench with more clatter than was strictly necessary. He flipped through to the notes Mathematician Dustborn had given him for his modelling project.

Apparently modelling an atom was more complicated than anyone thought a first year student could do on his own. Ken had insisted that he was willing to put in extra work to figure it out, but Mathematician von Rejk had told him that he needed to simplify if he wanted to be able to finish and sent him to Dustborn. Mathematician Dustborn had suggested that he model just a single electron in a molecule of the chemical benzene. Ken sort of understood why this was simpler. Most of the electrons in the molecule interacted with all the other pieces in a complicated way — which was why modelling an atom with lots of pieces would be difficult — but the electron he was modelling just sort of floated around the outside, for reasons he didn’t fully understand. Looking at the equations he was trying to show made sense, Ken admitted to himself that he was relieved von Rejk had made him take a simpler route. There were derivatives everywhere and solving equations with derivatives was much harder than the regular kind. Especially when they were partial derivatives instead of the regular kind, which was another thing Mathematician Dustborn had explained quickly and Ken didn’t really understand. He figured that at least it would give him something to talk about in his write up at the end of the project.

“You’re early, Ken.” Bryony arrived in the lab and dropped her things on the lab bench across from him.

“I’m escaping the masochistic roboticists,” he said and surprised himself at how grumpy he sounded. “What about you?”

“Being late is bad for my complexion.” Bryony sat down. “I don’t think they’re masochistic, though. Robo-duelling is a legit hobby, although I absolutely empathise with the feeling of having heard way too much about it in the last couple of weeks.”

“Yeah, I dunno what they see in it. I think it’s a waste of time.” Ken shrugged. “Not that anyone’s listening to me. How’s the project going?”

“It’s pretty fun. Von Rejk let me extend something I was doing on my own with a sort of new litmus-type test — it’s not really new, but I’m doing it a bit differently to normal — and it definitely helps to write everything down. Not just lab notebook type stuff, although that’s important too, obviously, but what you expect to happen and why and how you’re going to test it. You can’t test an hypothesis you haven’t formulated yet!”

“So you’re doing lots of experiments and stuff?”

“Not really, actually. I mean, I want to do lots of experiments and stuff, but realising that somebody’s actually going to look at how I do this and mark me on whether or not I’m actually using the scientific method kind of slows me down. And I’m trying to figure out how to incorporate some of the ideas from the last project, about what you’re actually measuring when you do tests. Because you’re never really exact, are you? There’s always some amount you could be out by.”

“It’s a bit disconcerting, really. I think I prefer maths, where a number is a number. In measurements it seems like a number is just an indication of more or less where you are.”

“Hey, it’s kind of like in analysis class. The reading is in a neighbourhood of the actual answer.”

It took Ken a moment to remember exactly how they’d defined a neighbourhood, but Bryony’s description did have some sense to it. He was still trying to puzzle it out when Mathematician Nieminen began the session.

“Good afternoon, all of you. I know you’re eager to get to work on your project for Mathematician von Rejk, but first I’m going to ask you to briefly cast your minds back to your previous project, where we were looking at measurements. I have all your write-ups, with comments, here.” She tapped the lecturer’s desk at the front of the lab.

“I’ll be giving them back for you to look over in a minute,but first I want to discuss a topic that all of you have come at from one or another angle in your reports: uncertainty. You’ve all realised that if you measure, say, the width of a pin with both a metre stick and a micrometer, you won’t get exactly the same result. All you’ll be able to read off the metre stick is something like ‘a millimetre’, while the micrometer will take you into decimal places of millimetres. But if they’re both correctly calibrated we want the readings to be consistent. So how do we resolve that?”

Ken looked pointedly at Bryony in the silence that followed, but she shook her head and refused to answer. He gave her a few seconds to change her mind and said, “To quote an anonymous classmate, they’re both in some neighbourhood of the right value.”

“Oh very good,” Nieminen said. “I like that. There might be some debate about whether or not the right value can even exist in principle, but the idea of getting an interval is absolutely right. Whose idea was that, by the way?” She looked around the class.

“It was me, but I didn’t think it actually meant anything,” Bryony said. “I’m not exactly sure what Ken means, to be honest.”

“Hmm, well then.” Nieminen turned to sketch a number line on the screen at the front of the lab. “If we read ‘one millimetre’ off the metre stick, we might be tempted to say that the reading is just this.” She placed a dot at one on the numberline. “But really, there’s some uncertainty in the reading. I might be reading half a millimetre too much or too little, so what I really get is more like this.” She drew a bracket along the number line starting at one half and stretching past the original dot to one-and-a-half. “I can write that as one plus or minus a half.” She added to the screen, below the bracket, 1±0.5.

“Now my micrometre reading is also going to have some uncertainty attached, so it’ll be a different bracket. The uncertainty should be much smaller, of course. If I read one point two millimetres off the micrometer, I can put a bracket here.” She drew a tiny bracket in. “We won’t worry about the exact value of the uncertainty for now.

“Since the brackets overlap, our readings are consistent. On the other hand, if the micrometer measured three-” She stepped down the number line and drew a tiny bracket in at three. “We wouldn’t overlap at all. Hopefully you’d agree intuitively that something would be wrong.”

Several people nodded.

“Explicitly stating our uncertainties allows us to quantify that discomfort. Now, what if the reading I take from the micrometre is just a smidgen more than one point five?” Nieminen drew a bracket around the end of the big metre stick bracket.

Ken stared at the screen thoughtfully. It was much more satisfying to think of the measurements as being completely overlapping. You expected the micrometer to improve on the reading from the metrestick. But the brackets did overlap for this case, even if it was just a little.

“I guess it’s fine,” Buhle said. “As long as the real value is in the part where they overlap. I mean, I’m not sure if you can tell that from the measurements, but they must be basically consistent if that’s an option. It gets kind of complicated, though.”

Mathematician Nieminen laughed. “It does indeed get complicated, but we’ll develop the ideas as we go. We’ll do some exercises later on, but for now all I’m expecting is that you report your measurements as intervals, like this.” She gestured to the 1±0.5. “Talk to us about how to get it right for your particular situation. If you start to feel like we’re glossing over things, that’s good, because we are. We’ll have more sessions like these in the future, especially as you gain some of the mathematical tools that are helpful for dealing with the ideas. Now I’ll let you get to work — oh wait, John?” She turned to look at Mathematician Dustborn, who was standing in the doorway.

“Just a quick announcement, Monica. We’ve got seats for the class at the opening robo-duelling match this weekend. I’ll drop all the paperwork in your common room. Please make sure I get it back by tomorrow morning. Miss Adams, as we discussed previously, you will be excused. Now, back to work with you.” He whisked out of the room to a buzz of chatter.

Bryony looked like she was trying not to smile, although Ken wasn’t sure why. She’d been supportive enough of the class’s obsession. “How’d you manage to get out of it then?”

“No, it’s not like that.” She looked up and down the table. “Ricardo banned me from the first class excursion and I’m just relieved it’s not all that disappointing. Not that I wouldn’t have enjoyed watching the match.”

“That sounds like it comes with a story,” Ken said. “But if you got out of it, maybe I can too.”

Bryony flipped her notebook open. “I’ll be working on my titrations.”

wikipedia-logo Find it on Wikipedia:

Facebooktwittergoogle_plusredditpinteresttumblrmailFacebooktwittergoogle_plusredditpinteresttumblrmail