
Do you like hillside rides? I do. If you don’t mind, let me take you for an imaginary roller coaster ride around the hilly landscape of an antenna’s inner workings. It has 8 dimensions and the shape of a doughnut.
Supply, Inc (subscribe to their beta!) is a flourishing tech start up in San Francisco, CA. Its enthusiastic crew of MIT engineering graduates are trying to bring forth a major step forward in the world of wireless technology: room-wide wireless phone charging.
To do so, they employ an antenna sending power to a receiver in the form of radio waves. In order to achieve a desirable amount of charging power, the antenna’s output needs to be focused on the receiver rather than spread out in all directions like for your regular Wi-Fi hotspot. This means that the antenna needs to have some “dials” that one can tune, in order to “find” the receiver and focus power onto it.

The folks at Supply, Inc are able to pull this off by controlling 8 dials: the antenna’s “phases”. The phases are angles, so they go from 0 to 360 degrees and then wind around back to 0 and so on, cyclically. A bunch of 8 features that are all periodic will form a weird-donought-shaped space that we call an 8-torus.

How do I get into the picture? Supply does a very good job sailing through this awkward sea of configurations to find the one delivering the most power to the receiver. However, this works mostly in the case of a clear line-of-sight between antenna and receiver. If something is in between, say, a grumpy cat, often the ideal solution is hidden in the quirks and kinks of this configuration space.

Why doesn’t supply just run an optimization algorithm in this 8D space? After all, as we will see in the following, the space is convex and the calculation should converge quickly to the correct solution. But… every function evaluation is an actual real-time measurement in our case. The antenna explores and the receiver tells it back how much power it’s receiving each time, like so.
So whatever algorithm we use, it shouldn’t have too many function evaluations. Alas, an 8D gradient does not comply with this requirement.
Do you wanna know how I saved the day? Well, I looked at the landscape…
Imagine you’re trying to reach the very top of a hill without a map, and blindfolded. What can you do? Well you can start by walking up the side along the steepest path. (This method is what we call gradient descent ascent.) But… what if there are a several minor separate tops on the hill and you climb up the wrong one?

Also, to determine which direction is the steepest you will have to try and sample the terrain around you. In 2 dimensions this only requires trying in two directions and deciding, in 8 dimensions you’ll have to try in 8 directions…
So the secret here is that the landscape we’re in isn’t quite that random at all.
For starters it only has one hilltop (it’s convex!). How do I know? Well I looked at all the very high points on the map and checked that they were all lumped up together in one group (one cluster) instead of making up separate hilltops here and there.
Second and more importantly this hill looks more like a ridge running NE to SW than a dome-shaped hill.

That means that to find the top we just need to start walking towards NW.
You’ll say: “Cheater! You peeked at the map!”. True. But here’s the nail in the coffin: no matter what the map looks like (which for our real problem means no matter what room we’re in and how we placed our antenna and our phone) walking towards NW always works! You might get there sooner or later but you will.
And that’s how I saved the day.