Economy score should be the sum of all gathered resources divided by 10, but since rP14703 the economy score is the sum of all gathered resources + the gathered vegetarian food divided by ten.
Military score should also contain the value of captured units.
Details
- Reviewers
causative - Commits
- rP19584: Fix economy and military score
The economy score should be a tenth of the total gathered resources minus the costs for training of corral animals.
The military score should contain the value of captured units.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
The purpose of adding vegetarian food is so that corral users don't get double the food score of farmers - corral users should subtract the cost of sheep, from the food they produce. If you exclude vegetarian food entirely as in this patch, corrals would be overcounted in the score.
Prior to this patch, the problem is that it counts food twice, compared to the other resources. To fix that, in this patch it should instead add 50% of the food score to 50% of vegetarian food, plus the other resources, and divide by 10. Unless you want to do it perfectly by subtracting the cost of sheep/goats/pigs from the economy score, which is more difficult.
In more detail, what matters is the net food you're getting out of the corrals after the cost of the sheep; that's the figure that should be compared to field food. If your corrals are giving you X food/sec neglecting the cost of the sheep, and another player's farms are giving them X/2 food/sec, then you are both able to sustain the same army production with respect to food. If carnivore food is counted the same as vegetarian food, then over a long game, a given economy size using corrals would get an inflated score compared to a field economy.
Counting carnivore food as 50% relative to vegetarian food is how it worked before, and though it's buggy, there is a justification for doing it that way - solving that bug by creating a new one, where corral users get inflated economy scores, is worse imo. Over a longer game, counting carnivore food as 50% is closer to the perfect solution of subtracting sheep.
A comment might be added to the code if that design decision is accepted, so that other devs don't assume its a bug either.
We might want to write a ticket to count the sheep-food differently explicitly (so that fishing and hunting is still counted correctly)
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1190/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1194/ for more details.
So if we count in trade, wouldn't it be more consistent to subtract the cost to train trade carts as well?
binaries/data/mods/public/gui/summary/counters.js | ||
---|---|---|
106 โ | (On Diff #1917) | That comment should be self-evident mostly, but you could mention the reasoning behind it (that we only count the net gain. |
binaries/data/mods/public/simulation/components/StatisticsTracker.js | ||
255 โ | (On Diff #1917) | && |
No, as you buy a sheep and then kill it to get resources. You don't buy trade carts to kill them for resources, but you let them work for you...
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1195/ for more details.
The argument given was that the net gain has to be considered, i.e. excluding the cost from gained resources. So the same argument could be applied to trade carts or even women on fields.
F.e. assume a game where the players have only one metal mine each, one of them is using it to build up trade, the other one to train champions. The economy score will show that the trader had a much better economy, but since he invested everything into a tradeline, he had zero net gain.
IMO it would be more consistent to only count the income. It's the decision of the player what to use the resources for and instead of training more sheep he could also stop the sheep production.
If all of the food income was used to train more sheep, the food was still gathered, so don't see why that economy score would be zero then. The military and trained unit score will show that it wasn't a good idea.
If you want to show whether the economy was effective, you could add an economy surplus field (i.e. total income minus total outcome) which would be ideally zero for every player (every resource gathered is also invested), negative for players with bad economy (relied on tributes) and positive for slingers (people who gather resources for their teammates)
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1197/ for more details.
I don't mind removing the sheep subtraction...
I am not fully convinced of that either.
(Though I find it more reasonable than subtracting sheep and trading carts costs...)
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1201/ for more details.
Sheep are not an investment, they're a consumable good. Farmers and traders are an investment, that keep working for you over time, so they are different.
Technically what you really should subtract is the value of sheep when you butcher them, rather than when you create them - you destroyed your own asset (the sheep) and this loss should be deducted from the balance sheet. You aren't destroying your farmers and traders. The difference is irrelevant in practice, though, since the long-term sheep butchering rate roughly equals the sheep production rate.
Hypothetically, imagine you had a "vineyard" structure that gave 5 food/sec, but also cost 4 food/sec (in fertilizer, for instance). Would you want to record this as 5 food/sec on your economy score, or as 1 food/sec?
I don't really care, if we subtract sheep costs or not. (I understand the motivation behind both approaches)
The difference to a field which needs fertilizer is that you don't have a choice and that noone will likely implement a simultaneous +5 and -4 income. With sheep you can still abort the production after having trained 100 of them simultaneously and then take full advantage of them.
But I see your point too, just tried to avoid those hardcodings which are often bound to fail conceptually if some assumption changes.
Pick the one you prefer, the last two patches both looked okay.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1217/ for more details.