On the Pedagogy of PiWars

tl;dr I need to get better organised next year to turn PiWars prep into a good learning experience; also it would be good if PiWars rewarded technical effort a little more.

Westpark Club is back from this year’s PiWars competition in Cambridge. It was excellent fun, the weather was great, the atmosphere was friendly and helpful, our team did well in some things and poorly in others. We were finalists in the entertaining Pi Noon competition and we came 4th overall.

Build or Buy?

Riding the wave of enthusiasm after the event, I’ve started thinking about running a workshop during the year and preparing for next year’s event (assuming that Tim & Mike can find it in them to run one). But there’s a tension here which I’m struggling to resolve: the split between preparing in order to win; and preparing in order to learn. Our Club is part of a charity group with educational aims so we’re always trying to find that balance between making something enjoyable and attractive and making sure it has educational or formative value. Obviously teachers and after-school clubs will be in a similar position.

At one end of the spectrum you can design your entire robot from scratch, 3D-printing every part, buying only the components that you can’t make yourself. And you can plan the whole of the circuitry, print your customised PCB, and wire and solder it all by hand, writing the entire software stack. At the other end, you can buy a robot with everything already working, maybe even with software provided by the vendor to do useful things like remote-control driving and image-detection. And all you have to do is to fit it to the specific challenges.

Most teams on the schools / clubs day probably sat towards the right-hand end of that spectrum: buying, rather than building. We ourselves used the excellent ThunderBorg and UltraBorg controllers from PiBorg which give you motor control and handle sensors and servos. This means that you just plug in one of the ultrasonic sensors and call a function and you’ve got a distance. Great for getting things going. But it also means that you’ve not had the experience of wiring in the 4 pins of the sensor, working out the resistors for the voltage splitter, and working through the speed-of-sound-divide-by-2 maths to understand the physics of the sensor.

But this is the educator’s dilemma. With only a limited number of sessions in which to complete a project — whether that’s after-school clubs, curriculum lessons, or Saturday evening workshops — you’ve got to be pragmatic. We tried to achieve a balance by having each family group build its own CamJam Edukit robot to become familiar with the low-level elements before coming together in later weeks to collaborate on the team robot. (Although we did use gpiozero to avoid some of the fiddly work around the sensors).

Coming 4th without meaning to

In a perverse kind of way, I’m unhappy that we came 4th overall because we hadn’t put anything like as much technical effort into our solution as other teams clearly had and I’d guess that our points came from good tactical driving (Obstacles, Golf, Pi Noon), rapidly-improvised mechanical solutions (Golf, Ducks), and a good deal of luck (Pi Noon) which took us through to the finals. And I feel bad for teams who’d worked harder beforehand but whose solutions had failed at the last minute, or who were just unlucky.

So what am I proposing? I suppose it falls into two parts: what PiWars might do differently to better reward the design and build effort; and what we might do as a club to make better use of PiWars as an opportunity for learning.

More emphasis on technical solutions?

I know that the Technical Assessment did count towards our final points. But I wonder whether there’s an opportunity at each of the Challenges for more points to be awarded for a more technically-developed solution. This was the case for the Duck Shoot: that teams who had engineered some kind of Nerf Dart solution scored higher than those who pushed balls. But this would have been offset by the fact that the darts can hit at most one target, whereas the balls can bounce around and flatten several (a loophole which our driver happily exploited). And in the golf challenge, I think the team which came 2nd overall had improvised as we had a basic fork with no capture mechanism — no servos or relays to go wrong.

You can perfectly well argue that, as long as you’re within the rules of the competition, any solution is good. And I agree. We and other teams improvised on the day to produce simpler solutions where more sophisticated ones had failed or not been possible for us in the time. The alternative would have meant simply skipping those challenges and getting less out of the day overall. But I would have been happy for us to have stepped up to those challenges as best we could and still finished up mid-table.

More time spent up-front learning

From our point of view as an educationally-oriented Club, we might go over what other teams’ solutions looked like. Or we might go over the different Challenges now we’ve seen them to brainstorm solutions. Overall we want to generate enthusiasm among the youngsters in developing more sophisticated solutions for the sheer interest and enjoyment, and not just to come higher in the tables next year. (Which, frankly, will be difficult!).

I don’t know if it’ll come off, but I hope to be able to run workshops through the year to develop more slowly the different elements we might use (motors, sensors, servos, relays, lights etc.) so that, when it comes to another PiWars, the youngsters themselves will be able to look at each Challenge and think: I know how we might do that.

Producers, not Consumers

I have a bit of a motto when it comes to talking about youngsters and technology. I want them to be Producers — and not just Consumers — of the technology they use. I love PiWars; I love the atmosphere; I love the technical challenges it offers. What I want is for that to be an opportunity for our Club members to becomes real Producers while having a great time.

P.S. I’m not really talking about Pedagogy, rather about Learning, but the alliterative opportunity was too good to pass up.

The end of the road

Well, despite all those good intentions, I end up blogging a post-mortem (or post-vitam if you like) instead of the journey made. So, let’s have a quick recap.

The Background

You might recall that the plan was always to run this as a Dads-and-lads introduction to robotics, using the PiWars competition as an end goal. And I’m glad to say that we stuck with that, meeting most Saturdays to work through the code and get the robot moving.

We started off with each team building their own CamJam EduKit robot and getting it working, and moved onto a combined robot for the competition itself, principally designed and built by Tony Vazquez, the driving force behind our entry. We had some very good sessions with code on a projector screen and people taking turns to add some functionality (or correct a previous error!), all of which got used in some way in the finished robot.

I’d been determined that it would be the learners writing code (albeit under fairly detailed instructions) and not just me clattering on the keyboard while they looked on. But that’s a slow way to work through 7 different challenges, and not everyone could make every session. In fact, we’d hardly approached even two challenges. So I stepped in late in the day to try to pull things together. But I also ran short of time (and suffered from that refactoring disease which fussy programmers suffer from).

Meanwhile my fellow club leader Chus was working very hard to build a Nerf-based shooter for the duck shoot, but just failed to make it robust enough in time for the competition, so we ended up leaving it behind. But here it is in partial action being controlled by Pi-based servos:

The final week

So with a week to go and some not-very-complete code in place, I was going to have some evening sprints to get us to a workable state. And then this happened:

That was Sunday 15th and our club’s only Pi3 (we’re using WiFi and Bluetooth) and our only driver boards. Tony Vazquez came round that evening with his own Pi3 and ordered two more boards from PiBorg. Luckily I’d been quite good at pushing things to Github, and managed an emergency commit & push before we lost the SD Card entirely.

On the day…

Although several people had collaborated over the months, we named a team of six and encouraged others to go along to spectate. We headed off nice and early to get there for registration around 9.30am

Everything went smoothly, the registration process was obviously well-organised and we were given a small room as our workroom, which we shared with a similar sized group from Kingston Grammar School (also with a group leader called Tim, coincidentally). This worked out nicely for both groups: we had similar robots in a similar state of under-preparedness, and we each found that we’d not thought to bring some equipment which the other team could lend us. So they used our screen and keyboard while we used some of their wood and ate some of their brownies. Thanks, KGS!

We beat Latymer Prep School in our first Pi Noon (sorry, Nic) with AV driving for us. And we then moved onto the Deranged Golf. Now, we’d come almost completely unprepared for this, but thanks to the assistance of the KGS guys, we put together a makeshift fork mechanism, let AC drive and managed a creditable performance:

Like many people, we skipped Over the Rainbow but we had a second round of Pi Noon to get through. In fact, our opponents had that awful of experience of failing to get a connection to their robot and, after an extended wait, we were given a bye through to Round 3. By this time, Chus had turned up with some of of the club Seniors to watch us in action.

We had a go at the Minimal Maze but, as expected, we were too challenged by the differences of surface and distance from our practice environment and the robot lost its orientation fairly quickly. I tried some live re-coding between runs, but not enough to save us.

Our next challenge was the Duck Shoot, which we hadn’t intended on trying without the Nerf gun. But, again, the KGS guys said that they thought it could be done just by re-using the golf appendage  as a shunt, so Tony V got to work improvising what turned out to be a very successful approach which, unfortunately, I don’t seem to have a picture of. Basically, he bolted a soft-drink can onto the front of the robot and we used that to push the balls against the targets. Amazingly, this got us 2nd place in that particular challenge! Well done to our driver AC for rapidly working out the best tactics for us.

We went straight from there to another Pi Noon round, this time against the awesome Autonomouse — a trireme of a robot, able to move in several directions at once. Somehow, against the odds, we burst all their balloons before they could burst ours and were through to the quarter-finals. (Although not without needing to remount the wire).

The Obstacle Course was always going to be quite straightforward in the technical sense — just a question of driving. And our friends from KGS with a similar build of robot had warned us that the only real difficulty was in the rubble-strewn area (“Stone / Paper / Scissors”) where some of the debris wedged under the chassis. Sure enough, this happened to us as well, but our driver AV was able to clear the obstruction and move on, as you can see from this photo:

With such a big robot, we came somewhat adrift trying to turn some of the corners, but AV just powered through — and sometimes climbed over the walls! Overall we did creditably on this one.

The semi-finals of Pi Noon with EC driving saw saw us through — to our complete amazement — to the finals. Let me say that, notwithstanding the skill of the drivers, there is a large element of luck in the Pi Noon setup. Which is good in  that a relative underdog (like us) can win unexpectedly against a robot with superior movement and speed. But when both bots are bashing each other with their pins, it’s really down to whose balloon is thinnest!

But first we had to do the Straight Line run and here’s where our team coding paid off.  The main problem was that, on the first run I realised I hadn’t disabled the testing mode we had to ensure we didn’t run off the end of our tables. The result was that the robot sped along about half the course and then stopped dead! I quickly disabled the test mode and restarted but of course that lost us time. We also over-compensated for the narrowed section and veered too far to the right. I quickly tweaked the compensation factor and the third run got straight through to the end.

And so to the Pi Noon finals, the last event of the day with everyone crowded round, where we were knocked out in a very quick, very close battle. Our thanks to our driver AV for doing his best in a difficult situation.

The Results

You can see us lined up here for the closing ceremony:

We obviously knew we were runners-up in the Pi Noon contest, and the lads went down to receive a medal from Dr Lucy Rodgers. You can see it here held by our final driver and his proud Dad:

And then, to my complete astonishment, we ended up in 4th place overall! I was genuinely surprised, and as the numbers counted down, I imagined that there must have been some kind of oversight and we’d been missed out in 23rd place or something. But there it was: Westpark Club and the lads were delighted (as were their Dads) as they collected the bag of prizes:

It was a great day for us, and I’m glad we decided to try everything we could, even where we had a fair chance of failing miserably. Thanks to all those who’ve helped over the past few months including those who couldn’t make it on the day — to Matthew with Daniel and Andrew, to Enrique with Alvaro and Enrique, to Chus and to Max, and especially to Tony with Alvaro. And thanks, of course, to the amazing Mike and Tim who’ve continued to run this for another year, putting an amazing amount of work and organisation into  making it a great community day out.

Thanks to all the other competitors and we hope to see you all next year

Meet the teams!

We wanted to make the Westpark PiWars effort a learning experience and a way for Dads & their sons (and nephews!) to learn something together. So let’s meet the various family groups making up the overall Westpark Club team, plus the one returning team member from our previous PiWars entry.

The Vazquez Family

Antonio “Tony” Vazquez and his son AV are the drivers of the Westpark team. Tony has pulled together most of the kit we’re going to be using and has prototyped our robot and is planning out how we’re going to address the different challenges.

The Carames Family

Enrique Carames and his sons AC and EC took part in a short series of workshops we ran last year at the club, and are adding to their basic understanding of the CamJam Edukit robot which they built then to work out how to address the challenges in this year’s PiWars. (And yes, they are twins; and yes, I do have to ask which is which every time!)

The Sawa / Khadouri Family

Matthew Sawa and his son DS and his nephew AK are beginners at the robot game but are keen to contribute to the Westpark team, even if they’re starting from Level 0. They’ve been building a CamJam robot — and the moment when they got it to run across the floor was a great achievement.

The Engineer

“The Engineer” was part of our previous PiWars team and is now doing GCSE Computing. I don’t have a current picture of him yet but here’s one from a year or so ago when we were building a RPi-based rotating turntable (also pictured) at which you could fire nerf darts.

    

The start of the road

When we were planning our PiWars entry for 2018, we decided to offer ourselves the extra challenge of starting late with a relatively inexperienced team! (All right,  we didn’t; but that’s what happened anyway!) But we’re definitely up for the challenge: we’ll do what we can do in the time we have and we’ll turn up on th day ready for anything.

Since we’re a club for youngsters, PiWars has been for us an opportunity to teach and learn. And this time we’re trying to run it as a chance for fathers and sons to do something together. I’ll ask the participants to introduce themselves in a later post, but we currently have two families participating and we hope to have a couple more. Plus the two club leaders.

The blog header shows a shot of last term’s robotics workshop where you can see some of the dads and lads who make up the PiWars team this term. And here’s a quick shot of yesterday’s planning session, with an early look at our prototype robot.

We’ve got a lot to do, and we’ll be telling you all about it as we do!