start of a sumo robot contest

Mini-Sumo Strategies

[For more info about mini-sumo contests, see our Sumo Robot page.]

Richard shared Sumo Boy’s mini-sumo strategies with us at the September Riverside Robotics Society meeting.  We’re embedding that video here, and linking to the newsletter with Richard’s PowerPoint on other strategies, but we’d also like to hear your ideas and strategies. Robot contests are competitive, but they’re also friendly and collaborative at their best, so please feel free to ask questions if you’re a beginner like Serene, or share answers if you’re a veteran robot-builder.

One Comment

  • Serene Vannoy

    Hi, folks,

    I’m working on my robot for November’s contest. I have been meeting with Richard, and I’ve gotten a little teasing about that at the club meeting, but it’s really important to me to make the robot myself. That doesn’t mean I won’t ask him — and my fellow roboticists — a million questions. Here’s the first list of questions I asked Richard, and his answers. Please pitch in with your input, too. I’m so new to this, and I need all the help I can get. As I told Richard, my goal is to make the robot do what I tell it to, since it’s my first robot. Winning isn’t even in my top 5 goals right now.

    Questions and Answers About Mini-Sumo Robot Strategies

    Possible Strategies:

    Question #1: Have bot go in circles twice to see if it sees the other bot. If so, charge other bot. If not, move forward a bit (how much is a bit? 1/4 the length of the ring? What if that makes me go off the edge? Sense the edge?

    Answer: Good question. The official mini-sumo ring diameter is 77 centimeters or 30.315 inches. The problem is that you almost never know where you are in relation to the center of the ring. Anything that gets you closer to the center of the ring is generally good, but that isn’t easy. Since you are really pointing in a “random” direction, you can set some limits to “move forward a bit”. Some thoughts:

    One easy to implement strategy to get to the center of the ring is:
    Go forward until you hit the white ring and
    If both sensors see white, do a 180 degree turn, then go 15 inches.
    If only right-front sensor sees white, turn left 120 degrees and go 15 inches.
    If only the left-front sensor sees white, turn right 120 degrees and go forward 15 inches.
    (To do 15 inches accurately, experiment with a particular speed and test until you find out how long it takes to get 15 inches.)

    The good news is that this will give you good “floor coverage” of the ring. The bad news is it is time consuming and a smart, quick robot that sees you can nail you from the side or behind while you figure this out.

    The “Tornado”: There is nothing inherently wrong with spinning in a circle for a fairly long time. (Say 10 seconds) as long as your sensors are sure to catch an approaching opponent. A variation of this would be:

    Turn clockwise at full speed, taking distance readings constantly for a few seconds. The Sharp series of infrared sensors can take a reading every 27 milliseconds. Add a few milliseconds to ask the question “Target acquired?” and you can take about 30 readings in a second. Let’s say you adjust your bot speed when circling to 2 revolutions per second (actually pretty fast), you go 720 degrees in 2 seconds. You take 60 readings, or a reading every 720/60 = 12 degrees. If the beam width of your sensor is less than 12 degrees (Sharp IR is 6 degrees) then you only have a 50% chance of seeing the target, which is bad (so slow down the turn speed to ½), but if the beam width is 30 degrees (typical of Ping and acoustic sensors) then you are almost sure to detect a target in range of the sensor. (I just estimated these numbers, but IT IS VITAL that you know the beam width of your sensors, and make sure in a 360 degree turn that you cannot miss an approaching target.)

    Then reverse. Turn counterclockwise for a few seconds at a slower speed. Repeat.

    This will make it almost impossible for an opponent to get close to you without being detected.

    Question #2: Install sound sensors on all 4 sides (too heavy?). Head in the direction of the sensor that senses the closest thing?

    I am not a fan of side/rear sensors. The strategy is too defensive and takes time away from my prime objective. Keep turning until the target is detected. But there is a “good news” part of side/rear sensors. If you detect the opponent, it makes it very easy to turn 90 degrees or 180 degrees and be facing the opponent.

    Question #3: Have scoops/flaps on all 4 sides (too heavy?) and when something touches one of them, go in that direction fast and hope it pushes the other bot off the circle.

    This is a very popular strategy!! Also, it is very effective. If the opponent runs up on the front or back scoop, (Which is fine.) pushing him out of the ring is close to a sure thing. The trick is to come up with a successful algorithm for what to do with a robot at your side. Leaving him at my side won’t get him pushed out of the ring. Since it is likely in this situation, I assume the opponent is trying to push me out of the ring, so I might try to go forward 6 inches, turn 180 degrees and attack.

    Question #4: Do the tornado and as soon as it senses something (how does it know where if it’s spinning fast?), head for that something quickly.

    My favorite strategy!!
    Here is my algorithm. First the math…
    (If you use acoustic sensors the beam width is more like 30 degrees, so that would require you adjust the calculations to match the beam width of the sensors.)

    I use 3 Sharp GP2Dxxx sensors with a beam width of 6 degrees each. One sensor has a range of 30 inches (perfect to see a target anywhere in the ring) and two sensors with a 1 foot range (to refine the exact location of any bot within a foot.)
    I point the 30 inch sensor straight ahead.
    One 1-foot sensor is pointed 5 degrees to the right of straight ahead and the other is pointed 5 degrees to the left of straight ahead.
    The combined beam width of all three sensors is 16 degrees.
    The beam width of the middle sensor only is 6 degrees.

    I must first assume that the opponent is greater than on foot away because I need to make a complete search circle, and since I can only see “far away” with the center sensor, I need to use that only for the initial search.
    To get good coverage with my 6 degree beam width, I want to take a reading every 5 degrees as I turn. In a 360 degree turn, that means I want to take 360/5 = 72 readings. How long does it take to get 72 readings?

    Sensor read time = 27 ms, I forget the exact number, but say
    Processor time = 13 ms
    50 ms

    So, 72 readings take 50 ms X 27 = 1350 ms or 1.3 seconds.
    (Find a second hand on a clock, or a digital counter/timer that ticks each second. Now, draw a circle in the air with your finger that does one complete circle every second. Your robot needs to spin a little slower than this. I say a little slower to build in a safety factor in the search.)
    (Notice that servo driven bot cannot turn this fast!)

    Now here is what the pseudocode looks like:

    Left and right motor speed = slow
    Start turning
    Read 30’ sensor
    Anything there? If NO, go to Step 1
    Stop turning
    Read left and right 12’ sensors
    Anything there? If YES, go to Step 10
    Move forward to spot calculated to be 10-11 inches from the target
    Go to Step 3
    Read left and right sensors // Begin attack mode
    No contact on either? If True, go to Step 1
    Target closer to left sensor? If no, go to Step 16
    Left motor speed = 5
    Right motor speed = 10 // Now going forward and to left
    Go to Step 10
    Left motor speed = 10
    Right motor speed = 5
    Go to Step 10

    Dialog:
    Steps 1 through 5 continuously turn the robot, reading the 30 inch sensor until a target is detected at 30 inches or less.
    Steps 6 through 8 find out when the target is one foot or less away. If the target is farther away than one foot, it just moves forward to get the target within a one foot range. We go back to Step 3 each time we check because the target is a long distance away, and we just moved, so the possibility that the target has just moved out of the search beam is high, so we recheck.
    Step 8 calculates how far we need to go to get the target one foot away. Say the distance reading from Step 3 is 19 inches. To get within one foot, we must travel 7 or 8 inches. Or moveDistance = range – 12.
    Steps 6 and 7 continually check to see when we get to within one foot of the target. That is important in my algorithm because I go to “Ramming Speed” at one foot away to slam into the target at my best speed. I usually do this by applying 18 volts to my 12 volt motors to force them into maximum speed.
    In Steps 13 through 17, I simplified the algorithm. What I really do is this:
    I use the left and right sensor readings as a proportion. Compare these two readings:
    Left Sensor Right Sensor
    1 6.9 in. 7.0 in.
    2 12 in. 7.0 in.
    Reading 1 says “The target is about 7 inches away, so I want to go almost straight at it. Since the right side of the target is a little closer, I can turn a little to the right as I move forward.”
    Reading 2 says “The right sensor says the target is 7 inches away. The reading of 12 inches on the left sensor is impossible, and I happen to know that the sensor reads 12 inches when there is NO TARGET in front of it. So the target is off to the right. So now I can turn more sharply to the right as I head for the target.”
    So, I just take the ratio of the two readings to tell me how straight or curved I need to be moving to get to the target.
    When done properly, it is a thing of beauty to see your robot “wiggle” very fast as it approaches the target at top speed. This tells you that the algorithm is constantly changing the robots course so that it hits the opponent smack in the middle!