Lego Mindstorms: What Went Wrong?

Lego launched the Lego Mindstorms line of programmable toy brick construction sets with a lot of fanfare back in the fall of 1998, but in recent years the company has lost all enthusiasm for the Mindstorms line. For several years now, Lego has not introduced any new Mindstorms sets, and the company has discontinued almost everything in the Mindstorms line apart from the core Robotics Invention System (RIS) set. Sadly, even the RIS is not faring lucky as it has not had an update since 2001. Lego seems to have relegated the Mindstorms line to niche status and frozen its development.

Strangely, Lego is doing all this even though consumer preferences clearly indicate healthy sales growth potential for toys based on the Mindstorms concept of programmable toy brick models. People love building programmable models and robots, and the Mindstorms concept has been a massive hit with everyone but Lego. A huge number of robot building competitions, countless fan websites, a never ending stream of glowing articles in the press, and more than twenty Mindstorms related books by authors unaffiliated with Lego are incontrovertible evidence of that. All these not only suggest massive consumer interest in programmable construction sets but also indicate blockbuster Robotic Invention System (RIS) sales in the past and a huge aftermarket.

Lego’s inattention to the Mindstorms line is all the more puzzling as it comes at a time when the company is desperately trying to recapture consumer interest. According to Lego’s 2004 annual report:

In 2004, the global market for traditional toys once again was under pressure, and in most countries the profile for total sales was either flat or in decline. In contrast, the market for electronic toys — video consoles and computer games — enjoyed a minor increase. The most serious threat, however, is that children are losing interest in traditional toys at a younger age, and that other products in the consumer-electronics sector — such as mobile phones and MP3 music players — are replacing toys to an increasing extent.

The Mindstorms line seems to be the perfect answer to this onslaught by video games and consumer electronics. Mindstorms sets have broad appeal to older age groups, sophisticated play value, and incredible educational potential. This is exactly what Lego needs to regain market share, but oddly, Lego is intent on passing the opportunity.

Maybe Lego’s profit margins on Mindstorms sets are very low, and this is forcing Lego to neglect the Mindstorms line. The strong consumer interest, however, suggests that Lego ought to be able to enhance margins simply by raising prices, but it is possible that demand for Mindstorms sets is elastic. When demand for a product is elastic, price increments cut demand for the product so drastically that total revenue from sales falls instead of rising. Elastic demand is not all bad though; on the plus side, decrements in the price of a product having elastic demand strongly spur demand and increase sales revenue despite lower per unit price. Unfortunately, businesses can only exercise this option of revenue growth if their profit margins allow them to cut prices.

If demand for Mindstorms sets is elastic and profit margins on the sets low then Lego can not do much of anything apart from looking elsewhere for profitability and growth. Essentially, this would mean that consumers love the Mindstorms sets but are unwilling to spend freely to acquire them. This scenario seems to be the only solid explanation for Lego’s disenchantment with the Mindstorms line and is worth exploring further.

The demand elasticity issue is something that can not be readily settled. Fortunately, this issue comes into play only if Lego’s profit margins on the Mindstorms line turn out to be low. If Lego’s profit margins are high then the only relevant issue would be a large potential market, but this is known to be so.

Lego does not disclose its profit margins on the Mindstorms line but they can be estimated indirectly. The key to getting an estimate for Lego’s Mindstorms profit margins is the RIS. The RIS is the most representative and comprehensive Mindstorms set, and an estimate for its production and development costs can serve as an upper bound cost estimate for other Mindstorms sets.

The Robotics Invention System (RIS) comes with 718 parts/pieces. Most of the parts included are not exclusive to the Mindstorms line and are found in other Lego sets as well. It is not at all unusual for Lego sets retailing at $60-$70 to come with an assortment of 600-700 pieces similar to the ones included with the RIS. The RIS retails at $200, so clearly, the non-exclusive pieces are not causing Lego’s margins on the RIS to be lower than its margins on the average Lego set. The discontinued sets in the Mindstorms line were also premiumly priced with respect to similar piece-count, traditional Lego sets; so non-exclusive pieces were not a problem there either.

The Robotics Invention System also includes some electronics not included in the average Lego set. These include an RCX brick, an IR tower, and some sensors. The RCX brick looks like the costliest component in the RIS set, but it does not include any expensive high-tech components that ought to cost a lot. It has an 8-bit microcontroller with 16 KB of ROM, 32 KB of RAM, a segmented LCD, a tiny speaker, IR communication circuitary, and motor/sensor control circuitary. These are commodity components and are often included in all sorts of inexpensive devices and toys. A good way of coming up with a cost estimate for these components and the RCX is to compare the RCX with a device of known price that incorporates similar components.

(UPDATE: The RCX comparison to the gaming device given below is unjustified. An 8-bit microcontroller with 16 KB of ROM can cost a dollar, so the RCX can not possibly cost 75 cents as asserted below. A realistic estimate of the cost of RCX is around $5, and a reasonable estimate of the total cost of Mindstorms specific components in the Robotics Invention System is $10 and not $3. However, these numbers still do not invalidate the conclusion that the cost of electronic components in the RCX is inconsequential. Lego priced the Mindstorms derivative Spybotics vehicles at $60 each, which affirms that assessment.)

The picture below shows an RCX brick along with a gaming device of Chinese make that incorporates components similar to the ones used in the RCX. The gaming device was purchased for approximately $1.83 from a mom-and-pop retail store, and it is missing only the IR communication and motor/sensor control circuitary.

Figure 1, RCX comparison
Figure 1, RCX comparison

As can be seen in the picture, the gaming device has a huge screen compared to the RCX brick. This partially compensates for the absence of some of the additional circuitary of the RCX. Now the gaming device made it to the store it was purchased from after going through two or more distributors, and each of the distributors and the retailer added significantly to the price; therefore, the original equipment manufacturer’s cost of making the gaming device must be less than fifty cents.

The RCX may cost a little more than fifty cents to manufacture but it certainly does not cost five times more; a fifty percent allowance to cover the additional circuitary in the RCX is more than generous. This means the RCX costs Lego less than 75 cents. The Robotics Invention System comes with motors/sensors and an IR tower as well, but similar reasoning suggests that $1.25 more than adequately covers the cost of these components. An additional $1 pays for some nicely printed documentation and a CD, and in total Lego is spending $3 on RIS specific components of the RIS set. This $3 increase in production costs is completely insignificant as the RIS retails at $200, substantially above comparable piece Lego sets.

The discontinued Mindstorms sets carry far fewer electronic components than are bundled with the RIS, so production costs for such sets are only a small fraction of $3 above those of traditional, similar piece-count Lego sets. Additionally, Lego has the option of reengineering/restructuring the sets to use fewer expensive components; therefore, the production costs of Mindstorms sets are not an issue. On the contrary, the premium pricing of the RIS and the discontinued Mindstorms sets suggests that gross margin (revenues minus production costs) on Mindstorms sales has always been higher as compared to Lego’s gross margin on its core product sales.

Lego also spent money on the design and development of the RIS. Putting together a user-friendly package that seamlessly blends together hardware, software, and documentation is always a challenge. Such a development effort requires significant resources and Lego did spend significant amounts on design and development of the RIS. However, whatever Lego has spent in the past on the RIS and Mindstorms development is irrelevant to Lego’s current/future Mindstorms margins. Lego’s past spending constitutes sunk costs: Lego has spent the money and can’t recover it by selling fewer Mindstorms sets.

Development costs of new Mindstorms sets are relevant though, but they can’t possibly be too burdensome. The software/hardware components Lego developed for the RIS are designed to serve as a common platform for all Mindstorms sets, and introduction of new sets in the Mindstorms line is only a matter of reuse; it does not entail costly development from scratch. Additionally, development costs of a Mindstorms set are fixed costs: they don’t change with the number of units shipped. This implies Lego can counter the impact of development costs by shipping large volumes. As Lego’s gross margin on Mindstorms revenues is very high, so higher volumes ought to be attainable via a combination of attractive pricing and strong marketing. (This assumes demand for Mindstorms is elastic, but if this is not so, Lego can recover its development costs simply by raising prices.)

Clearly, there is strong demand for Mindstorms sets, Lego needs Mindstorms sets to combat its diminishing market share, and Lego can produce Mindstorms sets cost-effectively as well. There does not seem to be any obvious rational reason for holding back support for the Mindstorms line but Lego is doing exactly that.

Such behavior is odd but sometimes businesses do treat successful products in this fashion. Often, the problem in such cases is cannibalization. Cannibalization is a marketing term, and it refers to a decrease in sales of older products of a business brought about by introduction of newer products by the same business. Cannibalization can hurt overall profitability of a business and can prompt a business to discontinue a product that is cannibalizing sales but is otherwise highly successful.

Cannibalization has been a problem for Lego as well; a disclosure in Lego’s 2003 annual statement positively affirms this. The disclosure states:

For several years, LEGO Company has invested substantial funds in expanding its product portfolio. This commitment and the consequent cost increases have not produced the desired results. In some cases, new products have even cannibalized on the sales of LEGO Company’s core products and thus eroded earnings.

The above disclosure does not name Mindstorms sets for cannibalizing sales, but there are no other candidates. Lego is persisting with the development and marketing of every other major product line it launched in recent years, and the timing of the disclosure coincides precisely with the phasing out of Mindstorms as a mainstream Lego product line.

Some level of cannibalization is inevitable whenever a business launches an improved product that competes with its existing products, but this is usually not a problem. Often higher margins on the newer product compensate for the loss of sales of older products. Clearly, Mindstorms sets cannibalized Lego’s traditional sales so drastically that the company was forced to move away from the Mindstorms line. Still, Lego’s current tactics remain puzzling: Lego is persisting with the Mindstorms Robotics Invention System (RIS) even though it can easily discontinue it.

Discontinuing a product that is cannibalizing sales is not always feasible for a business. Sometimes businesses are forced to persist with products that are money losers after figuring in cannibalization. Typically in such cases businesses are afraid that if they don’t introduce improved products, their competition will; and then they will end-up losing sales anyway.

Few people are aware but Lego actually happens to have some competition in the Mindstorms market. FischerTechnik a German company sells construction sets that compete with the Mindstorms line. FischerTechnik is not a cheap knockoff of Lego; the company makes very high quality construction sets, and its construction sets are not only comparable to those of Lego but are even considered superior by many. The company has an especially strong following amongst educators.

FischerTechnik isn’t much of a threat to Lego, but Lego’s several years of misguided marketing push of the Mindstorms line has created a big market for robotic construction sets. Lego knows if it discontinues the Mindstorms line completely, FischerTechnik can step in and fill the void. This realization is forcing Lego to make RIS supplies available so that people who just have to have a robotic construction set can get one from Lego instead of looking elsewhere. However, due to the cannibalization threat, Lego likes the Mindstorms line confined to a market niche.

All of this explains Lego’s current Mindstorms strategy, but the most interesting question remains unanswered: why do Mindstorms sales cannibalize sales of traditional Lego sets? This question is all the more interesting as Mindstorms sets and traditional Lego sets are complementary. Parts from traditional Lego sets can be used and are often used to build complex RCX based models. In fact, the Mindstorms line is based on Lego’s mechanically oriented Technic line, and Mindstorms sets are essentially bundles of Technic pieces complemented with a programming interface.

The cannibalizing effect of Mindstorms sales has to result from something peculiar about Mindstorms sets, but there is only the programming interface that stands out as a uniquely Mindstorms addition. Unfortunately, it is not obvious how the programming interface can impact sales of traditional Lego sets. The programming interface enhances the user experience, but it in no way obviates the need for complementing Mindstorms sets with pieces from Lego’s Technic and other core product lines. It is possible though that complementary sales are insignificant, and the enhanced user experience is leading Lego customers to lose interest in traditional Lego sets. This possibility is promising but evaluating it requires some knowledge of the play habits of Lego customers.

Actually, the programming interface is not all that is different about Mindstorms sets. Mindstorms sets although composed mainly of Technic pieces are structured very differently from Technic sets. Mindstorms sets are generic: the typical Technic set is designed to assemble into one specific model, but this is not so with the Mindstorms sets. The pieces in Mindstorms sets have been carefully selected to be useful for the construction of a very wide range of models. For instance, the Constructopedia (the RIS manual) provides assembly instructions for three very different robots using many of the same pieces. This generic structuring of Mindstorms sets is good for Lego customers, but it may be promoting ‘excessive’ reuse of Lego pieces and could be a factor in cannibalizing sales.

Both of these possibilities are plausible, but they are mutually contradictory. Extensive reuse of Lego pieces can only happen if Lego customers are Lego literate, i.e., Lego customers can design and build complex custom models on their own and are not dependent on Lego provided assembly instructions. However, a Lego literate customer base implies significant complementary sales and little potential for customers losing interest in traditional Lego sets. Consequently, deciding between these two possibilities is a matter of determining the level of Lego literacy of Lego customers.

Media stories about Lego tend to create the impression that most Lego customers are Lego literate and are building sophisticated models, but there is no evidence that such is the case. Lego literacy is a non-trivial qualification; it implies thorough knowledge of Lego pieces, familiarity with various model construction techniques, and reasonable understanding of mechanical concepts. For instance, the RIS comes with a torque limiting device in the form of a clutch gear; however, a person can not do much with the clutch gear without understanding torque, gears, and the utility of the clutch gear in various mechanical mechanisms. Moreover, the clutch gear is not the only piece included with the RIS that requires a hefty explanation; the RIS is loaded with all sorts of sophisticated parts: differentials, rack gears, pulleys, cams, connectors, and various types of bricks.

Developing widespread Lego literacy is a tough ask as is, but this task is made exponentially tougher by the documentation Lego bundles with its sets. Lego documentation primarily consists of model specific assembly instructions, and these instructions encourage play that involves searching for pieces and putting them together as depicted. Such play is completely scripted and devoid of all creativity and imagination, great training for developing assembly-work skills but completely useless for developing Lego literacy. Actually, Lego documentation contains little that is of value for developing Lego literacy. Lego documentation provides no explanation of mechanical concepts, it lacks functional description of Lego pieces, and it discourages people from looking up information on Lego pieces by omitting names. Additionally, by providing sophisticated reference models, it makes experimenting with custom (invariably unsophisticated) models unsatisfying and further impedes development of Lego literacy.

All of this misdirection implies that there is no possibility of more than an insignificant fraction of Lego customers being Lego literate. This rules out the possibility of the genericness of Mindstorms sets leading to cannibalization, and the cannibalizing effect of Mindstorms sales has to be a consequence of a vastly enhanced user experience offered by Mindstorms sets.

Actually, the Mindstorms user experience by itself has never been the problem. The Mindstorms user experience leads to a substitution effect: it reduces demand for traditional Lego product lines, but compensates for that by creating additional demand for the higher margin Mindstorms line. Lego would have won on the whole had it managed to convert the additional demand so created to sales, but Lego failed to do that and lost on account of that failure.

Lego’s Mindstorms product lineup was the reason behind Lego’s failure. The Mindstorms lineup consisted of the RIS, some stripped down versions of the RIS, and several accessory sets intended to complement the RIS. The RIS was the entry point to the Mindstorms line; it was a well-designed set with wide appeal. The stripped down versions of the RIS were also well-designed but the RIS obviated any need for them. The accessory sets were not so well-designed and were mostly bundles of Lego pieces intended for building complex robots; their use required Lego literacy and this requirement severely diminished their appeal. Overall, the Mindstorms lineup was uncompelling with only the RIS having good sales potential. Consequently, in the years after the launch of the Mindstorms line, Lego shipped huge volumes of RIS sets but not much else. Unfortunately, this was not good enough as Lego needed to sell additional Mindstorms sets to RIS owners in order to avoid getting hurt by the substitution effect created by the Mindstorms user experience.

Lego can sidestep the cannibalization by a simple restructuring of the Mindstorms line, but the company is unlikely to win anything big by doing that. The Mindstorms line was Lego’s attempt at achieving substantial revenue growth by broadening its customer base to include older children and adults; however, Lego ended up selling the Mindstorms sets primarily to its existing customers. Renewed focus on a restructured but not rethought Mindstorms line will mostly achieve more of the same. The result will be a reallocation of revenues from traditional Lego product lines to the Mindstorms line. Such a reallocation in the absence of cannibalization might turn out to be a net gain but this is not what Lego wants. Lego wants solid revenue and profit growth and this objective requires a fundamental rethinking of the Mindstorms line.

Lego was correct in attempting to broaden its customer base with the Mindstorms line as it seems to be selling all it can to the younger age groups. However, the manner in which Lego proceeded indicates complete cluelessness as to what is required in order to win over older individuals. To attract older age groups, Lego does not need to add bells and whistles to Lego bricks; instead, Lego just needs to address the lack of Lego literacy. Most people including long time Lego customers are totally unaware of the considerable play potential of Lego bricks and believe Lego play to be all about putting pieces together as depicted, and this perception of Lego play is turning away older age groups. The bells and whistles included in Mindstorms sets are helpful in garnering attention but by themselves they don’t lead to sophisticated play, and Lego needs to educate its older customers so that they can engage in play that is sophisticated, constructive, and fun.

Lego needs to introduce a new product line that can serve as a vehicle for developing Lego literacy. One idea for such a product line is to have sets based around important concepts and mechanisms. For instance, the product line can have one set for introducing people to torque and gears, another to demonstrate more sophisticated parts like the clutch gear, and yet another to cover pulleys and belts. The quality of the documentation bundled with the sets will make or break any such effort, so Lego will need to include documentation that stimulates thinking, emphasizes problem solving, and encourages experimentation and creative play. The documentation can achieve these goals by providing individuals with readily digestible information, as well as by leading them through exercises and experiments that build intuition. Lego should also add programmability to such sets but this should be done selectively, without creating dependencies amongst sets, and in a manner consistent with the overall goal of the product line.

Admittedly, it is inconceivable that the majority of Lego customers will ever become Lego literate enough to design complex models on their own; however, if Lego makes an honest attempt at addressing the problem, it will end up with a customer base that is at least capable of understanding the designs provided by Lego and tinkering with them in some small way. This will translate into an exponential increase in customer satisfaction and will immeasurably add to Lego’s ability to retain customers and attract a broader audience.

Lego’s prospects are good and the company is not about to become irrelevant. The appeal of Lego bricks is timeless and their potential unlimited. It is just that Lego is too obsessed with growth strategies that have worked in the past but are no longer relevant. Lego is unwilling to recognize that it is not selling a system of play but only a particular kind of play, and the market for that kind of play has become saturated. To grow Lego needs to promote new kinds of play and Lego possesses all the infrastructure necessary to accomplish that. For Lego, growth is only a matter of putting the pieces together creatively.


LAST UPDATED by Usman Latif  [Nov 27, 2005]

Minesweeper First Click Behavior

What does Windows Minesweeper do to make sure a mine is not uncovered on the first click? According to Ivars Peterson’s Minesweeper Logic page, if a mine is uncovered on the first click, it is moved to the upper-left corner of the board. If the upper-left corner is occupied the mine is moved to the right of it. This link on the other hand claims a bit more eccentric behavior for Minesweeper first click. I decided to investigate and settle the question for good.

The only way for any investigation of Minesweeper to make a definitive claim is to reverse engineer and examine the Minesweeper code. I did just that and it turns out that the first claim is true.

I used the WinDbg debugger to run Minesweeper and watch its behavior while it is executing. The crucial code is embedded in the StepSquare function. I disassembled and read the code to determine the actual algorithm. The disassembled code can be viewed by following this link.

The StepSquare function is invoked by Minesweeper every time an unmarked square is clicked. The function checks if it is the first click, and that the square being clicked is a mine. It then tries to move the mine to the upper-left corner. If unsuccessful it tries the square to the right of it. If all of the first row is occupied by mines, the function tries to put the mine in the leftmost square of the row below, and so on.

Using the debugger I generated identical boards to demonstrate this behavior. Figure 1 shows a board on which the first click was on a square not containing a mine. Figure 2 shows the same board but now the first click was on a square containing a mine. Notice that the mine in the upper-right corner in figure 1 has moved to the upper-left corner in figure 2.

Figure 1.Figure 2.

I generated two additional boards to demonstrate Minesweeper behavior when the upper-left corner is occupied. The board in figure 3 is one where a non-mine square was clicked. Figure 4. is the same board as in figure 3. but the first click in this case was on a mine. The rightmost mine was the one that was clicked and it has consequently moved to the right of the upper-left corner.

This image has an empty alt attribute; its file name is mine-corner4.gif
Figure 3.Figure 4.

This behavior has an interesting consequence, the upper-left corner is typically not a good place to look for a cascade during a Minesweeper game. On the first click, corners are the best place to look for cascades, but the upper-left corner is the worst choice of the four corners. A cascade can occur in the other three corners even if the corner itself is a mine: the first-click will simply move the mine elsewhere. But, in case of the upper-left corner the mine will move right adjacent, and will block the cascade.

After the first click, the upper-left corner has an above average probability of containing a mine: a mine could have moved there from the first-clicked square. Therefore, the player will be taking undue risk by clicking the upper-left corner.

If you open Minesweeper by clicking the upper-left corner it would be best to switch to another corner. The actual impact of clicking the upper-left corner depends on the total number of mines in the board. The impact can be very significant for boards with lots of mines and totally insignificant for boards with very few mines.

LAST UPDATED by Usman Latif  [Nov 30, 2003]
Thanks to Ruben V. for pointing out errors in this article.

The Probability of Unplayable Solitaire (Klondike) Games

The Solitaire game Klondike has a few idiosyncracies: not all Klondike games are solvable. Moreover, Klondike sometimes produces unplayable games. In such cases no moves are available to the player even at the beginning of the game. The probability of occurrence of unplayable games is an important number as it is a lower bound for the probability of occurrence of unsolvable games.

Klondike, the version bundled with Windows, consists of seven stacks of cards containing a total of 28 cards, a deck of 24 cards, and four initially empty suit stacks. The seven stacks are arranged in a single row with one card in the first stack, two cards in the second stack, three cards in the third stack, and so on. The objective of the game is to move all 52 cards to the four suit stacks (one for each suit) in order of rank.

Klondike has two variants; the player is either dealt three cards from the deck at a time, or is dealt one card at a time. In the three card at a time variant, only the topmost card is playable. The analysis described here is for the three card variant of the game.

At the start of a Klondike session, only fifteen cards are playable. Seven of the fifteen cards are the top-most cards of the row-stacks and the other eight cards are in the deck of 24 cards. Any aces present in these fifteen cards can be moved to the suit stacks. A pair of playable cards can be stacked, if the two cards are of different colors, differ by one rank, and the bottom car has higher rank. Cards from the deck can only be moved to either the row-stacks or the four suit stacks. The game has some additional rules as well but they are irrelevant to the discussion at hand, and are not described here.

An unplayable Klondike game satisfies the following three conditions simultaneously:

  1. No aces are in the fifteen playable cards
  2. None of the seven playable cards in the row-stacks can be moved to a different row-stack.
  3. None of the eight playable cards in the deck can be moved to any of the seven row-stacks.

The probability of satisfying only the first condition can be easily calculated. This probability is the number of all possible arrangements (combinations) of 15 cards taken from a deck with no aces, divided by the number of all possible arrangements of 15 cards taken from a deck that includes aces. The two numbers in question can be computed using Binomial coefficients, and the following expression gives the result of the calculation:

Binomial[48,15] / Binomial[52,15] = 0.2439

The number 0.2439 suggests that on average 24.39 percent of Klondike games start with no aces amongst the initially playable cards. Equivalently, 75.61 percent of Klondike games have at least one ace in the 15 initially playable cards.

Unfortunately, the number computed above is of no great help in computing the probability of occurrence of unplayable games. That calculation requires simultaneously satisfying all three conditions mentioned previously; there is no simple analytical approach to solving that problem.

A brute force approach to generate and test all possible Klondike games is not feasible either. Even considering only the games where no aces occur in the 15 playable cards, the number of all possible Klondike games is quite large. Under the previous scenario, the number of games to be examined totals:

Binomial[48,7] * Binomial[41,8]  = 7,035,128,610,578,640 

This number is more than a handful for current computing hardware; therefore, a less computing intensive approach is required for solving this problem. One idea is to use Monte Carlo simulation to estimate the probability of unplayable games.

A Monte Carlo simulation consists of repeating an experiment a large number of times. An experiment in the context of Monte Carlo simulation is occurrence of a random event that either generates a favorable or an unfavorable outcome, e.g., a coin toss. The simulation proceeds by repeating the experiment some specified number of times and recording the number of favorable outcomes. The number of favorable outcomes divided by the total number of trials gives an estimate for the probability of the favorable outcome.

Designing a Monte Carlo simulation for modeling Klondike games is straightforward. Cards can be modeled as a set of 52 numbers, and random Klondike games can be generated by permuting this set of numbers. The favorable event under this scenario is an unplayable game. Checking a randomly generated Klondike games for unplayablity can also be accomplished easily.

A scheme program for this simulation problem was coded, and was used to simulate 10 million Klondike games. A total of 24,893 unplayable games were reported by the simulation. This gives 0.0025 (rounded to two significant figures) as an estimate of the probability of occurrence of unplayable games. This estimate suggests that on average 0.25 percent (one out of 400) of all Klondike games are unplayable.

As mentioned earlier, the probability of unplayable games is a lower bound for the probability of unsolvable games. All unplayable games are unsolvable, but some initially playable games are unsolvable as well. Many Klondike games allow some initial moves but then run out of possible moves. It is hard to estimate the probability of unsolvable games but a reasonable estimate would be 10-40 times the probability of unplayable games. This suggests that anywhere from 2.5 to 10 percent of all Klondike games are unsolvable.

Some players might be surprised by the above numbers. These numbers imply that majority of Klondike games are winnable; however, experience playing the game indicates otherwise. The reason players do not win majority of Klondike games is mainly the tremendous amount of guesswork involved in playing Klondike. A few wrong moves can easily make a player lose and this is what happens most of the time.


LAST UPDATED by Usman Latif  [Feb 01, 2004]

Why Windows is a Security Nightmare

Security in all mainstream operating systems is non-existent; however, things are especially bad for Windows. Windows happens to be the favorite target of worm and virus writers. Conventional wisdom suggests that the huge installed base of Windows helps spread the worms and viruses, and also makes it a highly attractive target for worm/virus writers. The installed base of Windows certainly has an undeniable effect on the prevalence of malware on Windows, but this is not all there is to it.

Worms and viruses are so stunningly effective on Windows only because Windows provides some atrocious functionality which makes it easy for worms to strike. It might seem counterintuitive but Windows Registry, and a misdesigned Windows Update are the primary culprits that create a hospitable environment for worms and other malware.

A typical Windows system follows a simple lifecycle: it starts out with a clean Windows installation, which gradually deteriorates as programs are installed, and uninstalled. Eventually, the Windows registry accumulates so much crud that the user is forced to do a clean install. When a user does a clean install that user’s system loses all the previously applied security updates, and becomes a sitting duck for worms and other malware.

Things wouldn’t be so bad if the user was able to update the new system with security patches painlessly, but Windows Update makes it very hard to do so. My personal experience with the killer duo is an enlightening example of how all of this works.

I purchased a Thinkpad X21 with Windows 2000 Professional in January 2002, and since then have gone through three clean install cycles. After the second cycle I decided to stick with a deteriorating installation no matter what happened.

As expected, pretty quickly the registry started accumulating all sorts of rubbish, and the system started exhibiting strange bugs. First Mozilla stopped working; reinstallations, uninstallations, upgrades did not resolve the problem, so I switched to Opera.

A few months later Windows explorer started to hang on folder right click. I did my best to search for a solution to this problem on the internet, but never managed to find a solution. Resigned, I eventually learned to avoid right clicks on folders, and became adept at killing and reinvoking the explorer process after an inadvertent forbidden click.

Then I made the mistake of installing VMWare 30 day demo on my system. As soon as I booted Linux under it as a guest OS, the the sound card went bonkers, and started producing high pitched screeching sounds. I tried reboots which didn’t work; as a last resort I uninstalled VMWare but that didn’t work either. This forced me to lower the volume of the speakers to muffle the screeching, but I continued using the same setup.

Finally, I had the bright idea of downloading a registry cleaner to fix things. The product I downloaded turned out to be some pathetic crippleware, and I uninstalled it. Well, that was the fatal fatal mistake; the next time I rebooted, Windows refused to load. Safe mode, last known good configuration, etc., all failed, and so I was forced to do a clean install.

As expected the clean install took care of the bugs. However, it also got rid of all the security updates. I immediately connected to Windows update to download the service packs, and the critical updates. Rather quickly I was welcomed by Messenger Service spam. The Messenger Service spam was only a minor inconvenience as I knew how to turn it off; however, within a short while I got a message from Windows saying that svchost.exe had crashed: the Blaster worm had struck.

The Blaster worm attacks Windows XP, and Win2K systems. In order to infect a system the worm needs to send the correct payload for the respective OS. The worm is not able to differentiate between the XP and Win2K so it randomly guesses the OS type; however, if it guesses wrong the RPC service crashes, and Windows reports it as a crash of svchost. The Blaster attack was quite a surprise as the major outbreak of the worm occurred back in August 2003, and I was expecting all infections of the worm to be fixed by now.

I was in no position to do anything about the Blaster attack, so I continued downloading the 35 MB service pack 4 over my dialup connection. It took me a couple of hours to download it, but Windows Update refused to install it; Windows Update probably needed some functionality provided by the crashed svchost.exe.

I rebooted and connected to the internet, which was a mistake as I was giving the worm a second chance to infect my system. Anyway, I proceeded to Windows Update, and tried the same download again. Alas, Windows Update had forgotten all about the 35 MB it had downloaded previously, and started downloading the same stuff all over again. Worse, the Blaster worm crashed svchost again, and I had to discontinue the download.

I knew about the existence of a standalone security update to patch the vulnerability Blaster exploits, so I decided to bypass Windows Update and download it directly. The download was small less than 1MB, but as soon as I tried running it I learned that it requires at least service pack 2 to install, which I didn’t have.

Microsoft provides a separate download for service packs as well, and I decided to download the latest service pack, service pack 4. Well, the standalone service pack 4 distribution turned out to be a mammoth 129 MB download. This is about the maximum I have ever downloaded over a dialup connection; a download of this size can easily take 10 or more hours to complete.

Downloading a large file over dialup requires the ability to resume downloads which Internet Explorer does not provide, so I downloaded Wget to acquire that ability. Wget is a commandline tool and is invoked by calling it with the URL name. I tried pasting the URL on the command line, but it turns out that the cut and paste functionality disappears after a blaster attack, so I was forced to manually type the URL.

Normally, typing a URL is not a big deal. Everyone types URLs all the time, and I do too, but I do mind typing gibberish strings of 95 characters like the following:

http://download.microsoft.com/download/E/6/A/E6A04295-D2A8-40D0-A0C5-241BFECD095E/W2KSP4_EN.EXE

To cut a long story short I managed to download and install the service pack, and the Blaster security update. Finally, the Windows Update started working and after another 30-40 MB of downloads, and 3 or so reboots, I managed to installed the 18 security updates available there (another 5 have been added to that number as of now).

After this experience I cannot help but laugh at the ‘usability’ problems Windows users are reporting about GNOME and KDE. It has become pretty clear to me that Windows users are so accustomed to usability problems that they don’t even recognize them as usability problems. But, as soon as these people move to a different environment they start complaining simply because the new environment does not replicate the features and bugs of Windows exactly.

The other big lesson from all this is that most Windows users are incapable of ‘securing’ their systems. This is precisely why an unprotected system gets attacked in a matter of seconds, and spammers are still sending out Messenger service spam. Worse, Microsoft is directly responsible for this state of affairs. Windows encourage users to reinstall it every once in a while, and when they do, Windows Update actively prevents users from updating their systems.

The whole idea of Windows Update is a joke. Using an unreliable and insecure network as the primary means of distributing security updates is simply idiotic. This is like asking people to walk through a minefield to get to a shelter. I was able to download security updates off the internet only because the current generation of worms are not particularly malicious; they are just minor irritants.

If Microsoft is serious about Windows security it needs to fix Windows Update, and get rid of the damned Registry for good. Unfortunately, Microsoft’s approach is to layer half baked fixes over utterly broken things to keep them going for as long as possible. Microsoft knows that there is a problem with the Registry, but the way it is dealing with it is by offering Registry rollbacks, and similar worthless functionality.

I did a search on Google for “System Restore Does Not Work” and as anticipated there are plenty of complaints about XP’s System Restore functionality. Furthermore, such approaches even if they somehow became reliable would still not work. There is a very simple reason for that, users cannot reliably associate the problems they are experiencing with changes in the Registry. For instance, if svchost crashes how is a user to know whether changes in the Registry caused it or a worm caused it? The extra functionality will likely lead to futile rollbacks and additional frustration for the users.

The upcoming SP2 update for Windows XP is another good example of a clueless fix. According to the reports I have read SP2 will enable the XP firewall by default, and will also include many nifty features to protect the system. It is pretty obvious that such updates cannot work in the presence of the Windows Registry. Windows users who install any kind of software will sooner or later be forced to downgrade because of registry problems, and when they do they will get fried.

I am not saying Microsoft should not do what is doing, but it should focus on the more important things first. For the short term the correct approach is to fix Windows Update so that users aren’t forced to connect to a network to get security updates. Windows update should encourage users to create a Windows Update CD that contains all the security updates the user has downloaded so far. The CD should contain a setup routine that is capable of installing all the updates in an automated fashion without requiring user intervention. Inevitably, when the user downgrades he/she can use that CD to update the system, and then connect to a network to download any further updates. Such a CD should be shareable amongst users, so that if someone doesn’t have an update CD, he/she can simply get one from a friend or an acquaintance.Actually, Microsoft does offer a security update CD, and is willing to ship it to customers free of charge. But, as always Microsoft has made a mockery of a decent idea. First of all, 2-4 weeks are needed to deliver the CD. Then there is the problem of availability, the CD is not available everywhere (I live in Pakistan, and the CD is not available for Pakistan). Also, the CD Microsoft is offering is horribly out of date. There is no fix for this last problem, if Microsoft starts updating the CD every other week, then people will start asking for a new CD every other week. Obviously, shipping a CD to every customer every few weeks is quite an expense, and Microsoft doesn’t want that. So, the Microsoft Update CD is there just for moral support.

Overall, Microsoft is flat-out confused about how to deal with Windows security problems. The recent decision to disallow pirates access to Windows XP SP2 is another action reflective of that confusion. I can’t understand why Microsoft is so jittery about supporting pirates. Microsoft’s paying customers are suffering because of insecure Windows systems; therefore, Microsoft’s first priority should be to get the worm infected systems fixed. If this requires distributing security updates to pirates so be it.

Microsoft really needs to look beyond short term remedies to solve security problems. The company has to move away from its Windows roots in order to create a secure operating system environment. Microsoft has a huge research and development budget, and it just doesn’t make sense why it cannot develop a security centered OS.

LAST UPDATES: by Usman Latif [May 16, 2004]