Files
Tim Hadwen 1f8c46597b Site audit: fix broken images, add activity metadata, clean up content
- Remove broken image references from 25 MDX files (deleted spacer/content images)
- Add codingSkills and roverConcepts frontmatter to 24 activity pages
- Fix "Activity Demonstration" headings in 15 activity files (plain text -> h3)
- Remove unused "All" category from 89 MDX files
- Decode HTML entities (> <  ) in 9 content files
- Escape bare < > characters in MDX to fix build errors
- Standardize contact email to contact@micromelon.com.au
- Add missing description to rover-repair-request metadata
- Include previous session work: about-us updates, difficulty filtering,
  LearningPathway component, expanded schools list, new product/resource images

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:49:15 +10:00

47 lines
2.7 KiB
Plaintext

---
title: "Activity: Sumo III"
date: "2021-06-05"
categories: ["Activities", "Simulator Activities"]
tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Gyroscope", "Accelerometer", "Motors", "Functions", "Advanced"]
codingSkills: ["Branching", "Iteration", "Algorithm Design", "Functions"]
roverConcepts: ["Colour", "Ultrasonic", "IR", "Gyroscope", "Accelerometer", "Motors"]
excerpt: "Master sumo with advanced strategies using the gyroscope for precise movement, the accelerometer for defensive tactics, and functions for clean code."
featuredImage: "/images/resources/sumo.png"
---
Create the ultimate sumo algorithm. Use every sensor on the rover to build an advanced strategy that combines precise movement with the gyroscope, defensive detection with the accelerometer, and organised code using functions.
### Activity Demonstration
### Setup
Use the same sumo arena setup. For an extra challenge, try a smaller arena (40-50cm diameter) to force more aggressive and precise play.
### Building On Sumo II
In Sumo II we added IR sensors and a search pattern. Now we'll use the gyroscope for controlled turning, the accelerometer for defensive awareness, and functions to keep our code organised.
#### Stage 1: Precise Movement With The Gyroscope
Use the gyroscope to make controlled turns when searching for opponents. Instead of spinning wildly, rotate in measured increments (e.g. 30 degrees at a time) while checking sensors between each turn. This creates a systematic sweep of the arena.
#### Stage 2: Defensive Tactics With The Accelerometer
The accelerometer can detect when your rover is being pushed or tipped by an opponent. If a sudden acceleration is detected from behind or the side, the rover knows it's under attack. Program a defensive response: spin to face the attacker and counter-charge.
#### Stage 3: Organise With Functions
Create functions for each behaviour: `checkEdge`, `scanForOpponent`, `charge`, `defend`, and `searchPattern`. Your main loop should read as a clear sequence of decisions. This makes it much easier to test and tweak individual strategies.
#### Stage 4: Adaptive Strategy
Combine everything into an adaptive algorithm. Start with a search pattern, charge when an opponent is found, defend when being attacked, and always stay away from the edge. The priority order matters: edge avoidance should always come first, then defence, then attack, then search.
### Challenge
Battle the AI opponents in the Micromelon Robot Simulator. Can you defeat all three difficulty levels? Try designing a 3D printed attachment to give your rover an extra advantage.
[Activity: Sumo I](/resources/sumo)
[Activity: Sumo II](/resources/sumo-ii)