Currently Online

Latest Posts

Topic: Improving Production Sites

toptopple
Avatar
Joined: 2013-10-30, 08:11
Posts: 156
Ranking
At home in WL-forums
Posted at: 2016-07-28, 23:03
May be all arguments, but as I said: it's a question of game-making! We can decide for either that or the other, depending on what deems us to make more sense for gameplay.

@Tibor
What kind of AI-tweaks do you expect to deal with?

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1030
Ranking
One Elder of Players
Location: Poland
Posted at: 2016-07-28, 23:21

Any changes to game engine can affect AI.

Imagine that you have changed the price of a fortress with one stone. Now you can build it a bit faster and cheaper. Does it affect AI? Yes, but probably only a little.

Another example: you've changed the production time in a mine and make it twice an effective. It affects the AI more.

Tibor is considering if your idea is changing anything or not. Bringing any changes before build19 can affect the gameplay and the AI can be less productive than before. We don't want to have that.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/

Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1231
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-07-29, 07:17

DragonAtma wrote:

Keep in mind that going from tavern to inn to big inn are upgrades, not downgrades. The way I see it, it makes more sense for upgrades to make them better at producing lower-level items, not worse.

After all, when you go from a low-level amateur to top-level professional, you become better at making small, quick programs, not worse. The same is true for sketches, short stories, peanut butter & jelly, etc.

You are right, it should be this way


Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1231
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-07-29, 07:26

@Tibor What kind of AI-tweaks do you expect to deal with?

Well measuring of performance is quite screwed in the game and AI has even own internal statistics. Problem are buildings with multiple outputs. The single number of performance is not able to say whether another building of the type is needed. Currently the building with 4 outputs, producing only one of them can have utilization 25%, depending on sleep times. So in short a percent when AI decides that new building of type is needed is dependant on number of outputs, and I dont remember from head but the formula can look like:

treshold = 80 - 15 * count_of_outputs

(all in percents)

Now it works somehow, but if you change sleep time too much an investigation and tweeking would be needed.


Top Quote
toptopple
Avatar
Joined: 2013-10-30, 08:11
Posts: 156
Ranking
At home in WL-forums
Posted at: 2016-07-29, 13:49
New branch topple-production-logic-2. This deals with the weapon and armour smithies of all races to eliminate ANY penalty time for unselectable products. This may, under circumstance, speed up production of simple weapons considerably.

With this branch my suggestions about improving production sites via scripts are completed. Unconditional penalty times, as discussed earlier, have not been included.

Top Quote
toptopple
Avatar
Joined: 2013-10-30, 08:11
Posts: 156
Ranking
At home in WL-forums
Posted at: 2016-07-29, 13:50

@Tibor What do you refer to with "count_of_products"?


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1264
Ranking
One Elder of Players
Posted at: 2016-07-29, 14:11

DragonAtma wrote:

Keep in mind that going from tavern to inn to big inn are upgrades, not downgrades. The way I see it, it makes more sense for upgrades to make them better at producing lower-level items, not worse.

After all, when you go from a low-level amateur to top-level professional, you become better at making small, quick programs, not worse. The same is true for sketches, short stories, peanut butter & jelly, etc.

I fully subscribe that.

Furthermore, keeping some lower buildings to specialize in making one specific ware could be left as a viable game strategy only if it made sense in terms of game performance. But it doesn't. If you keep some taverns to make only the rations, you'll obtain that your big inns will only have to work on snacks and meals... and they will work slower because of that. Letting the tavern produce rations faster than the big inn would make for some fine strategy if having one tavern and one big inn allowed you to produce stuff faster than having two big inns, but that's mostly not the case here (unless you need exactly two rations for every snack and meal). So, we either choose to specialize each building, so that the tavern will make rations faster, the inn will make snacks faster, and the big inn will make meals faster if it doesn't have to produce anything else, or we avoid penalizing the big inn for only producing one kind of ware if only one is needed.

By the way, I always keep a few taverns to make extra rations just because I can stop bread from going to taverns, and that way I will only use inexpensive meat for rations; if I managed the economy to have the big inn do everything, it would use precious bread for rations, and the extra space wasted for taverns/inns is well rewarded with less grain needed. Which is a second point I raised.

Also, since the snack and meal have exactly the same cost in resources (you need strong beer instead of beer, but both cost one grain and one water), and the deeper mine produces more resources per food used, I skip deep mines as soon as I have enough experienced miners to man deeper mines. I'm not sure if this is an issue or not.


Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1231
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-07-29, 20:54

toptopple wrote:

@Tibor What do you refer to with "count_of_products"?

how many types of products the site produces. This matches number of production programs I think.


Top Quote
toptopple
Avatar
Joined: 2013-10-30, 08:11
Posts: 156
Ranking
At home in WL-forums
Posted at: 2016-07-31, 00:01
@Tibor
I. Calculation
So are you saying that when productivity of a site (or the average of all sites of this type) surmounts the calculated value (which is a percentage) a new house is built? I hope the given formula is falsely put
treshold = 80 - 15 * count_of_outputs


If I put in the count for e.g. empire->weaponsmithy (which is 5) I receive 80 - 15 * 5 = 5. You would receive countless houses until this value is not met.

II. Impact on AI
As for my observations, which so far confirm theory, statistics values for production sites won't change through the new scripts but they may become crudely FALSE because they don't represent the real productivity of the site any more. (Not sure if they did before!) They are false in the sense that they are TOO LOW (never to high)! But as your thresholds appear to be considerably low, it could well be there is no noticable change to the quality of AI playing.

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1264
Ranking
One Elder of Players
Posted at: 2016-07-31, 14:08

toptopple wrote:

II. Impact on AI As for my observations, which so far confirm theory, statistics values for production sites won't change through the new scripts but they may become crudely FALSE because they don't represent the real productivity of the site any more. (Not sure if they did before!) They are false in the sense that they are TOO LOW (never to high)! But as your thresholds appear to be considerably low, it could well be there is no noticable change to the quality of AI playing.

So far, statistics are too low already. BY looking in the archive, it should be possible to find the thread where i demonstrated it, as well as the bug report.

If the proposed modifications are implemented, to have realistic statistics (more realistic than current ones) it would be enough to not consider a skipped cycle as a failed cycle.


Top Quote