A few months ago, my friend Trey Roady offered me an interesting question:
Given the interesting behavior of bio-inspired swarms in regard to grouping at resource locations, how would this behavior affect the actions of automated trading algorithms as they are currently being used. While separately designed, shared logic may result in very similar resource identification and behavior.
Now, I freely admit that most people find that sort of stuff weird or incomprehensible, but it’s the kind of problem that I enjoy pondering. So I pondered it (this apparently caused some frowns when asked to a group of panelists at a conference), and came up with some interesting answers since this has some of the elements of a wicked problem.
The short answer is that you’d reach some sort of equilibrium (assuming no human steps in and interferes) and the length of time to reach that equilibrium depends on the number of individualized outcomes that are in play and what the limits set on each program are. For instance, one person using ReallyGreatAutotrading might prefer to buy at 32.25 and sell at 35.70 while a second one would accept buying at 33 and selling at 37 and a third would only buy at 30 or less but will sell at 33. Eventually the lower points will all be met, and if there is no instruction to the program to “keep dropping that price until someone buys it” then the game ends after all goals have been met (buying stock at a certain price.) This will also occur even if you tell the programs “there’s no limit. Buy the cheapest stock you find and then set a price $20 higher and drop it by a dollar until someone buys it.”
Operations are not simultaneous (it can’t buy and sell at the same time) but there may be an extremely short amount of time between them.
But, hey — for we polymaths, the idea that “we can take this further” is always appealing, so I began to consider the behavior of swarms and resource acquisition.
Consider a game of “Robot Fueling Stations” — an ideal world of only robots where each unit is harvesting a fuel source (though any resource could be used.) It’s a nice table-top kind of world, with a lot of area to explore but with a monolithic environment (a vast tabletop.) There’s no difficult terrain to traverse to get to this source and there are no competitors — only a swarm of robots which are able to evolve strategies to get the fuel but which are free of algorithms for greed and monopoly (since Trey didn’t set those up in his proposal.) I am also assuming that the resource is theoretically not limited (say, for instance, a swarm of robots that use solar cells and which search out patches of light for power rather than a swarm of robots taking sips out of a bucket of water.)
After some thought and reading, I came up with a plausible scenario involving three basic types of resource types, three basic swarm behaviors, and three basic usage (“stopping rules” — what they do when they acquire a source) behaviors:
The resource may be:
* immersive (example: air. Our air quality differs, but whenever we need air we simply breathe. It’s all around us and we are immersed in it.)
* a single localized source with limited area of access (example: the continent of Australia. Theoretically, everyone on the planet could eventually go there but the amount of time to reach there is different for someone living in (say) New Zealand versus someone living in a small village in the middle of the Andes mountains.
* multiple sources with limited access (example: waterholes in Africa.)
The swarm behavior may be:
* similar to bees, where a messenger comes back with information about a resource (amount and quality and quantity) and there is a group decision about which resource will be chosen to exploit in which order.
* similar to locusts, where the swarm descends on a resource, uses it all up, and descends on the next closest one in the direction of travel.
* similar to ants, where exploration for new resources continues and the easiest to reach resources are exploited first (ants leaving a scent trail to food. There is no decision made about qantity or quality.)
Stopping rules may be:
* continuous consumption (again, analogous to air — we breathe… we don’t store air) and then leave until there’s a need for the resource.
* fueling (only a certain quantity can be acquired and then the harvester leaves the area until it has a need for the resource again)
* barter (transfer to another unit that has a lower amount of this resource)
* store (bees returning with nectar and pollen to the hive to be stored and eaten later.)
Let’s eliminate the trivial cases. If the source is universal (like air) an equilibrium (everyone gets as much as they need) is reached instantly and no strategy (locust/bee/ant) is superior to any other. If there is a single localized source and there is no competing group (we don’t have multiple swarm groups of robots competing for the same light spot) then strategy is irrelevant because all strategies have only one point that they want to access.
Now let’s consider equilibrium points for single source-single models (one big area of sunshine and a lot of little solar powered robots.) In this case, the outcome is dominated by stopping rules. If the rule is “consume on the spot” then the first row of units to arrive at the perimeter of the resource will take what they need — and if there is no mandate to move further will simply block the resource for all other units. Whichever units have the shortest distance to travel are most likely to be the successful ones, and that’s the end of a not-very-interesting scenario.
In a “barter” scenario, the first row of harvesters at a site has immediate access to the resource. According to the mandate, they will then transfer this resource to nearest unit that is most in need of the resource (in this chase, they’ll extend a charging port to the nearest robot that desperately needs a charge and give them a certain amount of power.) Once the resource has been transferred, they will turn around to pick up a fresh amount of the resource. Power is transferred from the center outward in a “bucket brigade” fashion. This will continue until each unit has no neighbors that are needier than it and a stable state is achieved.
“Fueling” scenarios will be both time and distance dependent. At any given time, the units which are closest to the resource they need will be moving toward the resource and those with the least need will be moving away. The equilibrium point depends on how quickly the fuel resource of the individual unit is used up and the size of the acquisition area (the “pool” of fuel.)
Multiple source strategies are affected by both swarm strategy and by “stopping rules.” Here, the ability to communicate and coordinate strategies changes the style of play. The least efficient algorithm (no matter which stopping rule is in place) is the “locust swarm” where a direction is set at random and the entire group descends on the resource, then searches randomly as a group for the next source. Although this inefficiency isn’t noticeable in situations where the resource pools are infinite or where they are finite but closely spaced. However, when the resource pools are restricted in some way and spaced farther apart, then different algorithms emerge as the dominant strategy.
Now… one could examine various algorithms, but frankly the bees and ants have done our work for us. The ant strategy works where resource quality and quantity is not important but closeness is important (the size and quality of a food source is not as important for the ants as the nearness of the resource since scent trails decay over time.) The bumblebee swarm strategy works best when the quantity and quality of resources matter and closeness is not as critical a factor.
The answer is independent of whether the whole swarm has a base (a “nest”) or moves to the new resource. The advantage of both the ant and bee models is that searchers continue to search for new supplies even as the bulk of the group devotes itself to moving to retrieve the most recently accepted resource. The ant model would be preferred if the overall requirement is simply to quickly locate and tap into resources, while the bee model is a better choice if there is some reason to prefer some resources over others and time is not a crucial factor.
There are undoubtedly other answers — these were simply the ones that came to me when Trey told me about this interesting little question.
I’m sure Trey will think of other things to ask me.