Page 14 of 18

Re: Testing Economic Balance Changes

Posted: Sat Jul 06, 2019 6:26 pm
by sven
zolobolo wrote:Here is a planet managed by the AI on normal.


Would you upload this save? That does look very wrong, but, it's possible that the AI hadn't researched Market Theory by the time it was done improving this planet; which might explain the weird build pattern.

zolobolo wrote:If they build a few markets here and there, then it is likely that no coin aid would be necessary at all (or just a very small amount to keep them from stalling) and they would naturally have more labor, research, food and further coin income due to the a considerable potion of the populace not rebelling


I'm pretty sure that technically the AI isn't actually receiving any coin aid (that's true even on Hard and Brutal, and it's certainly true on Normal). On 'Hard', they'll get reductions in ship build costs and research costs, but, those are actually relatively minor. The big thing the AI gets on Hard/Brutal is starting condition boosts. I suspect that in a lot of cases, when you think you're seeing coin bonuses, what you're actually seeing are side effects from the AI having started with extra pop and a second colony ship.

Re: Testing Economic Balance Changes

Posted: Sat Jul 06, 2019 6:53 pm
by zolobolo
sven wrote:Would you upload this save? That does look very wrong, but, it's possible that the AI hadn't researched Market Theory by the time it was done improving this planet; which might explain the weird build pattern.

Uploaded: game_8328

Yes they did not research markets but have seen this behaviour in almost all of the games so far and even if they do, they only build markets on a few planets (haven1t checked if this is due to late research though). If this is really the only thing stopping them from building properly, this might be fixed with research priority? Like if it costs <3 turns to research, they should always go for it?

sven wrote:I'm pretty sure that technically the AI isn't actually receiving any coin aid

It certainly seems like that though - see my sumamry of the last game on Hard regarding Gremak

In the above save there is a +10 coin that is not displayed in the coin breakdown where it comes from. Most of their income does seem to be from taxes though (thanks Threshers :))
In case of the Gremak example, they had 1 planet, <1pop, and -20 for ship upkeep but only had -6 or so as total change per turn (maybe the bonus is +10 coin all the time?)

If I select the Ashdar and turn off the AI control, income rops by aroudn 100 coin - guess this would be another side of the bonus which effects all AI controlled planets individually

BTW: the pop menu is a really helpfull little mod :)

Re: Testing Economic Balance Changes

Posted: Sat Jul 06, 2019 9:37 pm
by sven
zolobolo wrote:
sven wrote:I'm pretty sure that technically the AI isn't actually receiving any coin aid

It certainly seems like that though - see my sumamry of the last game on Hard regarding Gremak

In the above save there is a +10 coin that is not displayed in the coin breakdown where it comes from. Most of their income does seem to be from taxes though (thanks Threshers :))


Oh, you're right! I'd totally forgotten that bonus was in there. It would appear that at some point in the distant past, I decided adding a +5 coin per planet ai bonus made sense (maybe I did it to try and compensate for the hostile environment costs?). This +5 coin bonus gets doubled by the trade activity, so, yes, it often works out to +10.

AI's are also currently exempted from paying ground unit maintenance costs -- something that mattered more in earlier builds, when the ground unit costs where higher, and upkeep costs scaled with technology; in the current balance I don't think that special rule ends up mattering much.

To keep 'Normal' mode as fair as possible, I'll take both those bonuses out.

Re: Testing Economic Balance Changes

Posted: Sat Jul 06, 2019 9:49 pm
by sven
zolobolo wrote:Yes they did not research markets but have seen this behaviour in almost all of the games so far and even if they do, they only build markets on a few planets (haven1t checked if this is due to late research though). If this is really the only thing stopping them from building properly, this might be fixed with research priority? Like if it costs <3 turns to research, they should always go for it?)


In the current balance I think there's an argument to be made that making markets locked behind a tech may be a bad design choice. From the AIs perspective, I think it should now almost always be one of, if not the first tech they research. I've added little hack to the research logic that will now heavily weight researching markets in the early game, so AIs who lack market tech should become a much rarer occurrence. But I'm also going to take another look at the improvement spread logic before I push this patch.

Re: Testing Economic Balance Changes

Posted: Sat Jul 06, 2019 10:34 pm
by Uncle_Joe
sven wrote:
zolobolo wrote:Yes they did not research markets but have seen this behaviour in almost all of the games so far and even if they do, they only build markets on a few planets (haven1t checked if this is due to late research though). If this is really the only thing stopping them from building properly, this might be fixed with research priority? Like if it costs <3 turns to research, they should always go for it?)


In the current balance I think there's an argument to be made that making markets locked behind a tech may be a bad design choice. From the AIs perspective, I think it should now almost always be one of, if not the first tech they research. I've added little hack to the research logic that will now heavily weight researching markets in the early game, so AIs who lack market tech should become a much rarer occurrence. But I'm also going to take another look at the improvement spread logic before I push this patch.


As soon as you push it I'll fire up a game as the Humans. Just played one with the previous build and even on Normal it felt like the AI's had a lot more money than me (even with me paying half the maintenance they are lol).

I'm still re-learning the tech flow of the game but I'm very impressed with the way it plays. The diplomacy is more interesting, the econ is tighter, and the AI seems quite adequate.

Re: Testing Economic Balance Changes

Posted: Sat Jul 06, 2019 10:45 pm
by sven
Uncle_Joe wrote:As soon as you push it I'll fire up a game as the Humans. Just played one with the previous build and even on Normal it felt like the AI's had a lot more money than me (even with me paying half the maintenance they are lol).


Ok, the patch is pushed (r38160). Be aware that it may take 5-10 minutes to get out to all of Steam's various servers. (Assuming you're using Steam.)

Uncle_Joe wrote:I'm still re-learning the tech flow of the game but I'm very impressed with the way it plays. The diplomacy is more interesting, the econ is tighter, and the AI seems quite adequate.


Good! It's been a bit of a journey getting there -- but my own sense is also that we're close to having found a better balance.

Re: Testing Economic Balance Changes

Posted: Sat Jul 06, 2019 10:49 pm
by sven
sven wrote:I've added little hack to the research logic that will now heavily weight researching markets in the early game, so AIs who lack market tech should become a much rarer occurrence. But I'm also going to take another look at the improvement spread logic before I push this patch.


I did end up deciding that the improvement spread logic needed some tweaking -- markets should be significantly more common as of r38160.

Re: Testing Economic Balance Changes

Posted: Sun Jul 07, 2019 6:27 pm
by zolobolo
sven wrote:markets should be significantly more common as of r38160

Confirmed - AI seems to both reasearch markets early on and build them on their planets

New test game
- Player with Humans
- AI: Gremak and Ashdar
- Oval, small galaxy all default settings
- Normal difficulty

Findings after 200 turns:
- AI progression feels natural, they did not get stuck altogether, have been outperforming the player in research (Gremak) and pop (Ashdar)
- AI had no chance against agressively expanding palyer (but did not attack anymore to not alter their progression)
- Both AIs had difficulties building up their fleet: Gremak lacked Metal and Ashdar has been concentrating on colonisation and also lacked metal
- Gremak has performed better then in other games - problaby due to the market but might also just have had luck when attacking the Ashdars
- Ashdars lost a consdierable portion of their fleet and a colony to marauders - need more ships
- Both Ashdar and Gremak did not build a lot of small ships (4-5), but were trying to go for mid-size
- The low base income seems to have prevented the AIs from building military ships in the first 50 turns

Suggestion:
- The AI build strategy seems to be mostly held back by one aspect in my opinion at this point: they want to build factories on each colony (at least one) and mostly as a first building. This then leads to a lot of time lost while these plaents do not produce any additional metal/food or coin. This strategy of building a factory first works well if they can afford to buyout the building at turn 1-3 but is a huge time-sink otherwise. If they build up their economy haster in early game, they can start building ships earlier as well
- Fleet buildup should also have helped the Ashdard (as they had a lot of coin but but would have needed more ships) if set to 75% at least. This shoudl also make them start building combat ships earlier
- AI would benefit from building more smaller ships (a small increase mihht be enough as they did build a few already, but if Ashdar is going out withouth Light Cruisers, they loose most of theit punch in early-game: maybe they are deprioriatizing because of the high upkeep?)

Regarding build order: I have noticed this tendency of autobuild to always start with a factory. Dont know if you would like to adress this as well be if yes, here are a couple of suggestions from my strategy:
1. When newly coloniswed never start with factory as first building unless: High value production planet (no high metal or speical resoruces but >4 slots) AND can buyout right away
2. When newly colonised AND special resource on planet (Precious metal, supergrain) always start with 1-2 corresponding buildings (as these can be finished in reasonable time and bonus applied)
3. When newly colonised AND Metal=High, then always start with Mine (unles overall food is <10)
4. When newly colonised AND Fertility=High, then alway build Farm within the first two slots (unless overall food<10 in which case farm goes first)
5. Always build at least one market/planet (usually goes into 3rd slot), but start with market when newly occupied planet with conquered pop
6. Lab only to be built when at least 3 other buldings are already there, unless Artifacts on planet, i nwhich case this can be the 3rd building
7. Factory only to be built if planet had >4 slots OR has low metal AND fertility
8. >2 Factory only to be built if planet has >4 slots, and does not have both HIGH metal AND fertility OR special resources

Re: Testing Economic Balance Changes

Posted: Sun Jul 07, 2019 7:21 pm
by Uncle_Joe
I seem to getting my ass handed to me as the Humans lol. I know that they are supposed to be harder to play but in the past I've succeeded with them quite well. Now I feel like they are extremely luck-dependent. If I don't get a few good systems (aka Fertile planet and/or planets without Income penalty) or a lot of pirates and crap are spawned near me I might as well throw in the towel.

I've started about half a dozen games as the Humans (on Normal) and only one was viable enough to play it out till the late game (never finished due to restarting with new build). All the rest I feel like I didn't really do a lot wrong so much as just started in horrible places.

Some of it is exacerbated by the tighter mechanics. If I get a raider world near me it's usually a write off. They send too many ships too many times and it's nearly impossible to take out those space stations early in the game with the smaller fleets.

All in all I wouldn't mind seeing a default decrease in the number of hostile things near your starting area. For reference, I'm playing with 45 stars, Box, 3 Opponents on Normal.

Re: Testing Economic Balance Changes

Posted: Sun Jul 07, 2019 10:44 pm
by sven
Uncle_Joe wrote:If I get a raider world near me it's usually a write off. They send too many ships too many times and it's nearly impossible to take out those space stations early in the game with the smaller fleets.


Yeah, when I run into maruaders in the very early game I pretty much always just pay whatever they're asking for tribute. The payments only last for 20 turns, and even if you have the ships to fight them off, doing so is such a drain on your resources it's generally not worth it.

I think the balance on marauder tribute rates in 'Normal' should generally be such that an early game human could survive after paying them off -- but if this isn't your experience, please upload a game and I'll take a look.

Re: Testing Economic Balance Changes

Posted: Tue Jul 09, 2019 7:53 pm
by zolobolo
Huge map, all factions, Normal difficulty after 200 turns:
- All of the AIs are expanding (slowly due to low ship count)
- AIs now buy mercs espcisllay Phidi who have most of their ships hired :) finally its merc time! Oh yeah 8-)
- AI seems to have enough coin but no ships till turn 50 or so and amount of ships it low afterwards (except for Phidi): Gremak only maintain 2 Cruisers and 4 Destroyers at Turn 200 which sohuld be an earlygame fleet tops (till end of Turn 100-120)

At this point the player is unbetable, the AI needs to start producing ships earlier to expand more agressively and have more pwoer at the mid game else player can steamroll them

Re: Testing Economic Balance Changes

Posted: Thu Jul 11, 2019 7:36 pm
by zolobolo
Is there a file where I can switch the buildup percentage to coin of the AI?

Would like to try out various percentages of buildup starting with 75% as I think that would help the AI a lot withouth loosing out on economic buildup

Re: Testing Economic Balance Changes

Posted: Thu Jul 11, 2019 10:02 pm
by sven
zolobolo wrote:Is there a file where I can switch the buildup percentage to coin of the AI?

Would like to try out various percentages of buildup starting with 75% as I think that would help the AI a lot withouth loosing out on economic buildup


The file you're looking for is Lua state\AI\handle_production.lua, at the top of that file is a piece of logic that looks like this:

Code: Select all

function set_target_navy_investment()

  local income, taxes, trade, ship_up, planet_up, net_agreement,foreign_trade_bonus,food_bonus,tank_up
    = empire:income()

  psuedo_income=income+ship_up
  ship_upkeep=ship_up

  local war = empire:is_at_war()

  if empire.warmonger
 
    target_navy_investment=0.95
 
  elseif empire.ai_state.strategy_cards?.rush
   
    target_navy_investment = 0.9

  elseif empire.ai_state.strategy_cards?.tech
 
    if war
      target_navy_investment = 0.8
    else
      target_navy_investment = 0.6
    end
 
  else
   
    if war
      target_navy_investment = 0.9
    else
      target_navy_investment = 0.75
    end
 
  end

  local credits in empire

  if credits > 5*psuedo_income
    target_navy_investment=max(0.8,target_navy_investment)
  end
 
  -- if there's no other empires that we know of, cut down our
  -- target investment dramatically.
  -- (taking this out, as i'm not convinced it's a good idea)
  --local other_naval_power, median_naval_power = enemy_naval_power(empire)
  --if other_naval_power<=0
  --  target_navy_investment*=.5
  --end


As you can see, there's actually quite a few different cases and checks that one might fiddle with there.

Importantly, there's one check in there I'd forgotten about, that was reducing the target navy investment by half in the case that there were no known foreign powers. I think that logic was probably making AIs more easily rushable in the early game, so I've commented it out as of r38170.

In r38170, I've also increased the baseline peace investment number from 0.6 to 0.75. But I don't think either change will have a huge impact on how the AI is performing on normal. Now that I've removed their coin bonuses, suboptimalities in the way AIs handle building up a planet's improvements are probably going to leave them gaining power more slowly than an experienced player would. There are also issues with colony ship vs. combat ship prioritization. Knowing at which point you should switch your main production world from spamming colony ships and transports to building up military ships is a relatively hard strategic call, and right now, the AI doesn't have a huge amount of logic devoted to evaluating that choice.

Re: Testing Economic Balance Changes

Posted: Fri Jul 12, 2019 3:26 am
by Uncle_Joe
I finished one game as a Haduir (on Normal but got a good start and was pretty much leading for most of the game although the end game was sort of touch and go for a while vs the Yoral fleets).

I'm in the end-game of a Human game (Normal). Again I got a good start and I'm pretty good shape but for the longest part of the game I was simply first among equals and had to fight some pretty intense wars.

Overall, I think the game is playing VERY well. The AIs are not only competent, but interesting. I'm enjoying the various situations and demands/events that happen diplomatically. Maybe a few randomized response for the same message every now and then would keep it from becoming repetitive but that is really not a priority issue by any means lol.

Economically, I also really like where the game is. Every resource has been important right up to the end. Every time I feel flush with cash, something comes along that needs upgraded or jumpstarted and I spend it all down. Same for Metal. For a while I was sitting on 4500+ and thought I had way over-produced it but sure enough a war with the Phidi caused a to shift to full military production and that stockpile disappeared FAST! It was great that I had to keep shifting resource priorities.

Combat also feels like it's in a good place at the moment. All of the weapon types seems to have their strengths. For a while I was winning wars with Human Carriers/Cruisers/Missile Cruisers with tons of missiles and fighters but I ran up against a fleet with a LOT of anti-missile/fighter weapons and ended having to retreat. I had to retool a few classes back over to guns to hold the line. Again, that felt amazing that I had to do that.

I would say this is the best the game has felt so far. I'm very impressed with the changes and as soon as I finish one game I'm immediately wanting to start another which is a fantastic benchmark. Kudos!

Re: Testing Economic Balance Changes

Posted: Fri Jul 12, 2019 8:14 pm
by zolobolo
sven wrote:Importantly, there's one check in there I'd forgotten about, that was reducing the target navy investment by half in the case that there were no known foreign powers. I think that logic was probably making AIs more easily rushable in the early game, so I've commented it out as of r38170.

In r38170, I've also increased the baseline peace investment number from 0.6 to 0.75. But I don't think either change will have a huge impact on how the AI is performing on normal

The two changes have had some specific effets as expected: on normal, huge oval galaxy:
- AI starts to build of earlier
- They gain more terriroy withi nthe same timeframe of 200 turns: this seems laregely due them semengly be able to "deterr" Marauders more effectively
- As before: none of the AIs have stalled, coin does not seem to be an issue for them, markets are built almost optimally now, and tech progress feels very natural compared to that of the player

When viweing the below, please consider that I was cheezing the game as much as possible with missile only Tinker destroyers on endless build and outfitted with science station, still two AI mayor empires have emerged:

If the Orthin would have started building up earlier, I would call this a full success.

Next I will try something a bit more drastic but I think the sweet spot is very close