It is hard to believe that I have just visited Taiwan for the fifth time. After a couple of fairly unimpressive performances at the last couple of Taiwan micromouse contests, I was determined to do better and there have been a lot of improvements to Decimus4B.
All the overseas entries stayed in the same hotel – the same one as last year. I rather like this hotel. The staff are good, the rooms are good and the view over the city is interesting – especially soon after sunrise.
On arrival at the airport, even the driver of the car taking me to the hotel thought it was warm. Daytime temperatures were 35 deg C all weekend. This was mostly OK because we were indoors a lot and there was a bit of a breeze. On the Tuesday though, it was 36 and very humid. Even Ng Beng Kiat, who is from Singapore where it is always pretty warm, found this a bit hot.
Originally, I had intended to build a new micromouse for this contest – Decimus 4C. This was to have been the same basic chassis but with a different sensor arrangement. On D4B, the sensors point much too far forward. For each turn, the mouse must see a post so that it can get an accurate position update. Then it can do the turn in the correct place. Because the sensors point so far forward, the exit point of each turn has to be early enough that there is room to set up for the next one. Overall, that limits the maximum radius of some turn and prevents the mouse running the turn as fast as it might.
After building D4C, I realised I had set up the new sensor arrangement incorrectly but did not have enough time to change it all again. Reluctantly then, and with only a couple of weeks to go, I went back to D4B and made what improvements I could.
Chief among these was making the search as reliable as I could. I wanted the average search speed to be high and all movements to be accurate. Paradoxically, this meant taking out one of the options to speed up running on known straights because there were circumstances where the mouse would not slow down enough for an unknown portion of the maze. A simple bug I am sure but one I will fix later. Under Taiwan, APEC and UK rules, the search needs to be as fast as possible because of the search time penalties. In the end I left it at 900mm/s on straights and 700mm/s on turns. It will go faster but reliability starts to suffer. Failing anywhere in the search is pretty well fatal as several mice found out at the Taiwan micromouse contest. Not only do you waste a lot of time but there is also a three second penalty on the score for having to pick up the mouse.
The other major change was to re-examine some of the turns and increase the radius as much as I dared. The speed at which a turn can be run is proportional to the square root of radius at a given centripetal acceleration. That means that an increase of 20% in the turn radius gets you a 10% increase in turn speed. Overall, that might be worth 0.5 seconds or more on the run time.
Another improvement was to have the mouse examine the sensor data just before the turn and make further adjustments to the turn position. For example, on the SS135 turns, if the mouse is too far to one side or another, the turn entry point will need to be earlier or later to compensate.
In spite of all my careful preparation, something was not quite right. For reasons, I cannot yet explain, many of the left turns had to have their entry point adjusted by about 15mm. This makes no real sense to me as I checked the sensors and nothing has moved there. The venue was pretty quiet in the morning with only a couple of locals and about five other contestants using the maze for practice and setup. By the time I had worked out what was happening though, it was after lunch and getting pretty busy. Each test meant a ten minute queue for the maze and when you finally got to give it a go, the maze had changed. Under these circumstances, it is better to split the maze up into a small number of test areas but that was not happening.
Eventually, I was reasonably happy and the mouse ran apparently well. The key question now was how fast to have it run in the contest. On my mice, I have the speed set as a single number which represents the turn acceleration. Everything else is adjusted from that. At the end of practice, I thought that speeds up to 12 were probably reliable, 14 was slightly risky and 16 was probably doomed. There is a speed 18 which needs considerable luck and the collective goodwill of half the planet for success.
Where contests have a search time penalty, strategy is key. It is very rare to improve a score after the first fast run so it is critical to run as fast as possible on that first run. On the other hand, that run must succeed or the touch penalty will render your score worthless. So – what speed should I choose for the first run?
And, in case you had forgotten how small a half-size micromouse is:
The international contest runs later in the day and there are no real opportunities for further practice so the morning is a relatively relaxed business watching the other events. I guess I must have had a lot on my mind because I have little memory of what I saw. As on previous occasions, there were a lot of entries, many of them very good indeed. There is a local micromouse contest and the top two entries from that take part in the international contest that I was part of. They were very fast indeed. One entry that did (unfairly) amuse me was a stepper driven mouse. It was a good entry but it explored one cell at a time and the clunk as it rocked back and forth every time it stopped and started sounded to me exactly like a Cyberman from Doctor Who. I could not get the image out of my head all weekend.
While we waited, we also had time to find out about some of the other entries. This year a team from China brought a couple of particularly interesting mice. Their classic micromouse was run by an FPGA chip with an ARM9 core and plenty of RAM. This let them run linux on-board. To debug and build, they could just SSH the mouse. This was a remarkable feat that many have talked about but it is the first I have come across. Perhaps more remarkable was that their half-size mouse also had an FPGA with and ARM core. It was not clear to me that it used linux but I would not have been too surprised if it had.
When contest time rolled around, I was second to run. Although this gets the nerves over quite quickly, it would have been good to see what kinds of times were being posted to make it easier to decide on a first-run speed. I kept it fairly conservative in the end. It turned out that I could have started of much faster. Decimus 4B ran flawlessly. There were only four speed runs possible and I pushed it up to speed 16 with no visible error. It would have been great to try it at speed 18 but that was not possible.
Overall, I don’t think it would have changed my final position to have run faster on that first run. Mostly, that was because I left a test feature active in the code. The idea was that it would run with the best solution it had and then explore some more, looking for an optimal route. My searching algorithm is not as good as I would like and the extended search did not happen. Consequently, the route run by Decimus 4B was far from ideal and consisted of a number of turns and short straights.
Here the green route is the one taken by Decimus. The magenta/blue route was taken by pretty much everyone else. The red route may have been fastest as it was only two cells longer but had a lot less turns.
After running, I then had to wait for all the other contestants to go while mentally keeping track of how many got a better score. Now, while I was not wishing ill on anyone else, I confess it was a bit of a relief every time another micromouse failed to post a better score.
By the end, I thought I was up for a place on stage. That was indeed the case and I finished with fifth place. In such company, I felt that to be some achievement and I was, I admit, pretty pleased.
Although I missed a fair bit of the line follower event, it was great to see Dave Otten’s Jehu get to third place with a really impressive run. Jehu is unique among line followers for its short wheelbase and optical line sensing.
Dave seems to have overcome some of the issues he had been having and posted a really good time. The line follower track was a full 60m long and had a few interesting sections. Overall, not many entries even managed a good fast run.
My thanks once again to Su Juing-Huei, all the staff and helpers at Lunghua University and the various sponsors for making this contest possible and so enjoyable.
This Post Has 7 Comments
Congratulations Peter! And thank you for sharing with us.
Dear Peter, this is the video about your micromouse in Taiwan, http://youtu.be/8dH3BdW03OA.
Pete. Congratulations on your success, you must be over the moon with the result after all your hard work.
Congrats Peter! Impressive work.
Thank you. Like your mouse by the way. See if you can get to APEC in the spring.
Congratulation Sir, on both the result an the good recent works. Looks like a good day in Taiwan.