viernes, 4 de enero de 2013

Predator-Prey - Migration Adapted

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. 

viernes, 28 de diciembre de 2012


The Market Behavior:

What if you are a company competing in a challenging market. You would have to make decisions in order to increase your profit and the amount of sales.

You might consider that consumers will choose the company that brings them more benefit taking into account certain factors.

The questions would be: what decisions do I make as a company? Which factors are more relevant for consumers? How do I get an advantage from my competition? How do I react to my competitor´s moves?


So to answer these questions we developed a model that is a simplified representation of a dynamic market, with the following assumptions:
  • There is one product sold by multiple companies that are price-setters ( 0.1≤ Price≤1 ).
  • Each company produces according to demand, they don’t stock product.
  • Each company decides to produce the product with a certain level of quality (1≤ Quality ≤10  ).
  • A company´s initial price and quality is randomly assigned according to a uniform distribution within the range.
  • The company´s variable cost increases with the square of the quality it produces.
  • All companies have the same fixed costs.
  • All companies have a target market share according to:
                                   Target Mkt.Sh.= 1.15×(∑ consumer)/(∑company)
  • A company’s state is discretely defined by two variables: profit and market share.
  • There are four possible states for a company:
  • Star: Profit > 0 and Mkt. Sh. > Target Mkt. Sh.
  • Cash-Cow: Profit < 0 and Mkt. Sh. > Target Mkt. Sh.
  • Question Mark: Profit > 0 and Mkt. Sh. < Target Mkt. Sh.
  • Dog: Profit < 0 and Mkt. Sh. < Target Mkt. Sh.
  • Each company will follow one of two set strategies: price-driven competition and quality-driven competition.
  • Each user agent consumes only one product.
  • The product a user consumes is chosen to maximize his utility function.
  • The utility function for each consumer is:
  • U(P,Q)=P^α Q^(1-α)            P: price, Q: quality
  • Users’ α parameter are distributed according to a uniform distribution between [0,1]
  • Users continually reevaluate the utility of all products in the market and adjust their consumption decision.
  • In the model you may choose the amount of companies that are competing on the market. 
While proving the model you might notice that:
  • Under the specified assumptions, the price strategy trumps the quality strategy.
  • There is a better chance of higher consumption diversity when the market has fewer companies.
  • The higher the competition the lower the profits.

You can try the model we developed here: http://www.runthemodel.com/models/934/

viernes, 9 de noviembre de 2012

Keep calm and win again

"No, success is something I don´t wish on anybody. It´s like what happens to mountain climbers; they kill themselves to get to the top and when they get there, what do they do? Climb down, or try to do so, discreetly, with as much dignity as possible." - Gabriel García Márquez
The Formula 1 Grand Prix in Abu Dhabi was held on Sunday November 4. The final podium was conformed by Kimi Raikkonen, Fernando Alonso and Sebastian Vettel. If we look at the drivers' championship to this date, this result is not surprising. However, if we look at the career development, the final positions could seem bewildering. How could such a result have occurred? Only these drivers seem to be able to accomplish a feat of this magnitude: the first one of them, winning with a less developed Lotus vehicle, the second starting sixth with a F2012 which in recent competitions does not meet his demands and the third, with all the opponents in front of him.
But is this really surprising? Honestly, no.
The reason for this deduction is based on the existence of an archetypal behavior which explains how a success can explain a new future success: the success of the successful.

Success to the Successful archetype
In this archetype there is competition between two or more actors who share a given limited resource among themselves, from the results achieved in the first instance, and then reuse this resource to generate a new competitive advantage with a direct result on the next competition. Thus, one who achieved the first victory has an advantage that may favor him in the next instance, with a forecast in his favor that, if carried out, will then extend his advantage, gaining momentum advantage at the expense of the other competitors.

To better understand this behavior we can rely on the following article which lists ten reasons justifying it, carried to the field of sports. Listed are some aspects such as the morale and self-determination, more difficult to quantify; but are also other factors, such as the press, the continuity and the invitation to best practices, reinforcing the theory of success.
Is this always the case? Clearly, not. In response, there is another article which warns of the possibility of falling into the obsession of success. In short, the author stresses the importance of not evaluating success by the success in itself, but to find ways to measure not only focused on the outcome. If so, would pose a possible solution to this archetype, avoiding entering the success to the successful behavior (and the consequent failure of failure).

What other options exist to overcome this vicious circle?
The best response is to always stay one step ahead: be proactive and take the initiative to carry out all necessary action to achieve a significant advantage over the competition. This means acting big.
Finally, the definitive way to avoid entering a bond of this type is to leverage on oneself: in order to have control over the desired success, and to escape from result-determining performances, it is necessary to start with a good attitude, and work in this internal communication, as described in this latter publication.

As a final conclusion, we can say that this type of behavior can be expected in any circumstances in which you compete for a common resource and that, if sustained, can be very detrimental to any of those affected and, ultimately, for the overall system. It is your own responsability to depart from this model with  cooperation and a global goal as the best solution in the long run.

viernes, 26 de octubre de 2012

C7 reads

Since its beginnings, there were very few requirements for each new C7 employee. As time went by, some basic conditions were added, each of them with its corresponding learning system, to carry out in the first months of activity.
However there is a first condition that survived from those early days and that remains valid today: reading.
An old rumour, which has already become myth, says that Hari Seldon himself predicted C7's foundation, while working in his theory about the Galactic Empire decline. In his honor, The Foundation (I. Asimov) is the first non-theoretical book recommended for anyone who wants to understand what is done within Continente Siete.
In contrast, in The Fifth Discipline (P. Senge) is where one can find better answers in terms of operational and theoretical aspects. These help you understand the mindset and approach taken in most problems, and the subsequent resolution.
The last member of the founding triad is The Black Swan (N. Taleb). This book serves as a constant reminder that those premises which are assumed as valid are not always so, thereby driving a constant review of every working paradigm.
Numerous literary works were added to these three books, such as Statistical Inference and Design of Experiments (R. García), Six Pixels of Separation (M. Joel), Pride and Prejudice (J. Austen), The Courage of Truth (M. Foucault), The Tipping Point (M. Gladwell). Each one of them has an owner who lends it so that anyone interested can read it, scoring on a sheet that serves as a record and control, to avoid  losing anything on the way.
Together, these books foster the habit of reading, both as educational and for the simple pleasure of reading. In fact, our library is near the arm chairs, inviting anyone who has some time off to visit at any point.
So the next time you come, we invite you to look through all these books. I am sure you'll find one that catches your eye, allowing you to pause your activities, have a coffee and read, read, read.

Leer, leer, leer, vivir la vida
que otros soñaron.
Leer, leer, leer, el alma olvida
las cosas que pasaron.
Se quedan las que quedan, las ficciones,
las flores de la pluma,
las solas, las humanas creaciones,
el poso de la espuma.
Leer, leer, leer; ¿seré lectura
mañana también yo?
¿Seré mi creador, mi criatura,
seré lo que pasó?
- Miguel de Unamuno -

viernes, 19 de octubre de 2012

Systems - Ontological vs Epistemic approach

This time I'm going to delve in a more philosophical or theoretical aspect. Is quite an open-ended thing, so don´t expect a straight up point!

It all begins because many times we found ourselves (in C7) talking about systems, whether it's about defining a problem, understanding the dynamics of a situation, or trying to leverage the emergent of a system.

On the many different ways to define what a system actually is, it is usual to compare it to a "bunch of parts" and talk about how on a system these parts interact, have a structure, a purpose or something. We are not concerned about this aspect now, we are assuming a mild understanding of what a system actually is.

The line that I want to draw this time, albeit blurry and wide, is the difference between what we can interpret and analyze as a system, and what needs to be taken as a whole. This is why we'll be talking about the ontological and epistemological realms.

hmmmmmm.... reaaaaally?

Ontological refers to an "entity", what may be called a "thing in itself". Think of a person, which is "a thing in itself" regardless of being constituted by many different parts. If we set these parts apart, the person is no more, and putting things back together won´t bring the person back. It has specific properties that emerge on it´s own level of aggregation, like character, emotions, self-consciousness, and so on.


On the other hand, Epistemological refers to a "unit of knowledge" or "what can be known", regardless of the kind of bond that ties it together. Think of a group of people, like a mob. Even though they might behave as one, with emergent properties, you can separate them, and after a while put them back together, and they´ll be able to exhibit the same behavior. It seems quite similar in it´s properties to an ontological person, but it´s complexity can be reduced.*
*We´ll be talking about irreductible complexity some other time


This difference is better taken, or understood, in relation to the quintessential concept of "emergence". Let's see how these different fields take on this:
onthological emergence: apparition of a qualitative novelty,
epistemological emergence: unpredictability from lower levels.

So, for instance, even if we know that a given phenomenon is caused by the interaction of many parts, like a mob, it's very different the approach we'll take if we are studying the movement of the people through a set of stairs and halls or if we are looking at the explosion of violence that can occur inside mobs.

In the first case, we can successfully, and sufficiently, model it understanding the "decision rules" of every individual for themselves, and see what happens when those rules interact. We do not need to assign a "mood" to the mob, or a transcendent purpose or a hierarchy. Accounting for the individual rules we can model the emergent behavior. But we cannot establish a direct, obvious link between the individual rules and the whole. This is easy to see in bird flocks, whose movement is unpredictable, even though we can know with a high certainty what every individual bird does.

On the second case, it is not enough to look at any individual, as there are some properties that are shared between all the elements inside the mob. The "violence", "excitement", or the maintenance of it, is not located on any individual, but rather on the interaction between them. If a leader is taken out, another individual will probably take it's place. Actions can be coordinated between different sections of the mob, and there is a threshold quantity of people so that this phenomenon takes place. Under this "critical mass", nothing happens, even if the "most violent individuals" are present. So in this case we need to look at the mob as a whole, with a given structure and mechanisms, but largely indivisible.

Why does that matter? Well, it serves as a framework to tell what "is" from what we "see as". What has existence of its own and what is an apparent unit. This serves us to consider for instance a methodology for approaching an issue, or the level of aggregation we can use to describe the lower or higher levels that we are interested into.

This perspective may not change what we actually end up doing on a given task or problem, but is an important reality check, and it´s a big clue to help us set the way the analysis takes place. It will help us answer some things: "Are we asking the right question?", "Is this one problem or a set of related, smaller problems?", "Do we need other tools, or disciplines, to tackle this thoroughly?", and so on.

Perhaps this is no more than a brain teaser, but if it gets you to be more conscious about the way to approach different problems, then it´s a double win.

viernes, 12 de octubre de 2012


Flush the toilet…

..and check which way water spins!


It may sound new to some people and it may ring a bell to others when it comes to the question: which way does water spin when you flush the toilet? The answer will come later.

There are several forces involved in the motion of an object, but there is one special effect that appears when the analysis takes place in a rotating reference frame. The latter term refers to a non-inertial reference frame rotating relative to an inertial one, in which case Newton’s laws cannot describe properly the forces involved unless fictitious forces are used.

We can now discuss, for instance, the centrifugal forces; but it is more interesting to learn about Coriolis Effect. It was in 1835 when a French engineer-mathematician called Gustave-Gaspard Coriolis described this “force”. Any object in motion in a rotating reference frame is accelerating by a force perpendicular to its motion. Even though this force does not exist because of a physical interaction, it creates a deflection on the path of an object due to the motion of the coordinate system, i.e. the Earth. This is why this kind of effect can only be appreciated at large scale, when the object´s  speed is greater than the ground’s.
Three aspects are related to the Coriolis Effect. First of all, the motion of the Earth is the rotating frame reference, but the effect weakens as we approach to the equator in a horizontal direction. That is why the latitude is another aspect to take into account. Finally, the motion of the object will also determine the magnitude of the Coriolis Effect.

Some examples can be seen both in natural and human developments. When it comes to natural sources, this effect is shown by the motion of great lakes and oceans, even the wind. On the other hand, the deflection planes or missiles evidence when travelling mostly from one hemisphere to another is also because of the mentioned effect. 



Image 1. Large-scale wind patterns


All in all, we now know there is an effect named Coriolis which impact depends on the reference time-frame and affects our everyday-life (and in greater magnitude if you are further the Equator). But, can we really see it if we flush the toilet at home?

I am sorry to disappoint you guys! But if you flush the toilet in the Northern hemisphere or in the Southern, the swirl (vortex) generated only depends on the lavatory itself and other irregularities of the surface, because the speed of the drain is faster than the one generated by the Coriolis Effect. If you really want to verify the effect, you have to use a bigger recipient and tons of water. In laboratory circumstances, i.e. certain temperature and latitude, letting the water set still; then the conditions are set to evidence the Coriolis Effect when the Earth’s movement is slower than the one of the water relative to its container.




miércoles, 3 de octubre de 2012

Algorithms in Continente Siete

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!