In Part 1 of “how to fasten the search” I talked several conventional methods to reduce the search time. At part 2, I will talk about another new strategy which will even significantly increase the average search speed.
For a general search run, the turns are all 90 degree turns. As a matter of fact, the larger the turning radius is, the faster the mouse can perform a successful curve turn. However, when the turning speed is almost at the maximum, we need to figure out some other way to faster the search.
The solution here is actually quite simple, just fasten the straight part to make it even faster than the average speed of turn since mouse can go much stabler on a straight away. Before I explain how to achieve this strategy, I am here to show 2 video demos.
video 1, the mouse search at 0.7m/s speed for both straight and turn, with acceleration(2m/s max)on known straight path:
the video above has been showed at “How to fasten the search (Part 1)”, which was the fastest search method in part 1 of this serials.
Then here comes video 2, the mouse search at 0.7m/s at turn and 1.1m/s at straight, with acceleration(2m/s max)on known straight path:
Compare to the video 1, the overall time for video 2 is 1 second faster than video 1(18s for video 1, 17 second for video 2, 5.56% less time used). The difference will be even magnified if it goes to a full size maze.
The way to achieve this strategy is very straight forward, all you need to do is read your front wall and side wall earlier than usual in order to give sufficient distance for mouse to decelerate from a faster straight speed(1.1m/s as show above) back to a normal turn speed(0.7m/s). What I do here is let the mouse read the wall information 3 cm ahead then the spot I used to use at a straight path on every cell, so the mouse will be able to decide if it will need to keep going straight at the same faster speed(1.1m/s) if the next action is also a straight or slow the speed down to 0.7m/s if the next action is going to be a turn.
the picture here shows the location where the mouse usually read the wall information.
Assume the rotation center is exactly located on the motor shaft for a 4 wheel mouse(it’s actually a little to the front and somewhere between the motor shaft and the front wheel, but I just make it on the motor shaft to simplify the problem here)
You can see the mouse read and update the wall information when the motor shaft is exactly on the boundary between 2 cells.
The other picture as follow shows the new location that the mouse will update the wall instead on the boundary.
you can see the motor shaft is 3cm behind the boundary line, so the mouse has extra 3 CM to slower the speed down from 1.1m/s to 0.7m/s.
Technically, the earlier your mouse starts to read the wall, the faster straight speed the mouse can perform since there will be more distance for the mouse to slow the speed down. However, it is limited by the configuration of your side sensor(especially where the IR LED points to) and the valid reading range for your front sensors. What I want to explain here is how much MINIMUM distance you need in order to slower down from a faster speed to turn speed.
There is only one formula involved and I believe most of you aware of this ever since high school. The formula is:
Where Vo is the ending velocity and Vi is the initial velocity.
S is the distance and the a is acceleration.
The acceleration/deceleration for my mouse is 10m/s/s, the initial velocity is 1.1m/s in this case, and the ending velocity is 0.7m/s. By applying the equation as showed above, the result for distance is 0.036m, which is 36mm.
Apparently 30 mm is not enough to completely finish this deceleration process since 36mm is required, but if the next action is a turn, the mouse will have another extra 10mm straight distance since the 90 degree curve turn at search run for my mouse has a 10mm straight part before making a 80mm effective radius smooth turn.
Thus, the mouse actually has 30+10 = 40mm straight distance and is sufficient for my mouse to decelerate from 1.1m/s to 0.7m/s. On the other hand, you can re-organize the formula and use it to calculate how fast the mouse can go on straight with a known distance.(either way you like)
Risk always comes with faster speed, I am just going to use several cases to make you decide the balance between performance and risk.
2 video demos are showed here as another set of comparison for a normal search and fast search.
video 1 normal search:
video 2 fast search:
Usually the mouse will work fine if the light condition is not that bad with either search method. However, when there are some other strong light sources who also contain infrared light will significantly influence the signal receiving for the mouse. I made a test under sun light for both search strategies. First video is for normal search and the second on is for fast search:
Notice that the mouse crashed on both videos, at different time and location. In the first video, the mouse read the right wall with wrong info as the picture below consequently cause the crash for the mouse on the way back:
In the second video, the mouse crashed immediately on the forth cell since it couldn’t pick the front wall information correctly, and mistakenly though there was a front wall.
Even though the mouse crashed on both cases, the case with normal speed search did go further than faster search. The reason was because that when at normal speed search, the mouse read front wall at a closer range, which gives a more reliable sensor reading than a further distance. The other reason was because I didn’t recalibrate sensor at the environment with strong sun light. Anyway, it at least tells us fast search does have more risk than a normal search. But as long as you feel the light around the maze is OK, you can choose to enable this fast search strategy.
The fast search strategy was kind new for this year and I think I was the one firstly used(by differentiate the straight and turn speed, please let me know if I am not) on march, at APEC competition publicly. Back to the time, I was making my mouse running at a 0.5m/s speed for curve turn and 0.7m/s for straight, without read the wall information too much ahead of time. Video:
Then I saw something even crazy on YouTube from the students at LungWhua University of science and technology were using a 0.6m/s turn associated with 1.1m/s straight speed in a friendly competition with other school on early May.
Here is the video, the third and the last mice used this strategy.
Then another student from same school also implement this and performed a even faster speed with 0.8m/s turn and 1.3m/s straight speed. Video:
I was shocked with the performance, after having a conversation with them, I was informed that they actually made the mouse read the wall information 4-5cm ahead(way further than me).
Based on my sensor configuration, I prefer to make the mouse only go 3cm ahead of time instead of 4-5cm since I want the front sensor reading values being more usable. Then I modified some of my code and made the mouse be able to run with this fast search strategy, with 0.8m/s turn and 1.3m/s straight as the fastest speed(I normally use 0.7m/s turn and 1.1m/s straight for safety), the video is as follow:
After various of test at different light condition, I realized that this strategy has certain amount of chance to fail the front sensor reading with strong ambient light, so I make both normal search and fast search options available in the menu of mouse to minimize the risk in any future competition.
Interestingly, I had conversation with Peter Harrison about this search strategy since I heard he was worrying about the search speed of his Decimus 4 mouse before the 2013 UK Techfest. Since the curve turn for his mouse at search run only has 65mm effective radius(where my mouse has 80mm radius, however, with less straight part as trade off), so the stable turning speed he would like to use is only 0.55m/s at turn, which is the search speed that he used at APEC 2013: video taken by Eric Su
I guess he had chance to try out this idea after I explained how to achieve it, on the latest video for his mouse at Techfest 2013, even though the turn for his mouse is still 0.55m/s, but the straight speed was increased up to 0.9m/s, and you can see the mouse ran very smooth and quite during the search.
Here is the video for his latest run with fast search strategy, video is taken by Derek Hall:
If you happened to have pulse controlled sensors on your mouse and happened to be able to read fat enough, it’s not a bad idea to use this fast search strategy especially some competition take account of the search time into your overall time for your final score. I actually don’t have any chance to perform this publicly since I made it this fast after All America Micromouse Competition this year. May be next year, if the light condition isn’t that bad, I will consider to use it during the competition 🙂