søndag 6. november 2011

Settling for Lean

In this post I want to share my experience of playing the real time strategy game Settlers 7 with a Lean Manufacturing perspective. 

Overall I think introducing Lean when playing Settlers have really helped my game, but it is no question that it has also made me think differently about applying Lean thinking in a “real” context. Compared to the real world Settlers 7 is a simple system with more or less predictable outcome, but I see that I need to study and analyze what measures are needed for each different game. My focus has shifted from finding the “perfect” game strategy, to studying and learning in order to better adapt and find a winning strategy for a particular scenario.

Settlers 7 - a manufacturing game

Settlers differs somewhat from other real time strategy games I’ve played, in that resources which are collected needs to be refined before you get something of use. There are actually 26 different resources, 11 different units, and 19 different buildings that refine resources into new resources/goods. This gives us several interesting combinations of setting up production lines to produce the right goods for warfare, quests, trade or research. It is also important to point out that all resources are deposited at storehouses, before they can be refined or used. These storehouses have carriers who transport the resources between storehouses as needed. Workers collect resources at the nearest storehouse and bring them to their work yard. In order to be successful you need to watch your logistics as well as your production. The last element of the economy is to build the work yards and storehouses. All these buildings are built by dedicated carpenters and need resources and refined goods to be completed. This rather complex economy is what makes this game fun and interesting, especially from a Lean Manufacturing perspective.

Pulling the chain

When I first started playing Settlers 7, my strategy was to produce as much of every resource as I could, to create an abundance of everything in order to overwhelm my opponents. I also set up a large queue of buildings to construct, so that my carpenters would be effective and not idle. This strategy worked for the first couple of campaign scenarios, but proved to be neither efficient nor fun.

Instead I tried to apply Lean Manufacturing principles to my economy. Firstly I introduced a more pull based approach to my production. Instead of creating as much as I could of everything, I set up defined product lines to achieve a specified goal. These product lines are a mix of different buildings connected to a single storehouse, and has as a whole defined input and output.

For example in a product line to gain early research we need 3 novice clerics per technology. Each cleric requires 2 bread and 1 beer. Bread requires flour which requires grain. Beer requires grain and water. We then need to build 1 church, 1 brewery, 2 bakeries, 2 mills, 1 well, and 3 grain farms. This is a self-sufficient product line which produces and gives us 1 cleric per cycle, providing us with a new technology every 3 cycles. All these buildings are set to “On Demand” so they will not produce clerics when not needed.

The reason to build a product line around a single storehouse is to reduce the need for transportation between storehouses. This obviously reduces the cycle time but it also reduces the direct cost by building less storehouses. Not so obvious is the fact that this arrangement also makes the product line more robust against variation in transport load. If the resources instead are collected from different storehouses, the product line will be dependent on the burden of the carriers, which could impose delay.

One of the biggest benefits of introducing a more pull based production, is that I am now more focused on what I want to achieve and on the strategy in the game, instead of managing resources and goods. I also get a better efficiency and I win more games.

Studying the flow 

A natural side effect of introducing pull based production, is the reduction of excess inventory. We only produce resources we know we will need, and therefore we won’t have anything to spare. This proved to be a challenge. In one case I set up two effective pull based production lines, one to produce beer and one to produce sausage. I was producing more goods faster than I’ve been able to before, but suddenly everything seemed to collapse. There was no apparent reason, and a quick inspection showed me that I had enough resources and no overproduction. In theory my “pull-system” should work, but apparently it didn’t…

To find the flaw in my system, I had to go down to the production floor and study the process. I started following single resources through the production chain and discovered that my transporters where carrying grain between storehouses connected to separate grain farms. In other words they were carrying grain from my beer production line to my sausage production line, and vice versa. I had reduced my inventory too much! In Settlers 7 resources are consumed in a first come first serve manner, and when the beer production needed grain it was collected from the sausage production even though there would be grain produced there the very next second. To fix this problem I had to increase my inventory of grain at the different locations to reduce the waste caused by transport.

This error really taught me a valuable lesson and I started to regularly study the flow of single resources through the chain. Overall this has given me the most value from introducing Lean in Settlers. I have found that even though things look good in theory and a setup of product lines worked in one scenario, I really need to study the flow when setting up a new line or make small changes. When things are a bit different or we make small changes, the dominant wastes may also change, and this alters the overall behavior of the production system. At the most extreme the study of flow have shown me that in some cases I have to completely shut down a production line while starting a similar production line at a different location. The reason for this is that the sudden variation in demand is so great that a short stabilizing period is needed.

Limiting work in progress

Having improved my production I then focused on improving the build process. As mentioned earlier all buildings must be built by carpenter settlers, and carpenters need resource in order to build anything. When I want to set up a building, I place the construction site where I want the building, and my order is placed in a queue. As soon as the order is placed, the right amount of resources are allocated and brought by carriers to the storehouse nearest to the site. The carpenters won’t start working before all the resources have arrived. Obviously this whole process takes some time, and when you as player know what next three product lines you want to build are, you are tempted to set up all the sites and put it all in the queue. That way you can sit back or focus on other things, just as I did. And when I saw that this process was too slow, my first reaction was to “optimize” the order in the queue… which of course didn’t help.

What really helped was to introduce a limit on how many buildings I allowed myself to put in the construction queue. A large queue size meant a lot of resources where needed at the same time, putting a burden on both the production system and the carriers and thus uncontrolled delays and waiting time. It also meant having a large inventory of resources lying around at different construction sites. After reducing the queue I could see that the overall operation went smoother, and I realized that I had much more flexibility to adapt to unforeseen events, such as an attack from an opponent.

Useful URLs for playing Settlers 7

http://forums.ubi.com/eve/forums/a/tpc/f/6061083365/m/9621004648  - Great post on food boosting. This post inspired me to think about Lean in Settlers
http://thesettlers.us.ubi.com/the-settlers-7/  - Official Settlers 7 site

Ingen kommentarer:

Legg inn en kommentar