Home > Article, English > Thermodynamics applied to Mafia Wars!

Thermodynamics applied to Mafia Wars!

Assume you have ‘x’ energy, and required-energy-to-do-a-job is yi (i=1,2,3,4,…) and experience reward per job is zi (i=1,2,3,4..). The most preferred job will be the one which gives maximum value for ((x-(x%yi))/yi)*zi; thermodynamically speaking this quantity is the exergy of the system – the maximum experience (work output) you can score by doing a job with the given energy.

I have made a bookmarklet for Firefox to compute the exergy here. Add the bookmarklet to your toolbar and click it on mafia wars job pages. The max. experience you can achieve from the available energy will be given under the jobs, which is the “most preferred job to do” at that time. This ain’t my original code, but adopted and edited from Spockholm mafia wars tools, and they own all the credits (except for the bugs and damages – no one including me owns or will be held responsible it). I would’ve released this code via a GPLv3 if I had coded it completely.

Foot Notes

x/y – division. For eg. 28/5=5.6, 25/5 =5.
x%y – modulus (remainder after division). For eg. 28%5 = 3, 25%5=0.
(x/y)*z won’t always give you the maximum experience. Only when the quantity (x/y) is a whole number – Mafia Wars doesn’t allow you to do 1.5 or 3.6 jobs, but 1 job or 3 job. So, (x-(x%y))/y times you can do a job when you have x amount of energy, and multiply it with experience rewards for that job to get the maximum experience you can gain.

Possibly Related Posts:


  1. tintumon
    August 18th, 2009 at 23:42 | #1

    dude, i’ve retired from the bloody warfront and living a peaceful lyf in my ancestral house here in duffai. so, i dont get too much carried away with this workaround :) . would have given it five stars plus grace if i were still playin’ ;)

    btw, great findings.. ya :)

  2. August 19th, 2009 at 17:32 | #2

    @tintumon

    It has been 2 weeks since I got de-addicted from the game, but I still wanted to finish all my NY tiers. I have a new addiction now – Farmville, another game from Zynga. :)

  1. No trackbacks yet.

Subscribe without commenting