
Picture this.
A robot sits in the bottom-left corner of a 10×10 grid.
There are 100 numbered tiles in front of it.
Your mission:
Is to make sure the robot crosses every single number.
Sounds easy… until the rules start changing.
Let’s walk through the VEXcode VR “Cross Every Number” challenge together—and see how each level quietly teaches a powerful programming idea.
Lesson 1: How Would You Cover the Whole Grid?
First question for you:
If you had to walk across every square in a grid, what path would you take?
Most people picture something like mowing a lawn—and that’s exactly right.
🟩 The “Snake Path”
The robot:
- Moves across one row
- Slides up one tile
- Comes back the other way
Left to right.
Right to left.
Repeat.
No fancy thinking required, it’s just a repeatable pattern. By keeping the pen down the whole time, the robot marks every tile in one smooth motion.
💡 What you’re really learning:
This is your first taste of loops. When a task repeats, your code should repeat too.
Lesson 2: What Happens When Order Suddenly Matters?
Now let’s change one rule.
The robot must cross the numbers in order, 1 through 100.
Pause and think:
After finishing number 10, where does the robot need to be to reach 11?
Exactly. Back at the start of the next row.
But there’s a problem…
If the pen stays down, the robot will mark tiles it shouldn’t touch yet.
✏️ Enter: Invisible Movement
The robot learns to:
- Lift the pen to move safely
- Travel back into position
- Lower the pen only when it reaches the correct number
This is a big moment.
💡 What you’re really learning:
Good programs control when actions happen.
The robot isn’t just moving, it’s managing its state.
Sometimes the smartest move is choosing not to act.
Lesson 3: Can the Robot Tell Odd from Even?
Next challenge:
- Odd numbers → red
- Even numbers → blue
Quick question:
Would you want to change the pen color 100 separate times?
Absolutely not.
🔢 The Modulo Magic Trick
Instead, the robot keeps track of the current number and asks one simple question:
“If I divide this number by 2, do I get a remainder?”
- Yes? → Odd → Red
- No? → Even → Blue
With one math check, the robot colors every number correctly.
💡 What you’re really learning:
This is decision-making in code. One rule can replace dozens of instructions.
The robot isn’t following a script anymore—it’s thinking.
Lesson 4: Is Crossing a Tile the Same as Touching a Number?
Final twist.
The robot must actually touch the number, not just pass over the tile.
So ask yourself:
How do you guarantee contact?
🎯 The “Tiny Mark” Move
The robot makes a tiny motion:
- 20 mm forward
- 20 mm backward
That’s it.
This small move ensures the pen hits the center of the number every time. By tracking which column it’s in, the robot also knows exactly when to move up to the next row.
💡 What you’re really learning:
Precision matters. In robotics—and in life—small actions often make the biggest difference.
Final Challenge: What Did the Robot Really Learn?
By the end of the grid, the robot can:
- Repeat patterns
- Track its position
- Make decisions
- Act with precision
Those are the same skills used by:
- Factory robots
- Warehouse systems
- Self-driving vehicles
The grid may be small—but the thinking behind it isn’t.
So here’s the real question:
If a robot can learn to think this way… what could you build next?
Leave a comment