Techs lost due to tech upkeep

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Post Reply
bard
Veteran
Posts: 121
Joined: Fri Jun 14, 2013 2:00 pm

Techs lost due to tech upkeep

Post by bard »

In v2.5, when tech upkeep and tech loss are enabled, it is possible to lose a random tech when the reserve of science bulbs are negative. However, the number of negative bulbs needed to cause the loss of a tech depends on the cost of the tech being researched, instead of the tech being lost.
I see this design problematic because the lost tech could be much cheaper (for example 100 bulbs) than the negative bulbs (for example -500 bulbs). In this case it would be better to lose the tech and to re-research it, than to pay the tech upkeep (in the example, you waste 100 bulbs to recover a lost tech, while you save 500 bulbs for not paying the upkeep).
I would suggest to handle the loss of techs in the same way than the loss of buildings: when the bulbs are negative, the value in bulbs of the lost tech (or a percentage choosen from 1 to 100%) is summed to the reserve of science. There could be a setting to choose this percentage (or set it to 50% like the sold buildings), but I think it should never be greater then 100%. I mean, a tech that cost 100 bulbs should never restore your reserve of bulbs from -500 to 0 as it happens now.

Actually, I'd suggest to implement it exactly the same than treasure, where buildings are sold until the treasure is positive again, so it is not possible to start the turn with negative gold nor bulbs.

By the way, is there any way to create a ruleset where the lost tech does not cause holes in the tech tree? I mean, that you can not lose a tech that is requisite of another one. Is it possible to use root_req for this purpose?
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Techs lost due to tech upkeep

Post by cazfi »

bard wrote:Actually, I'd suggest to implement it exactly the same than treasure, where buildings are sold until the treasure is positive again, so it is not possible to start the turn with negative gold nor bulbs.
Would simply setting allowed shortage of bulbs to be 0% from the cost of currently researched tech suffice in the ruleset? That still leaves the possibity that shortage is greater than the cost of the lost tech, but it would trigger tech loss immediately when there's shortage, and isn't one tech / turn loss speed bad enough? If player had -500 bulbs deficit this turn, losing one tech is not going to make next turn profitable but there will be deficit again.
At the same time I have to say that I wouldn't play with such a ruleset. The reason it was changed to current system from the old "shortage triggers immediate tech loss" was to avoid uncontrolled spiraling back down to stone age for example if one tries to switch government immediately when it gets researched -> bulb storage is empty to begin with after the discovery, anarchy then causes research to cease for a while, and resulting tech losses easily cut research down even more. It also was stupid that conquering enemy city with conquercost enabled could cause player to lose one tech when new was stolen from the enemy, regardless of you research speed.
bard
Veteran
Posts: 121
Joined: Fri Jun 14, 2013 2:00 pm

Re: Techs lost due to tech upkeep

Post by bard »

Would simply setting allowed shortage of bulbs to be 0% from the cost of currently researched tech suffice in the ruleset?, and isn't one tech / turn loss speed bad enough?
I think it is not bad enough in most cases, and it would lead to counter intuitive strategies.
Let's say we are playing with the rule "one tech loss per turn when negative bulbs" (the worst case as you said), and imagine the tech upkeep when you have researched almost the whole tree is -1000 bulbs per turn, while the cheapest tech in the ruleset costs 100. Now imagine you gain 2000 bulbs when taxes are 100% to science, or 2000 gold when taxes are 100% to gold.
In this case, it is a waste of money to pay the upkeep everyturn, it is better to toggle between taxes 100% to money, and 100% to gold.

Option 1)
- taxes set to 50%: you pay 1000 bulbs for upkeep and gain 1000 gold.
After 2 turns you gain 2000 gold and you avoid losing techs

Option 2)
- taxes set to 100% gold one turn: you do not pay the tech upkeep, you lose one tech that cost 100 bulbs, and gain 2000 gold.
- taxes set to 100% science next turn: you pay 1000 bulbs for tech upkeep, and gain 1000 bulbs for research (-100 used to re-research the lost tech)
After 2 turns, you gain 2000 gold and 900 bulbs, and you suffer one turn without one random tech.

It is an average example that could happen in most cases where tech upkeep is enabled. If the lost tech is cheaper than the upkeep that you save, then it is not worth to pay the upkeep.
It would be like paying 500$ everyturn to upkeep buildings, and if you do not pay it, you only lose one building that cost 100$ to be rebuilt. In the case of buildings you also lose the effects of the building until you rebuilt it, but in the case of technologies, the only purpose of most techs is to be requisite of other techs that you already researched, or to build improvements that you already built.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Techs lost due to tech upkeep

Post by cazfi »

I agree that you shouldn't get more than lost tech's worth (then it's a question if you always get all of its worth (which would in most cases make tech loss less severe than current rule), or smaller value of tech worth and what it takes to reach 0 balance).

It's just a matter of schedule. After your latter explanations I think this might count as 2.5 dfff blocker. That might mean postponing dfff depending how soon I can look in to issue.

Please open a ticket about this in any case, so we can track it as dfff blocker.
bard
Veteran
Posts: 121
Joined: Fri Jun 14, 2013 2:00 pm

Re: Techs lost due to tech upkeep

Post by bard »

I'm not sure about the best solution. It sounds good to get the lost tech's worth, but only until the balance is 0 again, as you said.
EDITED: Thinking about it, it could lead to micromanagement: if a balance of -1 bulb at end of turn makes you lose one tech that cost 100 bulbs, and the balance is restored to 0 bulbs, then it is better to end the turn with a balance of -100 bulbs, that will be restored to 0 bulbs too.

I think the safer solution is to get always the same percentage of the lost tech's cost, 50% by default.
In the case that the tech worth is not enough to restore positive balance of bulbs, I guess it is better to keep it negative. The alternative is to lose several techs in one turn until the balance is positive, but as you said, it is not good to send a civ to middle ages in one turn.
I opened a ticket here: https://gna.org/bugs/index.php?21623
Post Reply