amatomu Afrigator

applying game theory patterns to development

mobile - that damned device that makes our life so easy, yet sometimes so inheritely difficult.

as a developer, we kind of try and convince ourselves that developing for mobile and developing for a desktop browser is kind of the same thing.  but we all know that this is a stalling technique for the inevitable, since invariably it becomes a whole different field of play.

every little feature you add, every little flow created and every branch of navigational hierarchy is a challenge on its own.

enter the game theory pattern

this is was where my idea of a game theory patterns came into play.  game theory is a branch of applied mathematics, most notably used in social sciences (economics, biology, engineering etc.).  it is also used a bit in computer science, although referred to in that field as artificial intelligence.

thanks wikipedia :-)

game theory allows someone to apply a bit of mathematics to capture data from a situation and use that data to build a strategic base, which allows you to make decisions to determine your success.

take for example morning traffic - you have 2 routes to take to work - one a bit longer than the other, but the longer route is less likely to be busy.

what do you do?  most of us will take the pro’s and con’s of both routes and use that to base our decision upon.

game theory works exactly, well almost, the same.  except you will probably use a bit of math to finalize your decision (average speed, distance etc.)

so why not use game theory in development, especially in a field like mobile, which is very limiting and very frustating at first.  but the good kind of limitation, the kind of limitation that could possibly create innovation.  the guys behind a phenomenon like twitter decided to limit people to 140 characters.  and despite this limitation, people have found innovative ways to increase the effect of that 140 character limited textual communication.

game theory would allow us to mathematically decide on feature sets, the use of algorythms, objects and could even change the flow of an application.

say on an example mobile application we have 3 major features - chat, activity, content sharing.

which one do we choose as our killer feature, and which would probably make the application more bloated and more problematic to use.  why not use the main variable in the equation to help you decide - the user.

i often secretly chuckle to myself, when a system gets developed for one purpose and all the users start using it for a totally different end result, no one really every thought of, or intended for.  you could use this to your advantage with game theory.

a simple case could be made using application flow as an example.  we have a menu with chat, activity feed and shared content.  which one is more important, which one would you make easier to access for the user.  by simply adding a click count to each feature, you could sort a menu by popularity, rather than obvious choice as this will invariably change someday.

if users decide this month, chat is the next best thing, let chat be number one on your menu - and i know some user interface expert will maintain that consistency is important, but if users consistently choose chat as their most important feature, what would the issue be?

this would change the way you develop and architecture software as well.  since you know chat is gaining in popularity according to your available data, then you should be able to utilize servers better for your chat functionality.  write scaling scripts which would use databases sharding.  and on the other hand, allow your game theory pattern to simplify things - why use a 40 slave/master instances of a database if all you need is one.  eliminate unnecessary overheads in that way - more layers makes for more complexity, makes for more overhead, and will eventually kill your application.

i’ve still got to convince a couple of people to maybe try this game theory pattern approach to development and if, by chance, martin fowler reads this article:

‘please martin, consider this pattern as a topic for a new book! :-)’

  , , ,

back to index

4 Responses to “applying game theory patterns to development”

  1. Conrad Strydom Says:

    Hmm,

    Ja I don’t entirely get the game theory as it applies to different sectors of our existence, but I have gleaned that there is definately some value to be extracted by applying the game theory to out projects, ie that we pivot our search for a succesful experience for an individual on the actions of the community. (err?) Something like that .. now I can go back to sleep….

  2. dewaldbotha Says:

    Yip - I really think that there might be some value to it - I’m not saying write a whole dynamic pattern that could change everything in your application, but just apply it to certain areas - where in the end only the numbers would really speak for itself.

    As PHPSlacker would put it - There is an anti-pattern to everything.

  3. GrahamP Says:

    I don’t think game theory is the right word for it.

    For instance, Gnome-Do remembers the apps you choose most frequently for keypresses. Its more like adapting the UI to make frequently used features more convenient, but doing it dynamically instead of deciding upfront based on user experience testing.

    Also useful: http://en.wikipedia.org/wiki/Estimation_theory

  4. dewaldbotha Says:

    Yip - I agree that the UI could be adapted - and that my use of game theory is probably very liberal in this regard, :-) but I do maintain that you could make strategic decisions based on solid data gathered. Not only in UI, but filtering through to application level and to the way you utilise servers, for e.g. a chat server being able to scale to more than one instance if the need arises -

    I’m still trying to figure out a great code example to better articulate what I’m trying to do - but this might take a while.

Leave a Reply