On Monday, March 18th 2013, the 27th APEC micromouse contest was held in Long Beach, California. This mid-winter break, to what is frequently a warm, sunny location, is another chance to catch up with some of the best micromouse builders in the world and see how you measure up against them. For the last couple of years, I have not done so well but I think this year’s mouse – Decimus 4 – may see a bit of a change in fortune.

As ever, the APEC contest takes place on the Monday evening. It starts quite late, at 8pm. This gives the contestants plenty of time to get their mouse set up and put in some practice on the maze. Each maze is a little different and everyone – however good – benefits for a little fine tuning on the contest maze.

Getting to APEC

The flight out to APEC, for me, was on United 935. This aircraft has half the seats set out for economy plus which gives you another 4 inches of legroom. I would thoroughly recommend the upgrade for the extra comfort. This particular flight was very busy. Not really sure why since, for the previous couple of weeks I saw that it was not very full. Perhaps there were folk going over for a break to coincide with St Patrick’s day. If drinking green beer is your thing, then this may be attractive.

I arrived on the Friday and the maze was not to be available until Sunday morning so, on the Saturday, I met up with Tim Foden, also from the UK, and we went to visit the Aquarium of the Pacific. As you walk in, there does not appear to be too much there but a couple of hours later, we had definitely had our money’s worth. It is a great place to visit and worth your while if you are in the area.

Aquarium of the Pacific, Long Beach, California

Long Beach at this time of year is firmly in the off-season. It was very quiet. Too quiet perhaps. The leisure area down by the shore has plenty of restaurants but the various shopping areas were pretty much shut down. On the up side, there was plenty of space, the whole area was quiet and uncrowded and everywhere was very clean. We saw a surprising number of homeless folk. that in itself might not be surprising but, of course, there were not many other people about so they stod out. As a possible sign of the times, I saw one guy skulking in the bushes. That had me a little concerned until I realised he was using one of the City power outlets to charge his cellphone. A little later, we came across another guy sitting at a bench in a public area. He was also charging a cellphone. And using his laptop computer. Like everything else, being homeless ain’t what it used to be.

With most of the shorefront outlets closed, the only opportunities for supplies like snacks and bottled water were up in the downtown area of Long Beach about half a mile inland. Here is the usual range of outlets including the inevitable Walmart. There is also a Von’s supermarket not too far up the hill from the contest. A real bonus for me and Tim was the dollar bookstore. This is a huge second-hand bookstore where every title was one Dollar. I exercised great restraint and came away with only six books. Fortunately, I did not have a lot of room in my case.

Also over from the UK for APEC this year were Derek Hall and Jim Chidley. Since they were staying up on Los Angeles, we did not get to meet up until Sunday. They spend Saturday – and I mean all of Saturday – at Universal Studios. They had a pretty good day up there by all accounts and I think they would rate it as a must-see if you can. The studios would not really have been my thing but I would have liked to visit the Hollywood Hills and some of the beach areas. Maybe another time.

Practice Sessions

APEC 2013 practice

Sunday morning gave us access to the maze. This was quickly set up in a ballroom at the Hyatt Regency Hotel. Yes, a ballroom, not the ballroom. They had several. That place was huge. With the maze available, the entire day was used up trying to get my mouse to behave. Only five weeks previously, it had never done a single move and the code had only got as far as setting up the peripherals. I didn’t want to just port over the code fromD2 since it had been working so poorly, I felt it all had to be suspect. Instead, I started from he bottom and re-wrote everything right up to the level of being able to run the command processor and search the maze. The only code ported directly over form D2 was the maze solver and path generator. Everything else was new.

Had I known how much work that would be, I might not have started. That would have been a shame because it all worked out pretty well. D4 had only one real problem left by the time I got to Long Beach. That was unreliable detection of posts for triggering the turns. After sorting out a few bugs in that area, I was, by Sunday evening, fairly happy that the mouse would do what it was supposed to do. On Monday morning, I fixed up a couple of other problems that had occurred to me overnight and then, by lunchtime, I was wondering what to do.

It was not so much that the mouse was all done but I was afraid to ‘fix’ anything else for fear of breaking what was already working. I decided then to just play a little with the running speeds to try and maximise my possible score. By now, I was happy that the mouse could run fast. Possibly as fast as 10m/s/s (1 g) forward acceleration and 15m/s/s (1.5g) centripetal acceleration around turns. The only way to get a good score under APEC rules is to run as fast as you can, as soon as you can. I didn’t want to risk that as I had no means to vary the speed of each run by hand. What I wanted more than anything was at least one good fast run to prove to myself that the mouse could do the job and that it was a significant improvement over D2. Anything beyond that was a bonus so I set it up to start gently and increase the acceleration on each of the next six runs. that done, I spent most of the afternoon wandering about, fiddling with small stuff and looking for opportunities to eat.


The Contest

It was the eating that nearly got me into trouble. Having already taken (very) full advantage of the buffet down in the exhibitor’s hall, I bumped into Joseph and Michelle Chiu. They were heading out for a meal and asked if I wanted to join them. Well, I pretty well never say no so off we went. Unfortunately, time passes quickly in restaurants and I only just got back in time for the contest. As it was, I missed the group photo before the start. One day, I will learn to get my priorities straight.

The best way to get a flavour of the evening is to watch the excellent video produced by Derek Hall and Jim Chidley.

Full results and the maze details will be available shortly. For now, you should realise that the maze path was 132 cells in length. That is twice the length of the typical micromouse contest maze. The winner managed a fast run in only 11.4 seconds or so.

I was very happy with the performance from Decimus 4 at APEC. It’s fastest run time was 15.9 seconds. That is about 50% faster than D2 could probably have managed and was achieved with a forward acceleration of 6.3m/s/s and a centripetal acceleration of 10.5 m/s/s. That amounts to about 2/3 of the maximum speed I have, so far, been able to make it run at. On that basis, there is plenty of scope for D4 to get significantly better times. While it may not yet be up to an 11.5 second run on this maze, I think it could approach 13 seconds. I would be very pleased with that.

After The Event

After all the preparation, the contest itself flashes by. The next day, my flight was not until the evening so I took myself off to visit the Queen Mary and the Russian attack submarine Scorpion moored right next to her.

The submarine was fascinating. Are they all built by people using drugs? If you have to call a plumber, you had better hope they were not trained by the Russian Navy:


There was an extra dimension to this visit as the only other people on the boat while I was there was a Russian family. It was a bit spooky to be hearing Russian as I made my way around. There is a gallery here.

Next was the Queen Mary. This liner was once the height of ocean going luxury and now serves as a floating hotel and tourist attraction in the bay at Long Beach. It completely dominates pretty well every view over the water and is always in sight. So – you know it is big. That does not really prepare you for how big it is once you get on board. While I did not get to see inside any of the cabins, and much of the old opulence of the ballroom and dining areas is not much in evidence, the audio tour was really interesting. It took me two-three hours to wander over the ship, following the generally excellent guide. I say generally excellent because I did get lost a couple of times. That was all to the good though because I saw stuff that was not on the audio tour itinerary. There are some pictures here.


The trip back

Eventually, it was time to get my gear and return to the UK. Here, though, is a little warning for fellow travellers. I had pre-paid for a supershuttle transfer to to LAX from my hotel. You have to contact them at least 24 hours before being picked up to arrange the time and place. This I did but, after 25 minutes waiting in the lobby of my hotel, I had not seen them, I had to get the hotel staff to call and find out what was going on. It turned out that they had indeed arrived on time but, instead of coming into the lobby to find me, as arranged, the driver just sat outside for a couple of minutes and then went on his way. Supershuttle claimed that I had not left a contact number but this was not true. They refused to come back or arrange another bus.

Well, that was disappointing 🙂

In the end, the excellent Hamir, on the desk at the Hotel Maya, arranged a Town Car for me. Including tip, it cost me $90 to get to the airport. Not really what I was expecting but it turned out that the journey only took about 30 minutes and the Lincoln Town car is a big, comfortable beast. I did feel sorry for my driver though as the return traffic looked dreadful. He was going to take 90 minutes at least for the return trip.

After the flight out, I had already upgraded my seat to economy plus and that meant I had the extra legroom and a whole row to myself. For the first time on one of these trips I managed to get a good six hours of proper lying-down sleep. Compared to bumping knees with a neighbours in the standard cabin, I have to say it was worth the $97 extra. Also, I should say that the United cabin crew on both flights were very good. Possibly the best I have yet seen.

So – here I am back at home. As I write it is snowing, wet and cold. A far cry from last weekend. Still, it is always good to be back in your own home.

Thanks, as ever, to David Otten for organising this event.

This Post Has 10 Comments

  1. Galen

    Hi Peter,

    Congratulations on a successful APEC. From the video, it looks like D4 is coming along great. May I ask how you have chosen to implement your command processor? It’s quite perplexing to account for all the leadin/leadout distances in addition to handling accelerations when consecutive forward commands are sent.

    Thanks for your help!

  2. Green Ye

    Congratulation Pete! I saw all you great performance however couldn’t have video take for you since my run was right after yours so I had to pick up my mouse and wait in the line. anyway, your mouse will surely perform better in the neat future. My mouse kinda have same issue that my diagonal sensor couldn’t detect wall to no wall transition correctly some times which caused me crash, I am glad you fixed it 🙂

  3. Peter Harrison

    The command processor gets each succession of forward moves bundled up as one move. So it sees things like


    Each turn has a table that gives its leadin and leadout distance. When a straight is to be run, the processor just has to work out how long a straight would be without the turn – eg 4*180mm – and then subtract the leadout distance from the previous turn and the leadin distance from the next turn. It is left with a simple, single straight move. After that, the accelerations and speeds are quite easy.

    The finish speed for any straight is the turn speed of the next move. Or zero if the next move is a STOP. The command list would never get to see two straights in a row. There will always be a turn between them.

  4. Galen

    Ah that makes more sense now. I was thinking along the same lines.

    However, how did you handle non-stop mapping? One would not know how far to move forward

  5. Peter Harrison

    For that, I start the mouse moving. It is told to go one square forward. At an appropriate point – perhaps as it crosses the cell boundary – it calls the solver and, from that, determines what it needs to do next.

    If the answer is to carry on, I simply add 180mm to the distance on the current move and loop back to wait for the decision point again.

    Anything else causes the appropriate turn to be executed. After that the mouse sets out again and we are back to waiting once more for the decision point.

  6. Peter Harrison

    Thank you

  7. dragonet80

    Hi Peter. I would like to contact to Tim Foden, as he has constructed Fat Cat 3, wich uses dsPIC wich I am also interested in. Can you give me any mail, web page or link where I can contact him?

  8. Green Ye

    ask David Otten might be a good idea since he is the organizer of the event, just in case Peter doesn’t know(I think Peter knows lol).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.