How To Win At a Robot Contest

Kenny Wolf
Geek Talk
Published in
5 min readNov 23, 2023
Cover Image with mBot

In this article I write about my experiences and learnings from a robot contest I took part in.

Brief history

Since September this year, I have been studying part-time for a Bachelor’s degree in Computer Science at the Bern University of Applied Sciences in Biel/Bienne.

Every first semester there is a so-called “special week” or breakout week. During this week, students work together in teams on a project. At the end of the week, there is a contest for the best project.

In this case, it was an mBot that we had to program.

This cute little robot had the task of mastering a course with obstacles, where the fastest robot wins.

But now to my experiences and insights into how you can win such a competition.

Teamwork makes the dream work

Teamwork in a group is essential when working together on a project.

I know that sounds obvious, but that’s not always the case. During our Special Week, we were divided into groups and not only with other classes, but also with other degree programs (Medical Informatics, Data Engineers and Wood Construction students!). If you are randomly assigned, then you have to work with what you have.

And I’m not talking about skills, because you can compensate for that.

I’m talking about motivation and harmony. I was lucky in my group that everyone worked together and took the deadlines seriously. I heard from other students that some group members were rather reluctant to complete the tasks…

Well, there are always those.

Communication

Communication and proper planning are extremely important, especially in a team.

But I want to share an experience here that most people don’t know about:

Let the better idea win

Especially if you are a bit more ambitious, you want to push through your ideas.

Even if they are sometimes not the best. Your own ego can quickly be hurt when others criticise your work and suggest a “better” idea. The important thing here is to put your ego to one side. Test both ideas and decide which one is better after testing before you justify your idea.

This leads to insights that you would otherwise not have had and prevents childish behaviour.

Theory vs. Practice

For me as a software developer, it was a completely new experience to work with hardware.

Before that, I had worked almost exclusively with pure software. This presented me with new challenges. Because what seemed logical in the code was often different in reality. It happened frighteningly often that the expected behaviour was completely different from the actual behaviour of the robot.

But that is quite normal.

My realisation from this is that you first have to get to know the hardware you are programming. Test around a lot and play with different ideas. Over time, you’ll get a better feel for how the robot reacts to the code you write.

The better you know your hardware, the better your chances of winning.

Unreliable Hardware

Let’s stay with the plastic and metal parts for a moment.

One very drastic experience that all groups had was that the hardware was very unreliable. And this was due to various factors. The motors, for example, were different from robot to robot. A movement with the left wheel at 45% with one bot was perfect for the curve, with another bot it was suddenly far too much.

The battery level also had a huge influence on the robot’s movement and motor skills.

To avoid this, our team decided to tune the program for just one robot. This robot was then also used for testing and the competition. Furthermore, we always put in fresh batteries for testing as well as for the test and the competition.

This allowed us to ensure that our program could run under more or less the same conditions.

Side note: In order not to disgrace the mBot here, it must be said that this robot can be purchased from 70$. At this price, you can’t expect all the parts to be reliable.

Excursus Industry

Photo by Simon Kadula on Unsplash

Before you think all robots are so unreliable, here’s a comment.

I know from the industry that different robots are built with different accuracies. A 6-axis arm robot, for example, can have a deviation of 0.1cm or 0.1mm. These figures are guaranteed by the manufacturers.

Of course, the price is adjusted accordingly.

Luck

One factor that I don’t like, because I can’t control it, is luck.

You also need a bit of luck to win a competition.

As I really don’t appreciate luck, I won’t go into it any further here.

Who won?

Well, to be honest, my team didn’t win.

We made it to the semi-finals but then got knocked out. The other robots were simply a bit faster. But there was one interesting observation I took away from the final that I would like to share here.

The favourites, i.e. those who already had the fastest robot in testing, surprisingly lost.

Why? At the end of the course, a torch is shone on the mBot from a random direction. It has to scan the surroundings and locate the light source. The bot must then travel to the light source and touch it.

This part of the course caused problems for all teams, as the sensors for recognising the light were not very accurate.

The Finale

The favourite team’s robot made it to the end of the course with a big lead.

But it was unable to recognise the light source. So they had to start the robot from the beginning of the course (the rules stated that you can restart a robot if something goes wrong). During this time, the robot of the other team travelled more slowly but safely to the end. The favourite team’s robot almost caught up with the other one.

However, the other robot reached the light source safely and on the first attempt and thus took home the victory.

Conclusion

One last piece of advice I can give you is to weigh the scales between speed and reliability.

You can program a robot that is fast, but has to take certain shortcuts and may lose reliability. But you can also program a robot that is a little slower but achieves its goal 100% of the time.

Of course, there’s an art to doing both, but you can only do so much in a week.

I hope you can take something from my thoughts for your competition that will help you to win.

I wish you and your team every success and, above all, lots of fun!

--

--

Kenny Wolf
Geek Talk

I write about tech, software development and hacking for non-techies and geeks 🤓 | Software Developer 👾 | Interested in pentesting 👹