The [ppm] eyrie

January 19, 2010


Filed under: powerplay manager hockey, PPM.miscellaneuous, Uncategorized — glanvalleyeaglets @ 3:21 pm

This is an article I always wanted to do – about the named bundle of attributes, qualities and statistics, about the silent knight of Powerplay Manager, about the goat, ass, horse or hypogrif that carries or brings down the hopes of the manager, the entity that gets nominated for the national team and without hesitation goes through fire and water, checks and fights, not afraid of any kind of fractures, inflammations, abdominal stretches and anginas when serving his Manager, who are you, my dear reader. Let me introduce Mr. Ice Hockey Player. Treat him well and he will thank you on the ice.

Your goal must be to train the player correctly, preferably so that he is the best possible player he could ever be at any time. I’ll leave the definition of the phrase “best player” as an exercise for the interested reader 🙂

The best service you can do to a Player is give him the right training for a certain position. The player will become your vision, so take care to have the right visions. It is perfectly all right if you want to turn a young center into a winger, if he has the quality-wise disposition for this. Scout your players, this will show you the way.

Read the Guide if you haven’t done so yet. Re-read it every now and then. The Guide was never written by the actual developers, so it is no wonder that it contains lots of bugs and omissions. Follow the Guide, but don’t trust it. Don’t trust me either, I’m much further from the developers than the authors of the Guide.

One of the most quoted and mysterious passages in the Guide is the following:

“Player with attributes 180 – 25 – 25 or 70 – 90 – 90 /where the first one is the primary main attribute and the last two are secondary main attributes/ is not as good for the given position as a player with attributes 120 – 30 – 50. Similarly a player with attributes 130 – 80 – 30 or 80 – 80 – 80 is not as good as a player with attributes 100 – 80 – 50.”

What in the world is it supposed to mean? Here are two of the most common misinterpretations of this verse:

* Guide states that 100-80-50 is the best distribution
* There is a built-in penalty for excessive secondary attributes, so 70-90-90 might be strictly worse than 70-70-70.

The Guide doesn’t state any of this. Instead, the Guide
* identifies a player with its primary and secondary attributes (three numbers) and
* states that a player P can be strictly better or worse than player Q for a given position.

Hold your horses, what does it mean “better”? My best guess is that the Guide compares players according to their contribution to the team and line strength rating (a.k.a. the pucks and the stars). In this sense one can introduce a number that measures the effectivity of a player for a certain position. I sometimes call it the “effective primary attribute” (EPA).

The guide confirms that EPA depends only on the primary and both secondary attributes. The possible dependence of this relation on the position remains obscure.

I will try to interpret what the Guide tells about the EPA, and will use some maths. If you want to skip this section, you are welcome to do so.

Let me denote the primary and secondary skills by A, B and C. We are looking for a non-negative function of three non-negative arguments with following properties:

1) Monotonicity (better attributes = better player): if A_1>A_2, B_1>B_2, C_1>C_2, then EPA(A_1,B_1,C_1)>EPA(A_2,B_2,C_2)
2) the A-skill monster punisher: as any one or two of A, B, C tend to infinity and the third remains fixed, EPA(A,B,C) remains bounded.

The simplest functions with the desired properties (punishing the weakest link) are involving the minimum operator:
EPA(A,B,C)= \mathrm{min} \{A, B/\beta, C/\gamma\},
where \beta, \gamma>0 are constants. Such function has a clear interpretation: the optimal ratio of skills is 1:\beta:\gamma.

The constants can be estimated by using the examples from the Guide. The strictest inequalities are:

1) (70-90-90) < (120-30-50) \implies   \frac{1}{\beta} > \frac{7}{3}
2) (130-80-30) < (100-80-50) \implies \frac{1}{\gamma} < \frac{10}{3}

I will add another one:
3) Since the first secondary skill cannot be less worth than the second secondary skill, we have \frac{1}{\beta}\leq \frac{1}{\gamma}.

(1-3) together imply: \frac{7}{3} < \frac{1}{\beta} \leq \frac{1}{\gamma} < \frac{10}{3},

So according to the Guide, the optimal distribution should be in the range (7-10):3:3.

At the beginning of the third season a group of Latvian managers carried out an experiment to find out the optimal primary-to-secondary skill ratio for goalkeepers. They nominated only one goalie for the first game of the league, and then collected the attributes, chemistry and experience in a table together with the rating for goaltending. The data were surprisingly consistent and clearly demonstrated that the ratio 1:0.5:0.5 = 2:1:1 gives the best results.

It also supported the old rumors about the influence of Chemistry and Experience. This law of thumb states that “100 points of chemistry give +20% to the attributes and each 100 points of experience give additional +20% to the attributes.”

So this might be the key to high rating of team strength. Have we come closer to answers to the question – what is the best training for my Mr. Player?

Not necessarily.

* The best Defender will not help his team much if he spends his life in the cooler. A good way to reduce his time on the penalty bench is – train up his technique to match the aggressiveness. Open question: should the Tec:Agg ratio be 1:1, 9:10, or perhaps even 2:1?

* The shooting attribute is independent from the primary/secondary bundle. Open question: which ratio to the primary and secondary skills is the best for the different positions?

* Passing, Technique and Aggressiveness: is there a use for higher values of these attributes than half of the primary skill?

* The “alien primary skills”: does the center need defense and if so, how much?

* Special players: perhaps it is wise to build several types of players – the offensive specialists for PP, defensive masters for PK, mix up good passers and good shooters to increase the productivity of a line? If so, then different attribute ratios should be followed for different players.

It is up to the manager.

Now back to the quality of a player. Yes, I mean it, THE quality.

Suppose you want to train your Player in k skills with the ratio R_1:R_2: \dots :R_k. Let the corresponding qualities of the attributes be Q_1, Q_2, \dots, Q_k and the daily progress of the attributes at the current stage of development is correspondingly P_1,P_2, \dots, P_k.

Then the effective quality of the player for that ratio is given by the weighted harmonic mean

\frac{R_1 + R_2 + \dots + R_k}{\frac{R_1}{Q_1} + \frac{R_2}{Q_2} + \dots + \frac{R_k}{Q_k}},

and the average time in days for the player to increase his overall rating by one point with the current facilities and staff is the weighted mean

\frac{\frac{R_1}{P_1} + \frac{R_2}{P_2} + \dots + \frac{R_k}{P_k}}{R_1 + R_2 + \dots + R_k}.

Along with the age and career longevity, the effective quality is the only parameter that determines the future of the player and should be the only number to look at when evaluating a future prospect!

(A side note. There is a weird misconception traveling around, which is called the average of important qualities. This has no “physical” interpretation and anybody using it should be sued for crimes against maths. Qualities 60-60-60 are MUCH better than 85-85-10!)

August 6, 2009

Aaaaargh, the economics!

Filed under: PPM.miscellaneuous, Uncategorized — glanvalleyeaglets @ 9:59 am

Let me start with a short story, an urban legend. Once upon the time there was a poor young lad who met a millionaire and asked him the obvious question – how he made his fortune? The old millionaire looked at the sky, smiled and said, “Yeah, well, my son, I still remember the times of the great Depression. I was down to my last nickel, but I never thought of giving in. Instead, I invested my last nickel in an apple. I washed and polished that apple and at the end of the day I sold it for 10 cents.

The very next morning I invested the 10 cents again and purchased two apples. I washed and polished them and sold for 20 cents. I kept going like that for several months and eventually made over ten dollars.

Then my old aunt died and left a fortune of 44 millions, and since then I have been a rich man.”

What bothers me in Powerplay Manager is the new sponsorship deals for the second season. No question, the contracts should increase with time, I am just a little bit worried about the rate of the growth. Contracts suddenly explode, with increments of something like 1,000% and more (approx. 2,000 % for the winners of I.1). I expect pretty dramatic effects on the game. One of the worst fears is that trading (and I mean rough trading, where you buy players with high A qualities, train a single skill and sell the poor guy who will never become a great player) might generate so high incomes that traders might dominate the whole game in a few seasons. I hope I’m wrong since this is a strategy I don’t approve of.

Another observation of mine is that teams from higher leagues usually get the better contracts. A difference of a single league can outweigh as much as 20-30 rating points. Sure, a good thing that motivates the promotion ASAP. There is nothing worse than grand contracts for teams that deliberately avoid promotion to boost the rating (weaker league!). On the other hand, the first season could be an exception with minimal financial differences between the leagues. Fine, I can live with that.

Right, now we have a few days to arrange with the new circumstances. I guess the trick is to focus on the own team – to build it, to choose the tactics and try to get the best results. Frustration usually comes from comparing with other teams.

Long live the new contracts! Prost!

June 3, 2009

What the hell are these numbers!?

Filed under: PPM.statistics, Uncategorized — glanvalleyeaglets @ 10:30 am

Honestly, would you say you believe in statistics? I was taught to distrust any statistics that I didn’t make up myself. (98.3% of all statistics are actually made up.)

When I was younger, I was forced to have some lessons in the noble subject of mathematical statistics after my epic fail at the oral exam in probability theory, so I can hardly be accused of being in love with the matter which Laplace has called “common sense reduced to calculus”.

So, do you believe in statistics? Does the old sailor believe in the drag of the wind? Break the wind down to the molecules and you’ll see miriads of them releasing their kinetic energy to the wrong side of the sails. Break the great laws of Powerplay Manager down to single games and you’ll see nothing but Random. I bet I’ll deny the cosmic order when the mighty Random hits me in midair at the least appropriate time and that will surely happen provided that this is a part of the cosmic ppm order.

The topic is – how do we measure the weight of the wind given the molecules?

Let us start with an assumption. The game results are computed by some sophisticated, possibly probabilistic algorithm. (No malevolent demon or creature making fun of our feeble attempts to understand the natural laws.)

Consequently, given the values of all the visible and hidden variables that can influence the game, including but not limited to the skill attributes and seasonal energy of all the players engaged in the game and the tactical options chosen by the managers, there exists a well-defined probability for each event expressed in terms of result of the game, e.g., the probability of the event “team A wins” or of the event “the total number of shorthand goals scored by both teams in the game lies between 1 and 3”. The probability exists but remains unknown to us.

Let us first consider the idealized case that all teams are equal. This is certainly not true now and will be even less true in the future as the difference in rates of team development plays a more and more prominent role. Suppose that we observe n games, where team with tactics A plays vs a team with tactics B. Let us choose an event, e.g., that team A wins or that the game ends in overtime. Let us define the random variable X_k, which takes the value X_k=1 if the event happens in the k-th game and X_k=0 if it does not.

How would you estimate the probability of the event from the data (X_k)_{k=1}^{n}? Of course, you would count the cases when the event happened and divide by the total number of the games, i.e., you’d take the sample mean M:=\frac{\sum_{k=1}^nX_k} {n}. Let us ask the obvious question: how good is this estimate?

Evidently, the random variable nM is the sum of n Bernoulli random variables and hence has a binomial distribution. Let the true and unknown expectation of X_k for any k be p, then M has the expectation \mathbb{E}(M)=p and variance \sigma^2=p(1-p).

By the Central Limit Theorem we know that the random variable
Z:=\frac{M-p}{\left[M(1-M)/n\right]^{1/2}} \to N(0,1), n\to \infty
asymptotically (for large n) tends to the standard Gaussian distribution. From here we can express
but we know that Z \sim N(0,1) that gives us a weapon to compute the confidence intervals for our estimates!

For example, there is a 95 \% chance that Z\in (-1.96,+1.96), see here for other values (in this table you should look up the value of half of the probability, e.g., \frac{0.95}{2}=0.475 since the integration starts from zero.)

Let us assume that M=0.4 (a typical value in our statistics study), then for n=200 we get a \pm error of 0.0679, i.e., less than 7\%. For n=1000 this 95\% confidence interval halfwidth is 0.030 so that I dare say that a result of 50/30 in our data is a statistically significant difference while 44/41 is not!

So you still do not believe in statistics? Well, all of the above was true, had our random variables X_k had equal distributions. Alas, in the real virtual PPM life the outcome of a game with Tactics A vs Tactics B depends on so many additional factors, that we may fairly assume that for each k the expectation \mathbb{E}X_k=p_k is different. A generalization of the central limit theorem still holds, but what we are estimating is the value of n^{-1}\sum_{k} p_k. This value depends on the everchanging distribution of player skills, energies, injuries, teams that play this tactics – countertactics pair. In short, it depends on the available sample pool.

As long as the parameter distribution in this sample pool is neat enough, our data will give a faithful estimate of the performance of Tactics A vs Tactics B for “average” teams. I hope I have convinced you and thus can spare more detailed formulations and mathematical proofs of the corresponding results and conclude that there is a very good chance that our tactics-countertactics tables actually “work” for an “average” team, quod erat demonstrandum by this article.

May 7, 2009

We claim this space as our Eyrie

Filed under: Uncategorized — glanvalleyeaglets @ 12:29 pm


we are the Glan Valley Eaglets. It is true what they say, we only exist as numbers in a database which is a part of a hockey simulator, the powerplay manager (PPM), and yet we claim this space as ours! Actually it was our manager – he has such a big mouth that he just can’t shut up until they finally kick him out of the place. Any place. We just wanted to give him some space outside our locker room, so he can live out his writing compulsion without talking the pseudointellectual sh#t out of us. He is dangerous indeed, he can’t write or speak correctly either English, German or Russian, and yet he tries. Unfortunately. When facing him, you can expect to hear a mixture of any of these languages in any combination. Sometimes even Latvian, which happens to be his mother tongue. Other than that, he is our freakin’ manager and we are giving all we can so that his plan comes together on the ice.

Now that this is our eyrie, we can define our hunting fields. We can expect reports from PPM, both concerning us, the Glan Valley Eaglets and PPM as such. Perhaps an occasional bit of statistics gathered by our freak manager. Who knows what it might be good for!

Create a free website or blog at