AIs and the Art of War

Sounds like a bug to me - can you post me a save where this pattern happens please.

I think its everytime. I had several games now - no matter of an unit with 2 movement came in reach, the gatherer didn't react or if a 1 movement clubman stepped directly besides it, no response -- the gatherer looks as if it is in shock to see an enemy close and doesn't start to flee much like in a nightmare when you can't move seeing something bad coming closer ;-)

Edit - BTW - the naval fix is unlikely to make Japan/England on GEM much different. Independently of this the AI doesn't generally (currently) launch attacks to enemies across the sea if it is at war with someone on the same landmass. Given how big Eurasia is on GEM the chances of an AI not being at war with SOMEONE else on the same landmass is pretty small I suspect.

we have different sapawninfos for longitude/langtitude for GEM - could there also be an altered whatever.xml that I can use - or can you show me how the variables are changed? So if there is a rule set to "1" (active) can't it be set to "0" (inactive) in that special xml - allowing nations to start aiming at oversea civs even regardless of being at war with someone on same landmass? Btw. what if I have cities overseas and on same landmass (asia) as Japan? They would be at war with me and would they aim to invade my startinmg islands if those cities were poorly defended relative to the continental strongholds? Would a 3rd-landmass party (for example a developed American civ attempt to invade my island cities first before my eurasian cities?)


Btw. going to write something about the changed xml for GEM suggestion in the GEM thread, perhaps you could be so kind to comment it :)
 
Yes, they do but normal AI civs gatherers don't. Do you play with start as minors on, DH?
 
SO asked me to write a bit more about the naval bug fix that just went into the SVN.

Basically there was a bug in the code that looked for a landing spot for transports to unload their troops (for both attack and reinforcement purposes, which are treated separately). The result was it could never find one, so attack troops would go to cities and load into boats, but the boats would then sit there because they couldn't find anywhere to go.

Note that the land units loading into transports only occurs if those land units cannot find attacks to join by land (which is just standard BtS behaviour as far as I know). Also note that the code that looked for landing spots for settlers DID work, which is why you sometimes see the AI trying to colonize some peninsula your culture hasn't quite got to, but never saw it trying to invade anywhere your culture HAD got to (or trying to invade in force or without settlers)

Anyway, the fix enables the transports to find landing spots again, so should cause invasion behaviour somewhat like what used to happen before the bug got added a year or so ago.

I'll probably also spend some time improving the AI in this area now I've started, because there seem to be a lot of easily corrected flaws, such as:
  • The fairly hard-and-fast rule that it won't try a sea attack if there is a land attack available
  • It won't ever try to invade by landing in neutral territory - only in owned territory!
  • It won't try a sea route to the SAME landmass if ANY land route is available
 
SO asked me to write a bit more about the naval bug fix that just went into the SVN.

Basically there was a bug in the code that looked for a landing spot for transports to unload their troops (for both attack and reinforcement purposes, which are treated separately). The result was it could never find one, so attack troops would go to cities and load into boats, but the boats would then sit there because they couldn't find anywhere to go.

Note that the land units loading into transports only occurs if those land units cannot find attacks to join by land (which is just standard BtS behavior as far as I know). Also note that the code that looked for landing spots for settlers DID work, which is why you sometimes see the AI trying to colonize some peninsula your culture hasn't quite got to, but never saw it trying to invade anywhere your culture HAD got to (or trying to invade in force or without settlers)

Anyway, the fix enables the transports to find landing spots again, so should cause invasion behavior somewhat like what used to happen before the bug got added a year or so ago.

I'll probably also spend some time improving the AI in this area now I've started, because there seem to be a lot of easily corrected flaws, such as:
  • The fairly hard-and-fast rule that it won't try a sea attack if there is a land attack available
  • It won't ever try to invade by landing in neutral territory - only in owned territory!
  • It won't try a sea route to the SAME landmass if ANY land route is available

This is truly amazing, maybe now we can get back to the original BtS of fighting land and sea again :clap: So which python was messed up or was it several?? If you dont want to talk here, just PM me thx.
 
This is truly amazing, maybe now we can get back to the original BtS of fighting land and sea again :clap: So which python was messed up or was it several?? If you dont want to talk here, just PM me thx.

No Python - just DLL.
 
Back in Alpha Centauri Alien Crossfire, the AI would use transports just to drop off 2 rovers (like horseman) just to harrass behind enemy lines, destroy formers (workers), pillage etc. Also they would drop spies behind enemy lines too, since going overseas is often quicker than over ground and offers less chance to be uncovered. It would mean you had to be on your toes everywhere, i'm glad you fixed this koshling because at the moment you could honestly keep cities virtually undefended if they weren't along AI attack paths.
 
SO asked me to write a bit more about the naval bug fix that just went into the SVN.

Basically there was a bug in the code that looked for a landing spot for transports to unload their troops (for both attack and reinforcement purposes, which are treated separately). The result was it could never find one, so attack troops would go to cities and load into boats, but the boats would then sit there because they couldn't find anywhere to go.

Note that the land units loading into transports only occurs if those land units cannot find attacks to join by land (which is just standard BtS behaviour as far as I know).
Also note that the code that looked for landing spots for settlers DID work, which is why you sometimes see the AI trying to colonize some peninsula your culture hasn't quite got to, but never saw it trying to invade anywhere your culture HAD got to (or trying to invade in force or without settlers)
Could this bridgehead tactic be interacted with the invasion code like " if target outside of landmass is picked, then send settler if possible spot for city or workers for spot where a forttype improvement can be build that i"acts as city"?

This would lead to steady supplies for the invasion stacks flowing in over the bridgehead. The bridgehead(1) then could be the start point for secondary invasions (2) on targets on new landmass to threaten landings with pillaging purposes and blocking enemy supplies behind enemy lines. This can be especially effective if small, snaky landmasses like Japan would be blocked easily otherwise, being able to neglect defense of the other cities behind the chokepoints.

Or better: Ai just looks for weakest defended target and attacks (ignoring if there is a sea between if or nor. If it has prioritized the target it starts then the invasion routine plan. Maybe the bridgehead as well as the randomized picked by weakness AI plans could then be triggered seperately but interactingly, if executed at the same time.

Anyway, the fix enables the transports to find landing spots again, so should cause invasion behaviour somewhat like what used to happen before the bug got added a year or so ago.

I'll probably also spend some time improving the AI in this area now I've started, because there seem to be a lot of easily corrected flaws, such as:
  • The fairly hard-and-fast rule that it won't try a sea attack if there is a land attack available
  • It won't ever try to invade by landing in neutral territory - only in owned territory!
  • It won't try a sea route to the SAME landmass if ANY land route is available

Is there a way to just delete /// comment out these bits of code or set values from 1 (active) to (0) inactive or is the AI working a lot differently as xml files? :crazyeye:

I really want the nasty mongols to attempt to invade japan this time in GEM around ^^ Remind me to change the values for storms and improve their scripted frequency around tiles x89/y67 and the surrounding tiles in turns 5124 to 5258 of 14050 ;-)
 
Got small naval invasion too. It failed miserably, but it happend.
The fail was for two reasons:
a) The force was small, just 5 units. That would have been enough to beat the lonely Crossbowman defending that city on a remote island, but not the 3Swordsmen and one Pikeman on the other side of the island in a fortress ( plus 1 Crossbowman who remined there).
But I think the AI is not really to blame there. I assume it saw the poorly garrisoned city due to espionage or ship in range, but had no knowledge of the fort and its garrison.

b) The powerfull warlord of the stack and the horseman went animal hunting on the two unowned tiles of the island, spererately, leaving the siege ram and two other units to be slaughtered by my swordsmen while my pikes got rid of the horseman. Now the warlord is stuck there, because he is too strong to attack him, but not strong enough to attack well entrenched units in cities and forts by himself.
 
b) The powerfull warlord of the stack and the horseman went animal hunting on the two unowned tiles of the island, spererately, leaving the siege ram and two other units to be slaughtered by my swordsmen while my pikes got rid of the horseman. Now the warlord is stuck there, because he is too strong to attack him, but not strong enough to attack well entrenched units in cities and forts by himself.

Happen to have a save game from the turn the force landed (before it split up)?

Edit - ideally from when they are still on the transport. I have a theory about what might cause this, and the result would be that they never re-cohere into a single group after being unloaded, so each unit 'does its own thing'
 
Is there a way to just delete /// comment out these bits of code or set values from 1 (active) to (0) inactive or is the AI working a lot differently as xml files? :crazyeye:

I really want the nasty mongols to attempt to invade japan this time in GEM around ^^ Remind me to change the values for storms and improve their scripted frequency around tiles x89/y67 and the surrounding tiles in turns 5124 to 5258 of 14050 ;-)

Sorry, no - the AI is not controlled by any XML at all - it's all in the code.

It **is** a good idea to add scripted evens (to scenarios), and it would be great if those events could include 'AI hints' to suggest certain actions (like Mongols to invade Japan). It would have to be just a suggestion of course, because it would be silly for them to do so while under attack from the Cantonese or something.

However, doing that would be a sizable project in its own right, and would all be new DLL mechanisms, so someone new would have to turn up to do DLL modding if it's to happen any time soon.
 
Happen to have a save game from the turn the force landed (before it split up)?

Edit - ideally from when they are still on the transport. I have a theory about what might cause this, and the result would be that they never re-cohere into a single group after being unloaded, so each unit 'does its own thing'

Sorry :( Will look for it in the future. The closes savegame I would have is some 5 or 6 turns before it , when there wasn´t even a war yet, and the autosaves fro taht time are overwritten already.

I noticed something else with that warlord ( again no save :( ): He kept moving back and forth between two tiles. One of them next to my city.
So every other turn I bombarded him, till he was damaged enough to be killed by the swordsmen.
What I don´t get is why he didn´t stay on the far tile till healed. Both were jungle tiles, so same defense modifiers.
 
Sorry :( Will look for it in the future. The closes savegame I would have is some 5 or 6 turns before it , when there wasn´t even a war yet, and the autosaves fro taht time are overwritten already.

I noticed something else with that warlord ( again no save :( ): He kept moving back and forth between two tiles. One of them next to my city.
So every other turn I bombarded him, till he was damaged enough to be killed by the swordsmen.
What I don´t get is why he didn´t stay on the far tile till healed. Both were jungle tiles, so same defense modifiers.

I have some changes that would hopefully fix the initial problem (but no good test case to check it with).

On the oscillating warlord - I agree he should stay until healed so if you see ti again I need a save please...
 
Yeah you got a nice empire there! I've not reached the modern eras yet but I really want to. Btw is that a 615 turns golden age?

ahaha yes, but look at the money also ahah :lol:
 
@SO
This is standard or GEM map?
 
ahaha yes, but look at the money also ahah :lol:

I'm genuinely glad you're "having fun", but please tell me that you're aware that both of those (runaway money and GA length) are serious bugs... Is anything being done about them?
 
Top Bottom