Archives For algorithms

click image to open the model

Predator-prey models are argubly the building blocks of the bio- and ecosystems as biomasses are grown out of their resource masses. Species compete, evolve and disperse simply for the purpose of seeking resources to sustain their struggle for their very existence. Depending on their specific settings of applications, they can take the forms of resource-consumer, plant-herbivore, parasite-host, tumor cells (virus)-immune system, susceptible-infectious interactions, etc. They deal with the general loss-win interactions and hence may have applications outside of ecosystems. When seemingly competitive interactions are carefully examined, they are often in fact some forms of predator-prey interaction in disguise.

Typical predator-prey models consist of 2 populations, where the predator affects the prey (through killing) and viceverse (no prey, no food). These dynamics can be represented with mathematical equations and run through simulation models (mainly System Dynamics).
In this adapted model, the predator does not die if there is not enough prey, they just migrate outside of the system. If there’s a lot of prey, they migrate into the system. This very small adaptation to the dynamics may lead to more structural possible outcomes.

Run the model with me and I’ll show you what I’m talking about!
When you first run the model, you get a transitional behavior, and a permanent, cyclic one, in which both populations have alternating peaks and valleys.

Overshoot and Collapse

Now what happens when you increase the Birth Rate (of prey)? You end with nothing! Why is this? Delays… You see that due to a high birth rate, prey population increases greatly, bringing a huge amount of predators into the system. This increase in predators makes the killing increase over births, reducing greatly the prey population. But by the time the predators realize that their food is depleting and leave the system… it is already too late.

Reduced Delays

Let’s try another thing now, let’s reduce the delay. Start the model over, and set the Migration Delay to the far left (0.01). You’ll immediately see that oscillations cease and equilibrium is found. Now try to increase birth rate, and see what happens. A new equilibrium is found, no collapse!

Play Around

There is another key behavior (the damped oscillator) which you can achieve by slightly reducing the delay. Anyhow, you can try out different scenarios, I’ll explain the controls. We already covered birth rate and migration delay. 
  • Desired Level of Attraction: is the amount of prey the predators see as “comfortable”. More than this, they inmigrate, less than this and they will emigrate.
  • Death Rate: is the natural death rate for prey (unaffected by predators).
  • Hunt Rate: is the rate at which predators “kill” prey.
  • Predator Perception Sensitivity: is an indication of how quickly or slowly predators are wanting to enter or leave the system. It is lightly different to Migration Delay. The first is the intention to migrate, the latter is the actual migration.

Outside Predator-Prey

Predator-prey structures can easily be extrapolated to other areas of application. The concept that delays make for oscillations and can potentially lead to overshoot-and-collapse behaviors has nothing to do with the predator-prey system. We can see the effect of delays, for example, in supply chain behaviors, where small shifts in consumer demand usually lead to huge shifts upstream. 
Whenever there is an action to be made, usually this action is based on some kind of input (which may take the form of gut-feeling, metrics, symptoms, etc… you name it). The thing is that there is a delay between the fact, and the moment in which we receive information for this input. How big or small the delay is depends on numerous factors, but for sure, there is a delay. 
After reading this, I hope that next time you take an action, you stop to think on delays and avoid over-reactions. 

What is an algorithm?

An algorithm is a step-by-step procedure for calculations. The following is an example from the “HowStuffWorks” website:

Let’s say that you have a friend arriving at the airport, and your friend needs to get from the airport to your house. Here are four different algorithms that you might give your friend for getting to your home:
The taxi algorithm:
  1. Go to the taxi stand.
  2. Get in a taxi.
  3. Give the driver my address.
The call-me algorithm:
  1. When your plane arrives, call my cell phone.
  2. Meet me outside baggage claim.
The rent-a-car algorithm:
  1. Take the shuttle to the rental car place.
  2. Rent a car.
  3. Follow the directions to get to my house.
The bus algorithm:
  1. Outside baggage claim, catch bus number 70.
  2. Transfer to bus 14 on Main Street.
  3. Get off on Elm street.
  4. Walk two blocks north to my house.

Continente Siete Beginnings
Continente Siete started as a business consulting boutique company, with big focus in mathematics. We had the know-how, we had technology, methodology and teaching experience. Put these traits in the cocktail mixer and the first result that pops out is: consulting! Why? Consulting pays, and we already had some experience in the industry as well.
We started out as “Business Psychologists”, trying to understand companies’ problems, and offering innovative solutions to overcome them. This path took us to Demand Forecasting, where we tackled Forecast Accuracy problems for major companies through various approaches (technology, process engineering, methodology and training). The path also took us to Transportation, Online Marketing, Telecommunications and other Industries. The mechanics, however, were always the same. You tell us your bigger problems, and we’ll find an innovative solution.
Business for Continente Siete resulted promising, the company grew from 4 employees to 20 in less than 2 years.
The Consulting Dilemma
What was our growth model? Sell more projects! However, this required us to hire more people, more training, etc. In the end, we could never turn around income-cost equation drastically enough.
Furthermore, potential projects were always huge, and often led to long negotiations that could turn out either way. This made planning extremely difficult.
Combine these two, and you have a company that is always living in the edge, having to think thrice before entering negotiations with a potential new client.
Continente Siete’s Shift
Early 2012 we took a strategic turn towards pure algorithms. Before, algorithms were part of a bigger service, but after this point, they became our core.
The idea was simple (and frankly, it was always there, but we had never made it explicit before this point), find a massive problem, and identify what part of that problem can be addressed with pure mathematics, no humans involved.
Continente Siete would then continue their consulting service, but redefine it as either Private Lab, or Premium Service. These are today our labor intensive areas of application. The third area, the biggest one, is development. This way our services fund our product developments, until they become self-sustainable.
This is where we are right now, trying to make our developments self-sustainable so that they can serve as an “income buffer” for the whole Company, and shift planification towards the long-term.
Algorithms in Continente Siete
Today there are several algorithms we are developing inhouse.
Flimbu: our most mature product, Flimbu automatically optimizes any Adwords account by changing the CPC (cost-per-click) values of every keyword in the portfolio. In order to do this there are extraction, forecasting and optimization algorithms working in sync.
Behavioral: e-commerce is still growing at gigantic steps. Almost all sales come from either the website or a newsletter. However, most companies are using the same website layout and newsletter configuration for everyone. This not only has a short-term opportunity cost, but it also has a negative long-term effect on the user (they get tired, saturated). Behavioral is a set of algorithms that understands patterns in the users and uses these patterns to optimize both newsletter configuration and website layout. Businesses should only offer what is attractive for the specific user.
Forecastia: this product not only contains a set of forecasting algorithms (this is commodity) but it offers an extremely efficient matching algorithm. The latter is its competitive advantage, which is understanding what forecasting model should be used for each series, and how to “clean” the series before even starting to segment it.
Price Analytics: how much do I gain by increasing the price of this product by 10%? Price Analytics is a set of algorithms that target this type of questions. By reading price movements and volume shifts in sales through econometric and data mining algorithms, it is able to quantify price elasticity effects (of both promoted and non-promoted products).
a mathematical algorithm that rotates a simple geometric figure in three dimensions, but it's easier to say it's a butterfly, right? Plus, it has the metaphoric perks...
Continente Siete logo figure – a mathematical algorithm that rotates a simple geometric shape in three dimensions, but it’s easier to say it’s a butterfly, right? Plus, it has the metaphorical perks…

Why do Algorithms?

The strategic turn in Continente Siete aimed towards algorithms, but… Why algortihms? Well, there are several benefits in developing algorithms:

  • Non-linearity: algorithms can be run by computers, which in turn can be set into products, enabling for non-linear growth. This means that they are completely scalabale, and we don’t need to incur in significant costs to provide the product for more clients. Marginal costs are close to zero.
  • Universal language: mathematics is Universal, and so are algorithms. It doesn’t matter whether you are in Argentina, or in Pakistan, the code is the same.
  • No boundaries: no shipping costs, no material movement, basic logistics. The only thing that travels is information, and Internet enables it to travel the whole World. 
  • Unrestricted: there are practically no laws or policies that restricts the importing / exporting of data. Business does not depend on the Government type.
All these benefits make algorithm development extremely attractive. However, there is a big con in algortihms. As it travels the world and is somewhat visible to many eyes, copying becomes fairly easy. There are very low entry barriers. So how does Continente Siete build their protection policies?

I like to believe we turn a con into a pro. These low entry barriers motivate us to build our protection system base on innovation and continuous improvement. Stay ahead and let them copy!