AI suggestions

That's an interesting idea Joseph and I can see what you mean. At least some forms of change in Civics might/should not cause anarchy or unrest though others would.
Changing Government Civics should, while changing Agricultural possibly shouldn't, for instance. Though this might be a better fit in another thread, ideas and discussions perhaps, or an own thread.

Nice work Koshling, as usual. I'll restart my game with SVN and see how the differences play out.

Cheers
 
the main problem with anarchy is that spiritual trait is super overpowered. Like easily x2 as good as any other one.
 
Did not mean it the way you're taking it. I obviously have a hard time summarizing my ideas.

I'll stay out of the way as even my suggestions offend ppl, sorry I apologize.

JosEPh
 
Talking of AI behaviour on defending close to city tiles: I have a save where Ai has stationed 3 or 4 units in city and about 35 on a hill 2 tiles away (see persia in example).
They sit there and wait.. for nothing.
Aside 10 axes and some dogs, AI brought 23 slingers to defend the tile and kills itself with the costs of this (wasn't it tweaked so AI wouldn't build too many troops anymore to commit economical suicide?
In same savegame Mongolia - strangely - did not build too many troops while korea and persia and a lot of european nations did.

I also see that once AI tiles have been pillaged by barbs and there are still barb cities nearby they tend not to improve the tiles again... like forever... so instead of using their HUGE stackes to put 2/3 units on every pillaged tile (even if it has no good defense bonus) and then send gatherers/workers there they just keep stacks big on one tile and ignore the plots (to check that behaviour see the bison resource in korea in same save).
I mean what is AI thinking? They (korea, persia) have incredible stacks and the barb cities nearby only 3-5 units defending them.

Even if Persia or Korea would calculate to lose half of the stack they could easily attack and expand or lose and rebuild but have more gold for science in teh meantime as maintenance is gone.

Instead, they build troops again and again but never trigger the attack, as I suppose the first attack calculation is too low for them (do they consider that a dmaged enemy is easier to kill, so they could calculate the chances of first fight, remmeber the hitpoints the enemy would take, substract it from the value of the unit to simulate fight two etc. if four defenders were in there this would have to be done four times to get the chances for the secound round fighting the best defender with the new values) .

It also seems that Korea doesn't calculate to send it's magnificently promoted general to attack with the main stack? So there are a lot of synergies but sometimes AI can't knot the lose ends together to be effective (yet).

I think this save can actually help a lot to improve the AI a lot, if you play with some variables, like what value is needed that actually AI triggers attacks on nearby barb cities.

I know I already told you about the boat bug and you said you would look into it. So just a little follow-up: several hundred years later after my canoe blocked their coastal waters the Koreans still have not built a canoe or raft, so just to let you know the bug doesn't solve itself during the game.

I've had a bit of a look at this, and my conclusion is that really it's not addressable by minor tweaking. A few observations:

  1. The AI will only EVER launch attacks on other cities using stacks headed by UNITAI_CITY_ATTACK
  2. The city building logic only builds UNITAI_ATTACK_CITY AI units if it thinks it is reasonably defensively secure AND if its unit costs are not already approaching out-of-control levels
  3. Because this is a start-as-minors game, the start-as-minors issue (which I think I have significantly allieviated) means that NONE of the civs here regards themselves as defensively secure, so they build defensive units until they basically cant afford to build any more. After that point, even if they become defensively secure, they don't initiate any attacks because of the unit finance issue

In terms of fixing this situation a few points:
  • Having fixed the start-as-minors issue, civs shouldn't get into this hole so easily in the first place. However, in principal it's still a trap awaiting them
  • The entire AI structure sucks in terms of a strategic level. This is because all build decisions are taken locally, so there is no overall coordination

As I said on my v23 to-do list, the second major thing I plan for this cycle (apart from the pathing changes, which are essentially now complete), is to overhaul unit building, so that units can be requested (contracts advertised to build them) and the best placed city or cities can fulfill them, instead of every city building to its own needs. This means:
  1. Newly built cities can concentrate on economic buildings, and request defense units from already-established cities
  2. More unit-XP specialized cities will be more likely to respond to build contracts, so better using their xp-providing buildings, and resulting in a better promoted army (similarly unit-production bonuses)
  3. Anything in the AI can place unit orders. So small cities can request defensive units and so on, but more significantly in terms of the current topic, a stratgeic overview layer can request attack units independently of any particular city's desire for them. This means we can have a layer in charge of coordinated attack strategy managing attack units on a player-wide basis

Hence, I plan to try to address whatever residual problem might remain here (after the start-as-minors thing is taken away as it hopefully largely has been), after I finish that work, because it will impact it so fundamentally.

On a related note - it would be very useful if you (or someone) could check out a start-as-minors game with the latest changes and see if it behaves any better.
 
Btw. In the same game I only got the cities that are not attacked by barb stack because of a Ai flaw I think. half of Tupi army suicided on a scout with very many promotions and a general nearby who also had 10 promotions I think.

So the scout had many first strikes and was on wooded hill, I also had a tracker and a thief nearby to kill the units AI didn't suicide right after as the scout was not able to attack himself.. but if the Tupi just had waited and had estimated the first strikes correctly they should have just ignored the situation and let the one tile occupied by me - after all they had several other tiles to work...(thx to deer*6 spawn bug) basicly they should have researched... axes and stuff, well they had no chance to kill those units I had there

This behaviour must be a LARGE bug. The code evaluates the probability of killing the target stack and won't make the attack (from defensive units) without a 70% chance of killing more value than it loses in the process. This SHOULD include both terrain and first strike evaluation. If you can provide a save that illustrates it I should be able to pin it down. Getting this fixed should be a small tweak but it could make quite a big difference, so if I get an example (from anyone) I'll give it priority.

Note - the question of whether it's a wise attack (beyond that it should be winnable) is a separate matter ;) You can suicidal employ decoys against the AI quite effectively currently!

Edit - I just had something similar in my game, so I've diagnosed and fixed it. It may or may not be what you were observing however, so other examples are still welcome.

In my case a German trained dogs unit decided to attack my stack of Theseus (with a bunch of hero super-promotions) stacked with a great commander (+20% and some first strikes), across a river on a wooded hill! It turns out that the reason it did this was to do with the way the tinting is applied to the AI's rose-tinted spectacles! All AIs have a personality value that causes them to think odds are a bit different to what they really are (to make some AIs behave more aggressively than others, and provide some gameplay variance). The issue was that this value was being applied as a straight addative amount to the calculated odds, so for this AI, he would always think he had at least 5% chances of winning in ANY fight. Since trained dogs beating Theseus + his great commander 1 time in 20 is a fantastic expected gain, the AI really likes this attack! Basically this causes the AI to love attacks by weak units against REALLY strong ones. I have changed it to make the AI's personality addition act as a proportion of the calculated odds rather than just adding to them (I also doubled the size of compensate in reasonable cases). So suppose the real odds are 1% - before the AI would add 5% and conclude it had a 6% chance, and attack or not appropriately on the basis of that. Now it will add 10% (the doubling to compensatwe I mentioned) of the actual odds - so final result is 1% + 0.1% = 1.1%. That's enough to make it think twice ;)
 
  1. Newly built cities can concentrate on economic buildings, and request defense units from already-established cities

Shouldn't newly built cities focus on hammer and/or food so they can grow big enough and produce other buildings faster? If they focus on gold buildings then they will be stuck small and take a long time to produce them. The key to getting new cities up and running is to get them growing and filled with lots of hammer producing buildings.

On a side note sending Merchants and Caravans to new cities can help them build the buildings they need to grow and produce hammers.
 
Shouldn't newly built cities focus on hammer and/or food so they can grow big enough and produce other buildings faster? If they focus on gold buildings then they will be stuck small and take a long time to produce them. The key to getting new cities up and running is to get them growing and filled with lots of hammer producing buildings.

On a side note sending Merchants and Caravans to new cities can help them build the buildings they need to grow and produce hammers.

Those are economic buildings, at least in the sense I intended. I meant that as 'not military' mostly.
 
Economic buildings include hammer producing buildings. It's the whole economy build that matters for new cities, not just gold.

Cheers
 
On a side note sending Merchants and Caravans to new cities can help them build the buildings they need to grow and produce hammers.

Does the Ai even do that? Whenever I spot a Caravan build by the AI it is going to a neighbour to do a trade mission for gold. On the other hand I might just miss the other ones:D
 
Does the Ai even do that? Whenever I spot a Caravan build by the AI it is going to a neighbour to do a trade mission for gold. On the other hand I might just miss the other ones:D

No it doesn't yet, but this new system I'm planning will easily allow new cities to request caravans or story tellers (or wonder-building cities to do likewise at probably a higher priority)
 
On a side note sending Merchants and Caravans to new cities can help them build the buildings they need to grow and produce hammers.

Does the Ai even do that? Whenever I spot a Caravan build by the AI it is going to a neighbour to do a trade mission for gold. On the other hand I might just miss the other ones:D

No it doesn't yet, but this new system I'm planning will easily allow new cities to request caravans or story tellers (or wonder-building cities to do likewise at probably a higher priority)

Afforess said he had done this for both hammer and food caravans, the later were not implemented due to my slackness. They are on my list for C2C. It maybe that he only did it for human automation not for AI. He did not get to the entertainment line.

On a side note - getting ready to build a new city is a real "production" since I send out a slew of units with the settler including defense units, story tellers, caravans, missionaries and animals, just to get the city up and running. Which is one reason that I feel that new cities should have some tech based buildings when they are settled not just defaulted by the the colonist/pioneer or by expensive free buildings which ruin the economy of the city eg free libraries.
 
Your side note is a good example of why I've asked in the Discussion thread if the Sci buildings (eg Libraries) could have their "cost" reduced by 25%. Were cost ~ beaker not as it is now where cost > beaker. I would really like it to be 1 gold cost gives 2+ beakers. Not like it is now where in most cases 1 gold cost gives .75 beaker.

So changing Anarchy to only affect Civics not city production would be a hard thing to do?

JosEPh
 
not sure if its just GEM map but im past monarchy again with 10+ cities and most of the AI are still on 1 city (immortal) they are clearly ******** cos I even gifted them a bunch of research, went in and manually gifted them all 2 free settlers but they just sent them back to there city and continued to play like chieftain nubs - building research on 1 city.

Also after I restarded this time I spent ages moving all the civs around to make sure they had lots of space. Like i deleted 3 from europe and 3 from middle east, put one in new zealand, one in malasia, another in south africa and another in south america, but it still didn't help :nuke:
 
not sure if its just GEM map but im past monarchy again with 10+ cities and most of the AI are still on 1 city (immortal) they are clearly ******** cos I even gifted them a bunch of research, went in and manually gifted them all 2 free settlers but they just sent them back to there city and continued to play like chieftain nubs - building research on 1 city.

Also after I restarded this time I spent ages moving all the civs around to make sure they had lots of space. Like i deleted 3 from europe and 3 from middle east, put one in new zealand, one in malasia, another in south africa and another in south america, but it still didn't help :nuke:


If it's like you said you should step up a level and let AI start with 2 cities on deity. Conquer one city and you are even. Don't be afraid of deity start, it doesn't bite.
 
I think he's saying that the problem is the AI not expanding and thus the game being too easy. I've noticed this in my game as well. Surely even on immortal the AI should prioritize growth. Right now it seems to make some choices which are, frankly, odd.
 
I think he's saying that the problem is the AI not expanding and thus the game being too easy. I've noticed this in my game as well. Surely even on immortal the AI should prioritize growth. Right now it seems to make some choices which are, frankly, odd.

I agree, an as soon as someone posts an illustrative save I'll find out why. I typically have 4 or 5 problems posted every day to look at, as well as havign my own projects to try to fit in, so I'm afraid I'm not goign to start taking the overhead of producing game states to illustrate problems people are reporting as well, when clearly they already have them in order to be reporting it...
 
Your side note is a good example of why I've asked in the Discussion thread if the Sci buildings (eg Libraries) could have their "cost" reduced by 25%. Were cost ~ beaker not as it is now where cost > beaker. I would really like it to be 1 gold cost gives 2+ beakers. Not like it is now where in most cases 1 gold cost gives .75 beaker.

So changing Anarchy to only affect Civics not city production would be a hard thing to do?

JosEPh

Would be not trivial, but also fairly mechanical, so not so much hard as a bit tedious. However, I don't personally feel it's a good change, so I'd need a weight of consensus before I'd consider it.
 
I posted the suggestion in response to Snail and slower speed players gripes about the AI being in Anarchy too long, which in turn lends itself to the argument the AI changes Civics too much. I personally on Epic speed do not see either of these problems. I believe it to be a by product of the slower game speeds.

But I've always wondered why anarchy shuts everything down when it just doesn't make sense. I can understand it as a Game mechanic, sort of. But since I don't know the workings of that "mechanic" I feel it's just an arbitrary decision Firaxis made that when you/AI make a change to a different Civic or a Religion the Empire grinds to a halt. C2C has changed many other game mechanics so I suggested changing Anarchy to cope with the perceived problem.

JosEPh
 
Back
Top Bottom