the “shy robot” problem
February 26, 2010 4:34 pmI’ve heard from several players that it’s possible for Hearts Net to get into a situation where it appears “stuck,” because one robot won’t play a card when it should. This seems most likely to happen to people who play the game in short bursts, interrupted frequently with phone calls or texts or whatever. The bug also exists in Hearts Solo, but is unlikely to be experienced there, since it doesn’t let you play a game for very long. I’ve never experienced this bug personally, because I almost always play whole games at a time.
The short-term fix is easy. The game isn’t really locked up. Go to Settings, and press “New Single-Player Game.” This starts a new game, which won’t be stuck.
The long-term fix, of course, is that I have to find and fix the bug. I have an idea what it might be, but I’m not 100-percent sure. I’ve applied my hoped-for fix to the code, and I’ll submit it to the App Store pretty soon.
The reason that I haven’t already submitted this is that I’m also working on another feature, which I guess I’m calling “state upload.” The card game engine is capable of saving all its state to a block of memory about 3.5k in size. This is the mechanism used when the game saves its state between runs, so it can start up right where it left off. An interesting side effect is that, if I have the saved state file from your game, I can recreate whatever situation you might be experiencing in my local development environment.
Everyone is telling me that the “shy robot” problem persists between runs of the program. That means that the screwed-up situation is definitely stored in the game’s state data. By examining state data from somebody whose game is in “shy robot” mode, I should be able to exactly duplicate the problem locally. Any programmer can tell you that a bug with a reproducible test case is a bug that’s easily fixed. So if my first try for fixing this bug doesn’t work, it’s almost a certainty that I can fix it by examining the state data from somebody who’s experiencing the problem.
There’s another reason why I think this is a feature worth spending development time on. I now have several players who are very opinionated about perceived shortcomings in my Hearts-playing robots. They email me with very detailed situations where they had this set of cards, and a certain robot had that set of cards, and then the robot played this particular card, and oh boy that is dumb.
If I start with nothing but an explanation like that, it could take me days to determine the particular behavior that player is talking about. I’d only have about 60 percent confidence that I could ever figure it out. But if that player can send me his game state, I can reproduce the exact scenario he is talking about with basically no effort whatsoever.
I am fairly baffled that a silly card game is now my Flagship Product. But if lots of people are going to take it seriously, I guess I will too.
Categories: cards
Comments Off


No Responses to “the “shy robot” problem”