The frenetic little bubble animated above is a *symbot*, Occupy Math’s own name for a type of super-simple robot. These robots exist only in the computer; we don’t actually make physical versions. There is an interesting book about this type of robot and its more complex cousins: Vehicles: Experiments in Synthetic Psychology by Valentino Braitenberg. These robots have sensors and wheels; the input to the sensors controls how fast the wheels turn. The interesting thing is the number of different behaviors that you can get out of even really simple robots. The robot above can sense the flashing light and is trying to approach it. It lacks the ability to slow down, so it’s learned to run the light over repeatedly. Think Labrador puppy.

**Under the hood.**

The following diagram shows the robot’s eyes (sensors) and wheels (those are the rectangles). The robot’s control method is simple. There is one connection from each sensor to each wheel. If the connection is positive, sensor input makes the wheel drive the robot forward; negative connections drive the robot backward in proportion to the signal at the sensor. This means we need four numbers (connections for left sensor to left wheel, left to right, right to left, and right to right). When Occupy Math started working with these robots, he also added the number **s** which is how hard the wheels drive the symbot forward when there is no signal at the sensors. The symbot also has a radius **R** for its body and the eyes are set at symmetric angles from the robot’s midline. We can specify a robot with five numbers, four connections and a default roll-forward rate: (ll,lr,rl,rr,s). The animated robot at the beginning of the post has control parameters (0.2,0.6,0.4,0.2,0.1).

**Hate and Love**

If we connect the left sensor to the left wheel and the right sensor to the right wheel and don’t use the cross connections, we get what Braitenberg calls *hate*. The wheel closer to the light runs faster and the robot turns away from the light. If we only use the cross-connections, the wheel farther from the light runs faster and the robot turns toward the light — after which it runs over the light and heads off into the distance. Braitenberg calls this *love*. Occupy Math has animated these behaviors:

The robot’s behavior is simple to understand. The sensors have more output if they are closer to the light. They control the wheel’s drive strength. The robot moves forward in proportion to the sum of the wheel’s drive strengths and turns in proportion to their difference. In a lot of ways, it is similar to the ways two oars work when you are crewing a rowboat.

**What else can they do?**

A really cool thing is how many *different* behaviors can be

encoded with just five numbers. Occupy Math has prepared a number of

examples of controls (ll,lr,rl,rr,s) and animations of the behaviors.

The names are evocative, but see if you can understand what’s going on.

These first three examples are dysfunctional robots.

These next two example robots spin a lot, but they are much better at

finding the light. The second one eventually achieves a stable orbit!

The symbots are *virtual* robots. They only exist in Occupy Math’s code libraries — no hardware. They are governed by very simple mathematical laws, but can exhibit very complex behaviors. They do this with two sensors and five fixed numbers. The symbots are part of complex systems theory. A complex system is one that is very hard to model because its elements interact in unpredictable ways. The symbots are a relatively simple system that exemplifies this situation. Braitenberg’s “love” and “hate” are easy to understand. In general, however, the path of a symbot is pretty hard to predict *except* by simulation. Occupy Math created the animations by crunching the numbers about how the robots rolled forward, turned, and then (in their new positions and headings) updated what their eyes were seeing.

Occupy Math works with digital evolution. All six animations — the ones that are not “love” or “hate” — are rounded-off versions of control parameters Occupy Math found with evolution. The dysfunctional ones are only slightly evolved. The ones that stay near the light or hit it over and over are the result of more evolution. Evolution does not need to “understand” the complex mathematics of symbot motion — Occupy Math tells it what behavior to look for (stay near the light) and a whole lot of solutions evolve based on performance metrics. Occupy Math can then mine those solutions for understanding and intuition. Here are several examples of evolved solutions to the “find the light” problem.

The symbots are virtual robots — entities composed entirely of mathematics with no physical existence. They are a lot of fun to play with. The symbots in today’s post are free range (the love and hate both go right off screen). Occupy Math has evolved symbots with walls, rubber walls, and electric fences at the edge of the square containing the light. The electric fence bots turn *slowly* until they face the light and then roll toward it. The rubber wall bots go really fast and turn to hit the light as they ricochet off the walls again and again.

Learning to work with the symbots teaches trigonometry, simple robotics, simple programming, numerical integration, and it makes math more concrete. Occupy Math will return to a favorite question: why don’t we teach this kind of math to students? Right now Occupy Math has only Unix code in C++ for they symbots. If enough people ask for an app, we may be able to develop one. The current curriculum seems designed to convey the very inaccurate messages that math is boring and difficult. Do you have cool math topics that might make a good classroom activity (or an Occupy Math post)? Please comment or tweet!

I hope to see you here again,

Daniel Ashlock,

University of Guelph,

Department of Mathematics and Statistics