% Matlab code for scoring BTS vs. Vanilla/Warlords
% You can copy paste this code straight into Matlab Student edition, and it will do the math and get the numbers out.
popfactor=5000;
landfactor=2000;
techfactor=2000;
wonderfactor=1000;
% data from the 500k game
popmaxscore=1227;
landmaxscore=1720;
techmaxscore=334;
wondermaxscore=310;
poprawscore=677;
landrawscore=757;
techrawscore=120;
wonderrawscore=125;
turnonwin=546;
maxBTSturns=1500;
maxVanillaWarlordstuns=1200;
immortaldifficultyadjustor=1.8;
% not sure about initial pop,land, tech, and wonder values so I calculated for 2 possible scenarios
popinitialscore0=0;
landinitialscore0=0;
techinitialscore0=2;
wonderinitialscore0=0;
popinitialscore1=1;
landinitialscore1=21;
techinitialscore1=2;
wonderinitialscore1=5;
popscore0=(popfactor*poprawscore)/(popinitialscore0+((turnonwin/maxBTSturns)*(popmaxscore-popinitialscore0)))
landscore0=(landfactor*landrawscore)/(landinitialscore0+((turnonwin/maxBTSturns)*(landmaxscore-landinitialscore0)))
wonderscore0=(wonderfactor*wonderrawscore)/(wonderinitialscore0+((turnonwin/maxBTSturns)*(wondermaxscore-wonderinitialscore0)))
techscore0=(techfactor*techrawscore)/(techinitialscore0 * power(floor(techmaxscore/techinitialscore0),(turnonwin/maxBTSturns)))
popscore1=(popfactor*poprawscore)/(popinitialscore1*power(floor(popmaxscore/popinitialscore1),(turnonwin/maxBTSturns)))
landscore1=(landfactor*landrawscore)/(landinitialscore1*power((floor(landmaxscore/landinitialscore1)),(turnonwin/maxBTSturns)))
wonderscore1=(wonderfactor*wonderrawscore)/(wonderinitialscore1+((turnonwin/maxBTSturns)*(wondermaxscore-wonderinitialscore1)))
techscore1=(techfactor*techrawscore)/(techinitialscore1*power((floor(techmaxscore/techinitialscore1)),(turnonwin/maxBTSturns)))
totalscore0=popscore0+landscore0+wonderscore0+techscore0
totalscore1=popscore1+landscore1+wonderscore1+techscore1
adjustedscore0=immortaldifficultyadjustor*totalscore0
adjustedscore1=immortaldifficultyadjustor*totalscore1
% adjustedscore0 = 53515
% adjustedscore1 = 519280 so let's assume this score is almost correct, because it is very close to the actual 502553 in game score...
% now with maxturns=1200 for vanilla and warlords, and the adjustedscore1 becomes: 279740
%Conclusion: WastinTime is right unless the 519280 score randomly appeared so close the the actual 502553 score