I think it's an interesting concept. I do modeling like this for a living, and I'm going to give the approach some more thought. First blush: it's a good model. I'm not sure if the 'Payoff' matrix is set up correctly, but without real data that's difficult to know.
For people who don't speak code, here're the results of Kafein's simluation in graphical form (only plotted to time = 50, because nothing interesting happens after that):
visitors can't see pics , please register or login
For those who speak MATLAB:
N = 500; %Number of iterations to run
s = .1; %Time step per iteration
tRec = s:s:(N*s); %Time vecot for plotting
classes = {'Ranged','Shield','2h','Pole','Cav','HR'};
P= [2 1 4 4 4 3; ... %Payoff matrix; needs analyzing
5 3 2 2 1 1; ... % Elements are effectiveness of class[row] against
1 4 3 4 3 1; ... % class[column]
1 5 3 3 5 1; ...
4 5 2 1 1 2; ...
2 1 4 3 4 2];
%Initialize Variables
popRec = zeros(N,length(classes));
pop = ones(size(classes))/length(classes);
for i = 1:N
%Evaluate fitness of each class against current population
f = pop*P'.*(1-pop.^2);
t = sum(f.*pop);
%Update population
f = f - t;
pop = pop.*(1+f*s);
%Record values for plotting
popRec(i,:) = pop;
end
%Plotting
figure
area(tRec,popRec)
axis([-inf inf 0 1])
xlabel('Time Index')
ylabel('Portion of Population')
legend(fliplr(classes),'Location','EastOutside')
title('Population Evolution')
It's not pretty or very well commented, but it is equivalent to Kafein's code. I just translated it quickly, as I didn't have much time. I'll revisit it later.
I understand that the fitness = fitness * (1-pop^2) is trying to model the resistance of 'the last, hardcore players of a certain class to change'. The relationships are definitely non-linear, and this shows some of that. Can any other math people comment on whether they think this is the right way to do it?
Why are you using area instead of a straight up plot? The vertical axis doesn't represent "portion of population" this way.
visitors can't see pics , please
register or
login^With plot() we can clearly see that at every point in time the sum of popRec is one and the initial time assumes that there are an equal amount (very close to equal at least) of players for each class. Now it's easier to look at without trying to interpret which space is bigger at what point etc (I removed the "classes" string flip on the legend because it didn't look consistent at all with the area graph).
From his model we can say that over time (from steady state to infinity) 27% play 2H, 27% play pole, 24% play ranged, 19% play shielder, 3% play cav, and almost no one plays HR.Anyways, I don't agree with the payoff matrix. Shielder has 2 effectiveness against 2H and Pole and only 1 versus Cav? Is there a reason a scale of 1-5 is used? Wouldn't a more simplified 1-3 scale (1=disadvantage, 2=even, 3=advantage) be better (and more objective) representation? Why aren't hybrids accounted for (there are many players who are spec pole/2h but use their crossbow most of the time, also dedicated archers who run away versus archers who 1h/2h melee -- both have different effectiveness versus other classes)? Also not sure what to make out of the characteristic model applied or why it's used.
This is based on way too many assumptions for anything meaningful to be dug out of it. It's fun to fiddle around with I guess, which I guess was the purpose anyway. I'd like to see the devs release data on class population over time (if something like that exists) and maybe someone could highlight what patches were released when and what was nerfed/buffed/etc.