## Revisiting In-Game Player Scores in Standard WOK

All about the online version of classic WOK games.

Moderators: Duke, trewqh, korexus

Moderator
Posts: 1652
Joined: Tue Sep 03, 2002 7:00 am
Location: The Netherlands
Now to get back on topic...

Code: Select all

``{3(TEC + 150)/5500 + EFF / 440}``
I don't really see why TEC would be in the overal multiplier. I can understand EFF being in there as that infuences how well all the 'dice rolls' go, but TEC only influences the number of attacks and has a value as a trade in. So no direct influence on missiles, spies or DEF. So TEC should have a separate modifier for armies. Plus a separate bonus for the trade in value it has.
"Never attribute to malice what can satisfactorily be explained away by stupidity."

"To speak ill of others is a dishonest way of praising ourselves."

korexus
Moderator
Posts: 2819
Joined: Tue Nov 12, 2002 8:00 am
Contact:
Anyway, back to the point.

In the hope of a Grand Theory of Unification (or at least coming up with the bits of the formula we can agree on) I've looked at military strength.

I've taken 1 level 10 troop as the "perfect" unit of ARM, eventually, 1 level 1 troop will be our basic block, so let's see how much better the perfect troop is.

Assuming no defences in a province (DEF is catered for elsewhere in the formula) and an EFF of 100% (if EFFs are equal for both players, it falls out of the equation, so we can set it to a nice number) the power of our "basic" troop is 10 and the power of our "perfect" troop is 100. This means that on 90% of the perfect troop's rolls, he will win outright with the other 5% being split 50/50. That is the "perfect" troop will win 95% of battles, the "basic" troop will win 5%. The "perfect" troop is 19 times better.

Therefore, for every point a level 1 troop is worth, a level 10 troop should be worth 19 points.

Following the same logic through for other levels, a Level 2 troop is 3 times better than a level 1; a level 3 troop is 5 times better; a level 4 troop is 7 times better...

So it turns out I was wrong about the squared. The modifier for LEV should be ARM * (2 * LEV - 1) for the strength of different players armies to be directly comparable. I still feel this should be worked out over each province individually, not with the average values.
With Great Power comes Great Irritability

Brykovian
Moderator
Posts: 1045
Joined: Tue Sep 03, 2002 7:00 am
Location: Minneapolis, MN USA ... Clan: Scholars
Contact:
Saladin wrote:I was wondering what other languages they standard teach in the UK and the US besides English?
/me happily joins the side-track

The primary "foreign languages" in the US are Spanish, French and German, with most emphasis these days going on Spanish. However, most universities would also have programs for Japanese, Russian, and Mandarin ... plus, depending on the geography, most of the other western European languages, Arabic and Hebrew, and the ancient Greek & Latin. Other languages (the various African languages, eastern European, etc.) would need to be sought-out.

In the US, foreign languages are generally considered a "side course" or "elective", unless you are studying something that applies (such as a language focus, international business, clergy, etc.) ... usually lumped together with music, arts, and other "humanities". More emphasis is given to math and the English language as the "core" subjects, with science as a close secondary.

-Bryk
Matt Worden Games ... Gem Raider, DareBase, Castle Danger, Keeps & Moats Chess

Moderator
Posts: 1652
Joined: Tue Sep 03, 2002 7:00 am
Location: The Netherlands
This applies to just universities? As i was refering to basic highschools. Is that the same there?
"Never attribute to malice what can satisfactorily be explained away by stupidity."

"To speak ill of others is a dishonest way of praising ourselves."

Brykovian
Moderator
Posts: 1045
Joined: Tue Sep 03, 2002 7:00 am
Location: Minneapolis, MN USA ... Clan: Scholars
Contact:
Saladin wrote:This applies to just universities? As i was refering to basic highschools. Is that the same there?
French, German, and Spanish can be found at almost all high schools and quite a few elementary/middle schools. My 7yo daughter, for example, took her first year of Spanish this past school year.

Some pre-university schools will offer some of the other languages, depending on availability of instructors, geographics of the area, etc.

Most of the time, second-language training starts in high school (except for those who are learning English as their second language).

-Bryk
Matt Worden Games ... Gem Raider, DareBase, Castle Danger, Keeps & Moats Chess

korexus
Moderator
Posts: 2819
Joined: Tue Nov 12, 2002 8:00 am
Contact:
*ignores the education related nonsense. Ask me somewhere else and I'll rant until your ears fall off, but not here.*

Now that we've defined how strong LEV should be, we need to look at how power DEF is. It only affects the same thing as LEV, so we can make a direct comparison.

The problem we run into is that DEF is more powerful in a level with armies in it. If we go down trewqh's road of how strong someone is right now, we should only count the DEF in provinces which have defenders. To go down my route has other problems, namely deciding how much to weight the DEF.

We know that DEF is multiplied by 4 in the PDEF formula, while LEV is multiplied by 10, it follows therfore that the PDEF should be 4/10 as strong in the score. However, it also only works in defense. By definition it is used in exactly half of calcultions across the game, so we should halve this amount, to 2/10 or one fifth.

I therefore suggest the following formulae:

Code: Select all

``````trewqh's version:

ARM * { (2 * LEV - 1) + (2 * DEF - 1) / 5}

``````
summed over every province

Code: Select all

``````korexus's version: - Vortan don't you dare pick me up on the apostrophe, I know what I'm doing!

ARMt * { (2 * LEVa - 1) + (2 * DEF - 1) / 5}

``````
where ARMt is the total number of armies and LEVa is the average LEV. This shows what would be available if you put all your armies in that province.
With Great Power comes Great Irritability

Moderator
Posts: 1652
Joined: Tue Sep 03, 2002 7:00 am
Location: The Netherlands
Cool, a second language at only 7. They don't start quite that young over here. English is usually given from the age of 10 i believe.

There's always the whole 'let children be children' mentality over here. So they don't want to ask 'too much' of elementary(?) school children (age 4-12). So they don't get a lot of homework and such (usually only in the last two years, just a little here and there).

Though personally i believe if you teach them in an interesting and engaging way children just want to learn more and more and school will not be necessary burden on a child (as some people see it) but will help a child grow in it's own pace (which is usually faster than people give children credit for).
"Never attribute to malice what can satisfactorily be explained away by stupidity."

"To speak ill of others is a dishonest way of praising ourselves."

Brykovian
Moderator
Posts: 1045
Joined: Tue Sep 03, 2002 7:00 am
Location: Minneapolis, MN USA ... Clan: Scholars
Contact:
Saladin wrote:Cool, a second language at only 7. They don't start quite that young over here.
It's not a required class ... but it was available through the school as an option (had to pay a fee and attend right before the normal school day begins), and she wanted to learn it.

Foreign languages are never a requirement before university ... usually they are grouped with other humanities -- and a certain number of humanities must be taken in high school.

Elementary school has less flexibility to it ... most kids are taught the same thing (math, reading, writing, science, history, music, art, and gym), with special pull-out options for the gifted and those who need special help in some subjects.

High school provides more flexibility ... and university, the ultimate in flexibility.

-Bryk
Matt Worden Games ... Gem Raider, DareBase, Castle Danger, Keeps & Moats Chess

Brykovian
Moderator
Posts: 1045
Joined: Tue Sep 03, 2002 7:00 am
Location: Minneapolis, MN USA ... Clan: Scholars
Contact:
And, korexus ... I like your "trewqh's version" better.

-Bryk
Matt Worden Games ... Gem Raider, DareBase, Castle Danger, Keeps & Moats Chess

korexus
Moderator
Posts: 2819
Joined: Tue Nov 12, 2002 8:00 am
Contact:
*continues to resist the urge to make bitter and cynical comments.*

The next thing which can affect armies effectiveness is how many attacks they get. They start off with 3 attacks and gain 1 for every 50 tech points the player has. I would therefore multiply my armies power by (TEC + 150)/50 This would not be exact as it would count more for 60 tech points than 50 and would carry on counting beyond 200, but I see that as showing it will be harder to reduce the player to less than however-many attacks.

To go along trewqh's path of actual strength, we would go with a logic statement:
min[int_val{(TEC + 150)/50},7] where int_val takes the integer part of a number (chopping the decimal, not rounding it and min takes the smaller of this value and 7.

Note that the fact trewqh's formula looks more complicated is not an arguement against it. The game engine won't mind...

So the formulae grow to:

trewqh:

Code: Select all

``````
[ARM * { (2 * LEV - 1) + (2 * DEF - 1) / 5}] * min[int_val{(TEC + 150)/50},7]

``````
korexus:

Code: Select all

``````
[ARMt * { (2 * LEVa - 1) + (2 * DEF - 1) / 5}] * (TEC + 150)/50

``````

[edited to correct the 3s to 50s. Thanks, Bryk!]
Last edited by korexus on Thu May 31, 2007 9:36 pm, edited 1 time in total.
With Great Power comes Great Irritability

Moderator
Posts: 1652
Joined: Tue Sep 03, 2002 7:00 am
Location: The Netherlands
I agree with what Bryk said.

korexus wrote:

Code: Select all

``korexus's version: - Vortan don't you dare pick me up on the apostrophe, I know what I'm doing!``
Thank god i'm not Vortan.

Honest question...i thought that you didn't put a second s after the apostrophe, so that it should be Korexus' or have i been doing it wrong all these years
"Never attribute to malice what can satisfactorily be explained away by stupidity."

"To speak ill of others is a dishonest way of praising ourselves."

Brykovian
Moderator
Posts: 1045
Joined: Tue Sep 03, 2002 7:00 am
Location: Minneapolis, MN USA ... Clan: Scholars
Contact:
korexus wrote:min[int_val{(TEC + 150)/3},7]
Wouldn't this always result in "7"? If TEC=0, then the first part of the equation will be 50 ... which is greater than 7. Perhaps you meant some other denominator other than 3?

-Bryk
Matt Worden Games ... Gem Raider, DareBase, Castle Danger, Keeps & Moats Chess

korexus
Moderator
Posts: 2819
Joined: Tue Nov 12, 2002 8:00 am
Contact:
Yes and no. That is the rule for biblical names and names from the ancient world (so Jesus' disciples, Pythagoras' theorem) but somewhere along the line, we changed it so that you do put the extra s on. (So Fitzsimons's theorem, if I ever make one...) Cross over then hurts. James is a biblical name, but it's still in use. What do I do? No one is entirely sure. Well, actually, lots of people are entirely sure, but they don't all agree...

"korexus" sounds like it's derived from latin and thus from the ancient world, but in point of fact, it isn't. So the extra s goes on.

Dammit, you distracted me.
With Great Power comes Great Irritability

korexus
Moderator
Posts: 2819
Joined: Tue Nov 12, 2002 8:00 am
Contact:
Brykovian wrote:
korexus wrote:min[int_val{(TEC + 150)/3},7]
Wouldn't this always result in "7"? If TEC=0, then the first part of the equation will be 50 ... which is greater than 7. Perhaps you meant some other denominator other than 3?

-Bryk
Sorry, yes. The denominator should be 50. I was trying to pull out the number of attacks. I'll edit accordingly...

korexus.
With Great Power comes Great Irritability

Moderator
Posts: 1652
Joined: Tue Sep 03, 2002 7:00 am
Location: The Netherlands
Pff...ok you lost me there. Now i remember why i always ditched math class.

Anyway, i'm positive you can find the best formula yourself. I'm just in favour of TEC being used separately for the armies (like you did in the last formula) and it being calculated for every province separately instead of averaging everything.

Now have fun with the number crunching math boy.

Oh and feel free to make some cynical comments i'm sure Bryk can take it.
"Never attribute to malice what can satisfactorily be explained away by stupidity."

"To speak ill of others is a dishonest way of praising ourselves."

korexus
Moderator
Posts: 2819
Joined: Tue Nov 12, 2002 8:00 am
Contact:
Next thing to look at is MIS. We've defined how much ARM, DEF and TEC are worth (at least in trewqh's formula, my MIS value may need some tweaking when we count the potential trade ins from TEC) so we have a fairly good idea of what one missile is worth. We're going to get some interesting interplay once we add spies to the mix as spies and missiles can kill each other, but we'll deal with that later.

We're still inside a bracket of things which are affected equally by EFF, so assuming it's at 100 missiles have:

a 25% chance of killing an average of 3 armies
a 25% chance of killing an average of 3 spies
a 25% chance of killing an average of 9 TEC points
a 25% chance of killing exactly 0.1 DEF

note, this assumes short range bombing. There is no simple way to say how often bombs will be long and how often will be short ranged. If anyone has a suggestion, we can add a multiplier to take the extra misses into account I will call this "H" for hitrate in these formulae, but it will be 1 unless anyone has a better suggestion.

We have another interesting point here. The value of these missiles will, in part, depend on the LEV of an opponent's armies as well as the number of armies, amount of DEF and number of TEC points. We can make an arbitary multiplier, or we can read across all player reports to get these values or we can use the players' own provinces as a rough guide. Thoughts?

So, in terms of what a missile can take out it should be

H * {3 * (points per army) / 4 + 3 * (points per spy) / 4 + 9 * (points per tech point)/4 + (points per DEF)/40}

The points per spy come next, so I'll call those S.

The points for one army is:
{ (2 * LEV - 1) + (2 * DEF - 1) / 5}] * min[int_val{(TEC + 150)/50},7]
or
{ (2 * LEVa - 1) + (2 * DEF - 1) / 5}] * (TEC + 150)/50

The points for one Tech point is:
{ARM * (2 * LEV - 1) + (2 * DEF - 1)/5 } /50 (sorry trewqh, we have to make this "potential as we don't know which missile will knock the TEC down far enough until it's fired)

and the points for one DEF is:
(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50

For anyone wondering, I got these values by increasing the value of LEV and DEF by one and calculating how much the value of the formula changed.

This brings the intrinsic value of a missile to

Code: Select all

``````(H/40) * {30 * { (2 * LEVa - 1) + (2 * DEF - 1) / 5}] * (TEC + 150)/50
+ 30 * (S)
+ 90 * {A * (2 * LEV - 1) + (2 * DEF - 1)/5 } /50
+ (2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50}
``````
Or the equivalent with the top line changed to trewqh's version.
With Great Power comes Great Irritability

korexus
Moderator
Posts: 2819
Joined: Tue Nov 12, 2002 8:00 am
Contact:
A quick one next. 1 unit of POP is 1/4 as valuable as a level 1 army and one worker is twice as valuable as 1 POP. I'm not entirely happy with these figures, but it's time tested and no one complained about those parts of the forumla, so we'll stick with it. It also gives us the chance to define our arbitary unit. 1 POP = 1 point.

So, we can now roll out our almost completed formulae

score (trewqh):

Code: Select all

``````
POP + 2 * WOK + 4 * [ARM * { (2 * LEV - 1) + (2 * DEF - 1) / 5}] * min[int_val{(TEC + 150)/50},7] + (missiles)

``````

score (korexus):

Code: Select all

``````
POP + 2 * WOK + 4 * [ARM * { (2 * LEV - 1) + (2 * DEF - 1) / 5}] * (TEC + 150)/50 + (missiles)

``````
Where (missiles) is worked out as per my previous post.
With Great Power comes Great Irritability

korexus
Moderator
Posts: 2819
Joined: Tue Nov 12, 2002 8:00 am
Contact:
Spies. Now spies are tricky, because the most common use for them is to gain information. How do we put a price on that? Again, we can put an arbitrary value in for it and this time with more justification, but we an also consider what spies can do to other aspects of a player's empire. Namely the missiles, defences and population in an enemy's provinces.

1 spy can destroy 2 missiles, 0.1 DEF or steal 15 population However, he can only do one of those things, pr he can spy a single province or attempt a multi-province spy. Making him worth

(1/5) * {(2 * M) + (D/10) + 15 + our arbitrary values} Note that the value of a missile is dependent the value of a spy and vice versa. This allows us to substiute our value for spies into the missile formula to find out what it is truely worth.

I'll skip the page of equations, PM me if you're sad enough to want it. On missile is worth:

Code: Select all

``````
{ 5H / (200 - 2H) } * { I + 15 + (DEF / 10) +
30 * { (2 * LEVa - 1) + (2 * DEF - 1) / 5}] * (TEC + 150)/50  +
90 * {A * (2 * LEV - 1) + (2 * DEF - 1)/5 } /50
(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50}
``````
Where I is the value we give spies for their information gathering skills and H is the value we assign for the fact missiles hit less often at long range.

Now that we have a final value for missiles, we can calculate one for spies to. A spy is worth:

Code: Select all

``````
(1/5) * {(2 * M) + [{(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50} / 10] + 15 + I}

``````
where M is defined above and I is our value assigned to information.
With Great Power comes Great Irritability

korexus
Moderator
Posts: 2819
Joined: Tue Nov 12, 2002 8:00 am
Contact:
Nice and easy one again. Spies, Missiles and Armies are rstriced by EFF. So in trewqh's version we multiply these values by EFF, in mine we multiply the whole lot.

Note that this multiplier can be something along the lines of Bryk's suggestion if need be. (3/4 + EFF/100) as the multiplier or whatever numbers seem right)

Anyway.

trewqh:

Code: Select all

``````
POP + 2 * WOK + (4 * [ARM * { (2 * LEV - 1) + (2 * DEF - 1) / 5}] * min[int_val{(TEC + 150)/50},7] + M + S) * EFF modifier

where

S = (1/5) * {(2 * M) + [{(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50} / 10] + 15 + I}

and

M = { 5H / (200 - 2H) } * { I + 15 + (DEF / 10) +
30 * { (2 * LEVa - 1) + (2 * DEF - 1) / 5}] * (TEC + 150)/50  +
90 * {A * (2 * LEV - 1) + (2 * DEF - 1)/5 } /50
(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50}

for I and H our information and Hitrate constants.
``````

korexus:

Code: Select all

``````

(POP + 2 * WOK + (4 * [ARM * { (2 * LEV - 1) + (2 * DEF - 1) / 5}] * TEC + 150)/50 + M + S) * EFF modifier

where

S = (1/5) * {(2 * M) + [{(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50} / 10] + 15 + I}

and

M = { 5H / (200 - 2H) } * { I + 15 + (DEF / 10) +
30 * { (2 * LEVa - 1) + (2 * DEF - 1) / 5}] * (TEC + 150)/50  +
90 * {A * (2 * LEV - 1) + (2 * DEF - 1)/5 } /50
(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50}

for I and H our information and Hitrate constants.
``````
With Great Power comes Great Irritability

korexus
Moderator
Posts: 2819
Joined: Tue Nov 12, 2002 8:00 am
Contact:
trewqh's version is now finished. Mine needs one more adjustment, to take into account the fact that TEC can also be traded in to get missiles, spies, LEV, DEF and EFF.

From the manual:

Trade in 100 Tech points All provinces gain +.3 Defense
Trade in 150 Tech points All provinces gain 5 missiles (must have at least 1 worker there) and 2 spies (must have at least 1 pop there)
Trade in 200 Tech points All armies gain +.3 Level
Trade in 250 Tech points EFF increases by +60%
Trade in 350 Tech points All provinces gain +.6 Defense and all armies gain +.5 Level

Again, you can only do one of these things on a turn, so your tech points are worth

(1/5) { (number of provinces) * 0.3 * (value of DEF) / 100 +
(number of provinces) * {5 * (value of MIS) + 2 * (value of SPY) } / 150 +
(number of provinces) * 0.3 * (value of LEV) / 200 +
60 * (value of EFF) / 250 +
(number of provinces) * {0.6 * (value of DEF) + 0.5 * (value of LEV) / 350 }

We have already calulated the values of DEF, MIS and LEV, the value of EFF is not too hard to work out as everything else in the formula is multiplied by it. This gives our final possible formulae as:

trewqh:

Code: Select all

``````POP + 2 * WOK + (4 * [ARM * { (2 * LEV - 1) + (2 * DEF - 1) / 5}] * min[int_val{(TEC + 150)/50},7] + M + S) * EFF / 100

where

S = (1/5) * {(2 * M) + [{(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50} / 10] + 15 + I}

and

M = { 5H / (200 - 2H) } * { I + 15 + (DEF / 10) +
30 * { (2 * LEVa - 1) + (2 * DEF - 1) / 5}] * (TEC + 150)/50  +
90 * {A * (2 * LEV - 1) + (2 * DEF - 1)/5 } /50
(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50}

for I and H our information and Hitrate constants.
``````
or

korexus:

Code: Select all

``````Code:

(POP + 2 * WOK + (4 * [ARM * { (2 * LEV - 1) + (2 * DEF - 1) / 5}] * TEC + 150)/50 + M + S) * ({3(TEC + 150)/2750 + EFF / 220}) + (1/5) * [TEC * { (5M + 2S) / 150 + 26 * {ARM * (2 * LEV - 1) * (TEC + 150) } / 175000 + 9 * { ARM * (2 * DEF - 1) * (TEC + 150) } / 175000]

where

S = (1/5) * {(2 * M) + [{(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50} / 10] + 15 + I}

and

M = { 5H / (200 - 2H) } * { I + 15 + (DEF / 10) +
30 * { (2 * LEVa - 1) + (2 * DEF - 1) / 5}] * (TEC + 150)/50  +
90 * {A * (2 * LEV - 1) + (2 * DEF - 1)/5 } /50
(2/5) * ARM * (2 * LEV - 1) * (TEC + 150) / 50}

for I and H our information and Hitrate constants.
``````
Note. I have put words into trewqh's mouth here, in saying that his EFF modifier would be simply to multiply by the EFF as a fraction, but I think that best shows how strong someone is at the time, which is his intention.

There. Finished! I drank 2 litres of coke today, haven't had caffeine in a long time. Does it show?

~korexus.
With Great Power comes Great Irritability