Page 4 of 5 FirstFirst 12345 LastLast
Results 91 to 120 of 121

Thread: Game AI stuff (1.5)

  1. #91

    Default Re: Game AI stuff (1.5)

    would some judicious re-routing of roads help?
    yes. when the game creates roads it picks the fastest path to the adjacent region's settlement which *should* reinforce convexity except that when there are two roads close together the game will often merge the two roads along part of their route which can then distort the fastest path.

    have you looked at the naval aspect of path-finding?
    not yet this time around but IIRC from the previous occasions the biggest problem with the AI's attempts at naval landings was retreat causing attacks by enemy fleets on AI fleets waiting to pick up an army which seemed to glitch the AI. Weakening the pirate ships helped.

    As the land-based path finding improves you see a lot more naval landings.

    Carthage, in particular, suffers horribly
    yes, Carthage being such a pushover was one of my original motivations to look at the path finding.
    Last edited by nikolai1962; 12-26-2017 at 15:04.
    It's not a map.

  2. #92

    Default Re: Game AI stuff (1.5)

    Case Study 01

    One of the useful toggle_terrain console commands is "toggle_terrain region" which puts a region overlay on the map which looks like this:

    Click image for larger version. 

Name:	case_study01.jpg 
Views:	167 
Size:	325.5 KB 
ID:	20379

    As the main (or at least the main consistently fixable) cause of AI path finding glitches are cases where an AI army is ordered to attack a settlement which it believes is either in the same or an adjacent region but the fastest path to the target is through another region this can be used as a relatively quick way of finding some of the biggest issues.

    With toggle_terrain region on, start each faction in turn, then select a unit in each of their starting settlements and then hold the right mouse button to show their fastest movement path to each *adjacent* region's settlement to check if the fastest path clips into a third region. This won't show every possible glitched path in the game as an AI army might get assigned to attack a settlement from any tile (plus not all regions are owned by a faction) but it's a good start and can pick up a lot of major issues.

    As you can see in the image above the fastest path from Asturica to Scallabis is fine, completely contained within the start and target regions.

    (nb good paths like this can still sometimes glitch during the game if the path is blocked by something and there's an alternative path that does clip into a third region but these are temporary.)

    The path from Asturica to Numantia is almost okay - the tile just to the north of Numantia is fine - the fastest path is completely within the start and target regions

    Click image for larger version. 

Name:	case_study02.jpg 
Views:	137 
Size:	308.3 KB 
ID:	20380

    but the fastest path to Numantia itself clips through the Scallabis region (which would make an AI army glitch).

    Click image for larger version. 

Name:	case_study03.jpg 
Views:	166 
Size:	309.9 KB 
ID:	20381

    In a lot of cases the only way to make the fastest path work is to greatly re-arrange the region borders but since the fastest path is nearly okay in this case we might only need to make a slight edit to make it work. We can see the ford between Asturica and Scallabis can be pushed left a little which makes the path below the river a little longer but that was not quite enough.

    Another useful toggle_terrain command for situations like this is "toggle_terrain tiletype" which shows the tiletype and looking at this

    Click image for larger version. 

Name:	case_study04.jpg 
Views:	157 
Size:	297.1 KB 
ID:	20382

    we can see the path from Asturica to Numantia north of the river - the one we want the AI to take - has to cross a ford by going up to a hill tile (near mouse cursor) while the path below the river - the one that clips - is longer but has open tiles all the way. So if we move the ford down one into the open terrain the total movement cost should decrease a little, maybe just enough.

    Which it was.

    Click image for larger version. 

Name:	case_study05.jpg 
Views:	135 
Size:	318.0 KB 
ID:	20383
    Last edited by nikolai1962; 01-01-2018 at 23:25.
    It's not a map.

    Member thankful for this post:



  3. #93

    Default Re: Game AI stuff (1.5)

    Case Study 02

    Using "toggle_terrain region" the Cappadocia region is adjacent to the Antioch region but the fastest path goes through Tarsus.

    Click image for larger version. 

Name:	cs03a.jpg 
Views:	151 
Size:	354.3 KB 
ID:	20384

    However "toggle_terrain choke" shows all the adjacent tiles are impassable

    Click image for larger version. 

Name:	cs03b.jpg 
Views:	150 
Size:	387.4 KB 
ID:	20385

    so the regions should be marked as non adjacent and the path via Tarsus shouldn't be a problem (and doesn't appear to be in game) and this is *generally* true in situations where all the adjacent tiles are impassable however from my observation it doesn't seem to be true in 100% of cases for some reason.

    On my edited map the Carthage region is blocked from the Gaetulia region by impassable terrain

    Click image for larger version. 

Name:	cs03c.jpg 
Views:	136 
Size:	264.3 KB 
ID:	20386

    and in this case I have noticed the occasional odd glitch which might be related to this (i.e. where Carthage should have been attacking Gaetulia but wasn't and all its units were messed up and milling about aimlessly). It might have been a naval landing gone wrong but another possibility I recently came up with is maybe it's the distance between settlements? A CA dude mentioned at one point that the path finding may glitch if settlements are too far apart and you can see here how the path finding arrow only goes a certain distance before it stops.

    Click image for larger version. 

Name:	cs03d.jpg 
Views:	145 
Size:	251.6 KB 
ID:	20387

    So maybe if settlements are too far apart the game glitches on impassable borders?

    Dunno - the Carthage thing is too random a glitch to test for specifically but as a general rule it may be worth checking settlements are all within the path finding arrow distance from each other. The AI generally manages with settlements that are far apart but regions like that are often deserts or steppe without a lot of impassable obstacles so the path finding glitching on impassable borders only when the settlements are too far apart is a possibility worth considering imo.

    #

    If true then it's easily fixed with new regions but apart from region borders, ford placement etc I currently want the edited map to still be as vanilla as possible so I'm avoiding adding new regions for now.
    Last edited by nikolai1962; 01-02-2018 at 00:40.
    It's not a map.

    Member thankful for this post:



  4. #94
    Arrogant Ashigaru Moderator Ludens's Avatar
    Join Date
    Nov 2003
    Posts
    9,058
    Blog Entries
    1

    Arrow Re: Game AI stuff (1.5)

    Thanks for these experiments, nikolai1962!

    I've linked to them in the Game Mechanics forum, to make them easier to find.
    Looking for a good read? Visit the Library!

    Member thankful for this post:



  5. #95
    Senior Member Senior Member ReluctantSamurai's Avatar
    Join Date
    Feb 2008
    Location
    USA
    Posts
    2,483

    Default Re: Game AI stuff (1.5)

    I'm gradually getting psyched up to delve into RTW map-making/editing My work load is going to get significantly lighter in the near future, so I will have some free time. I'll have to get familiar with all the editing tools and how to manipulate them before then....so

    ...are all map editing commands done through the console, or are there third party tools to use?
    High Plains Drifter

  6. #96

    Default Re: Game AI stuff (1.5)

    I'm gradually getting psyched up to delve into RTW map-making/editing
    It's actually semi-fun now I've figured it out better. Originally I didn't know about toggle_terrain or the convexity issue so i did it all by trial and error and even a small map was a total nightmare but now it's not so bad.

    I'm a short way away from finishing up on the vanilla map (as much as i can without adding extra regions) and after I've stashed that version somewhere safe so i never have to do this again I want to try a few separate experiments on a copy to see how best to deal with very mountainous regions and then after that look at the BI and MTW2 maps to see if they are equally quick (at least relative to last time).

    ...are all map editing commands done through the console, or are there third party tools to use?
    the commands which show different map overlays (toggle_terrain region/tiletype/choke etc) are all console commands.

    map editing itself is done by editing the map files: map_features.tga, map_regions.tga and map_groundtypes.tga. I use gimp for this. There may be other useful tools but if there are I should probably know but don't :)
    It's not a map.

  7. #97

    Default Re: Game AI stuff (1.5)

    this will be the new "update" post as i think i've found the fastest way to fix AI path finding with the least effort

    so ignore all the stuff i said previously, instead...

    New Sequence

    1. start up the game/mod you want to map-check with each faction in turn

    2. bring up the regions overlay with the "toggle_terrain region" console command

    3. for each settlement select a unit in the settlement and use the right mouse click to show the fastest path to the settlement in each *adjacent* region

    Click image for larger version. 

Name:	sardgal01.jpg 
Views:	188 
Size:	288.6 KB 
ID:	20388

    nb "adjacent" is defined as two regions having adjacent *passable* terrain. if *all* the adjacent tiles between two regions are impassable then the game *generally* seems to mark the regions as non-adjacent. there may be occasional exceptions to this where something has gone wrong but it is generally true.
    4. note the cases where the fastest path between the settlements of two adjacent regions clips a third region (as it does it the above case of Sardis-Galatia) - these all need to be fixed as these are the primary cause of the AI path finding going wrong

    5. also note the cases where the path finding arrow runs out before it reaches the target settlement - I think this can cause problems *sometimes* for an as-yet unfigured out reason and it's worth considering trying to fix them but not as a priority

    Click image for larger version. 

Name:	toofar.jpg 
Views:	162 
Size:	356.4 KB 
ID:	20389

    6. I said previously to fix unreachable tiles as a first step but as you sometimes change what tiles are unreachable when you change region borders this step can be left to the end.

    7. only *after* fixing all of the issues found in step (4) and step (6) start the game up as a remote faction and turtle (or use the -ai command) and watch the AI move looking for additional glitches

    (or don't, just assume this process fixed the majority of cases and play short campaigns with each faction for fun and see if you notice any additional AI glitches while you're playing)

    This sequence is dramatically faster than my previous attempts.

    nb I'm not saying the game does path find like this (fastest path from settlement to settlement). I'm saying this process will highlight places in the game where the AI will often get stuck.
    #

    Reasoning

    the underlying principle behind this sequence is the same; it's simply much more efficient

    1) the path finding works (as shown by the player's path finding arrow)

    2) path finding has a computational load

    3) the game reduces the load by
    a) limiting the number of path finding iterations allowed (as shown by the path finding arrow stopping after a certain distance)
    b) using region to region pathing first and then unit to target pathing when close enough

    4) path finding glitches occur when:
    a) a unit in region A tries to path to a target in region A but the fastest path clips a different region
    b) a unit in region A tries to path to a target in an adjacent region B but the fastest path clips through a third region C
    c) *maybe* when the game's region adjacency database gets messed up somehow
    d) temporary e.g. enemy unit blocks a valid path and the alternative path glitches

    5) the perfect solution is making the map 100% "convex" which in this context means

    the fastest path from any passable tile in a region to any other passable tile in the region is completely contained within that region
    however this is very difficult and time consuming and what this new sequence does is recognize the AI uses some paths e.g. the ones between settlements, an order of magnitude more often than others and so glitches there are much more critical - so doing it this way round means you can fix 80% of the problems with maybe 20% or less of total necessary effort and far less time.

    #

    As I'm trying to find the fastest way to do this I moth balled the vanilla map editing i've been working on and started again from scratch on the vanilla map to compare speeds and this method is dramatically better.

    On the vanilla map i found 26 region-pairs where the pathing broke the rule (i may have missed some).

    (I knew almost all of them anyway from watching the AI get stuck but this method is much faster.)

    There's also at least a dozen cases of the settlements being too far apart for the path finding arrow which may or may not be important and i'll worry about later. (I think it's worth having the list so if you notice something odd happening that has no region-clipping explanation then maybe it's connected to this.)

    I'll be posting up how i fixed some of the 26 region-clipping cases from the vanilla map (although i've mentioned some of them before on this and other threads).
    Last edited by nikolai1962; 01-04-2018 at 22:09.
    It's not a map.

    Member thankful for this post:



  8. #98

    Default Re: Game AI stuff (1.5)

    Case Study 22, Sardis-Galatia

    with the region overlay on you can see the settlement to settlement path clips the Pergamon region

    Click image for larger version. 

Name:	sardgal01.jpg 
Views:	239 
Size:	288.6 KB 
ID:	20390

    switch to the "toggle_terrain choke" overlay to see if there is an easy fix moving region borders or rivers/fords

    Click image for larger version. 

Name:	sardgal02.jpg 
Views:	200 
Size:	308.1 KB 
ID:	20391

    and if not try "toggle_terrain tiletype" to see if there is an easy fix through editing terrain type.

    Click image for larger version. 

Name:	sardgal03.jpg 
Views:	165 
Size:	295.0 KB 
ID:	20394

    In this case the easiest solution is moving the Pergamon border back a couple of rows.

    Click image for larger version. 

Name:	sardgal04.jpg 
Views:	148 
Size:	293.6 KB 
ID:	20392

    nb when you change anything you need to check it hasn't caused new problems among the regions adjacent to the one you edited.

    #

    For a long time I thought diagonals were a problem for the game's path finding and spent hours making all the paths orthogonal but that was wrong - the problem is diagonals near region borders are often the place where this region clipping problem occurs. Anywhere on the map where 3 or 4 regions join at a single point (as in this case) are prime candidates for this path finding bug.

    This type of glitch can be 100% prevented by placing an impassable tile in the right spot at the junction of 3+ regions however I'd advise you do it at the end as there's a lot of places like this and the right spot depends on where the region borders are and you'll likely be changing region borders a lot.

    I did it for this case as an example (if you can see the dense forest tile).

    Click image for larger version. 

Name:	sardgal05.jpg 
Views:	165 
Size:	267.7 KB 
ID:	20393

    A lot of the 26 cases I've spotted from the vanilla map are a simple as this to fix (although not all).
    Last edited by nikolai1962; 01-03-2018 at 21:01.
    It's not a map.

    Member thankful for this post:



  9. #99

    Default Re: Game AI stuff (1.5)

    Case Study 23, Cappadocia-Galatia

    fastest path clips into the Cilicia region

    Click image for larger version. 

Name:	cappagal01.jpg 
Views:	161 
Size:	326.6 KB 
ID:	20395

    same thing looking at in with the choke overlay

    Click image for larger version. 

Name:	cappagal02.jpg 
Views:	148 
Size:	348.1 KB 
ID:	20396

    bunch of ways to fix it but the simplest was nudging the upper ford down a few tiles

    Click image for larger version. 

Name:	cappagal03.jpg 
Views:	153 
Size:	304.0 KB 
ID:	20397
    It's not a map.

    Member thankful for this post:



  10. #100
    Senior Member Senior Member ReluctantSamurai's Avatar
    Join Date
    Feb 2008
    Location
    USA
    Posts
    2,483

    Default Re: Game AI stuff (1.5)

    so ignore all the stuff i said previously




    The design team must have REALLY been pressed for time to have missed such simple fixes as these
    High Plains Drifter

  11. #101

    Default Re: Game AI stuff (1.5)

    @ReluctantSamurai

    Yeah, I guess the people doing it were like me and either didn't know or didn't fully understand how the pathing worked so were operating on guesswork and trial and error.

    #

    Case Study 19, Alexandria-Petra

    fastest path clips into Judea

    Click image for larger version. 

Name:	alexpetra01.jpg 
Views:	157 
Size:	322.8 KB 
ID:	20398

    with choke you can see an impassable tile - maybe an attempt to fix a problem?

    Click image for larger version. 

Name:	alexpetra02.jpg 
Views:	134 
Size:	317.0 KB 
ID:	20399

    the AI doesn't always get stuck here, it depends on which army gets assigned to attack Petra and where it starts from but when they do the army is generally just before the diagonal clipping move

    Click image for larger version. 

Name:	alexpetra04.jpg 
Views:	143 
Size:	298.8 KB 
ID:	20401

    moving the impassable tile down one row forces the roads to Judea and Petra to split sooner and prevents that move

    Click image for larger version. 

Name:	alexpetra03.jpg 
Views:	145 
Size:	313.8 KB 
ID:	20400
    Last edited by nikolai1962; 01-04-2018 at 22:26.
    It's not a map.

    Member thankful for this post:



  12. #102

    Default Re: Game AI stuff (1.5)

    total number of region pairs i've found with clipping is now 30, done most of the simple ones, leaving the harder ones to last

    Case Study 29, Salona-Patavium

    slight clipping

    Click image for larger version. 

Name:	salpata01.jpg 
Views:	140 
Size:	379.9 KB 
ID:	20402

    easily fixed by changing ownership of a couple of tiles from Illyria to Salmatia

    Click image for larger version. 

Name:	salpata02.jpg 
Views:	145 
Size:	351.8 KB 
ID:	20403

    not a big deal but it makes the silver look like it's in Dalmatia so nudge that up one tile in descr_strat (moving resources in descr_strat when you change region borders is one of the few non-map file changes needed).

    #

    Case Study 30, Epirus-Illyria

    Epirus is adjacent to Illyria (the mouse cursor is over the mountain pass that makes them adjacent) but the fastest path is through Dalmatia.

    Click image for larger version. 

Name:	epill01.jpg 
Views:	142 
Size:	355.0 KB 
ID:	20404

    looking at the map in choke view there's no obvious way to change the path so need to change the region borders instead

    Click image for larger version. 

Name:	epill02.jpg 
Views:	151 
Size:	396.4 KB 
ID:	20405

    I could block that pass (thus making Epirus-Illyria non-adjacent) by moving the Macedonia border to the left or Dalmatia to the right or I could move Illyria down or Epirus up so all the tiles along the fastest path are contained within Epirus-Illyria (so no region clipping) however wherever possible I like to make the region shape historical so in this case after looking at a few old maps I moved the Epirus border up so the fastest path is contained within Epirus.

    Click image for larger version. 

Name:	epill03.jpg 
Views:	201 
Size:	376.8 KB 
ID:	20406

    (Illyria lost an olive oil resource so i should move that)
    Last edited by nikolai1962; 01-05-2018 at 18:25.
    It's not a map.

    Member thankful for this post:



  13. #103

    Default Re: Game AI stuff (1.5)

    still putting off doing the bigger changes in case it messes everything up so thought i'd look at one of the cases where settlements are too far apart for the right-click path finding (which may not be important but... maybe it is)

    anyway Tingi->Cirta is fine

    Click image for larger version. 

Name:	tingi-cirta01.jpg 
Views:	148 
Size:	304.7 KB 
ID:	20407

    but oddly enough Cirta-Tingi is one tile short

    Click image for larger version. 

Name:	tingi-cirta02.jpg 
Views:	140 
Size:	326.9 KB 
ID:	20408

    if you build roads just in the Tingi region then path finding from Cirta-Tingi can reach substantially past Tingi

    Click image for larger version. 

Name:	tingi-cirta03.jpg 
Views:	147 
Size:	321.6 KB 
ID:	20409

    but if you build roads only in Cirta region the maximum path finding range is now actually a tile shorter

    Click image for larger version. 

Name:	tingi-cirta04.jpg 
Views:	128 
Size:	347.7 KB 
ID:	20410

    the fastest path goes around the nearby river

    Click image for larger version. 

Name:	tingi-cirta05.jpg 
Views:	128 
Size:	343.9 KB 
ID:	20411

    which if you look at it in choke view is a diagonal

    Click image for larger version. 

Name:	tingi-cirta06.jpg 
Views:	129 
Size:	290.7 KB 
ID:	20412

    and roads won't form if there's a diagonal, only orthogonally, which forces the road to Tingi to detour around to the ford.

    Adding a ford closer to the direct path brings the Cirta-Tingi path within path finding range

    Click image for larger version. 

Name:	tingi-cirta07.jpg 
Views:	120 
Size:	290.5 KB 
ID:	20413

    alternatively, extending the Cirta region to the left brings the Cirta-Tingi path within range of the right-click pathing arrow if Cirta builds roads (as in this case more of the fastest path is along roads within Cirta region).

    Click image for larger version. 

Name:	tingi-cirta08.jpg 
Views:	148 
Size:	308.1 KB 
ID:	20414

    As the game often seems to add the "wild animal" trade resource in threes and the new region border at the river is the historical border between Mauretania-Tingitana and Mauretania-Caesariensis my guess is this is how the region was originally and it was changed to try and fix something (as when you're map editing by guesswork it's very easy to fix one problem and create a new one at the same time). So in this case I'll leave the wild animals resources in the Cirta region.

    #

    So what does all this suggest?

    1) the CA dude way back when said the path finding could sometimes go wrong if settlements were more than around 50 tiles apart. I think this shows it's not 50 tiles but some amount of path finding iterations that on average comes to around 50 tiles. In some cases it might be less.

    2) movement costs may matter indirectly as finding the fastest path through difficult but not impassable terrain is an obstacle also, just not as much of one as impassable terrain - so roads and difficult terrain may have an effect there

    3) also when roads form along the fastest path between two regions they reinforce convexity but when they don't, they weaken it (which happens a lot as the game likes to average out multiple roads). This may not matter in most cases but it might occasionally thus forcing roads to follow the fastest path probably helps sometimes (but maybe only occasionally).

    4) From observing I used to think the path finding had a problem with diagonals generally but that's not the case. Diagonals near region borders can create paths which lead to region-clipping and diagonals elsewhere can block optimal road formation (which can occasionally lead to region clipping) but otherwise the path finding handles diagonals fine. As diagonals can prevent roads forming this means deliberately adding diagonals to force roads to go where you want might actually be a useful tool.

    5) *if* settlements being too far apart can cause glitches in the formation of the map.rwn file then roads bringing settlements within range during the game won't help but if it only causes glitches during the game then settlements being close enough after roads are built may be good enough.

    (I won't do it on the base version of the map as I want it to be as vanilla as possible but in the future I think i will eventually add regions where they bring settlements within range of each adjacent region, just in case it helps.)

    6) a lot of modders deliberately made some settlements very far apart in the hope it would stop the AI expanding in a direction they didn't want but in my experience it mostly doesn't work and often it just makes the AI waste even more resources sending multiple armies crawling slowly over 100 tiles of desert. In cases where you don't want to use impassable terrain to block this I'm thinking a better solution may be the exact opposite and give the unwanted direction a close by region with very high unrest instead. So instead of a dozen armies crawling over the desert towards a very distant settlement the AI just has one army constantly retaking the same close by settlement.

    Just a thought.
    Last edited by nikolai1962; 01-05-2018 at 18:35.
    It's not a map.

    Member thankful for this post:



  14. #104

    Default Re: Game AI stuff (1.5)

    Case Study 24, 25, 26, Armenia->Pontus, Armenia->Cappadocia, Armenia-Media

    24: Armenia-Pontus are adjacent by one route but the fastest path clips the Colchis region

    Click image for larger version. 

Name:	armenia-pontus01.jpg 
Views:	129 
Size:	351.7 KB 
ID:	20415

    25: Armenia-Cappadocia is too far to be sure what the fastest path is - it might be like this which would be okay

    Click image for larger version. 

Name:	armenia-cappadocia01.jpg 
Views:	134 
Size:	367.0 KB 
ID:	20416

    or it might be like this which would clip Pontus

    Click image for larger version. 

Name:	armenia-cappadocia02.jpg 
Views:	133 
Size:	359.5 KB 
ID:	20417

    if we look at the pathing arrow from Armenia to the ford

    Click image for larger version. 

Name:	armenia-pontus02.jpg 
Views:	123 
Size:	355.9 KB 
ID:	20428

    and to an adjacent tile on the other route

    Click image for larger version. 

Name:	armenia-pontus03.jpg 
Views:	130 
Size:	348.0 KB 
ID:	20429

    we can see both routes have very similar costs in pathing terms with the coastal route just pipping it.

    looking at the tiletype overlay we can see why - the coastal route is longer but has mostly open tiles while the inland route is shorter but mostly hills.

    Click image for larger version. 

Name:	armenia-pontus04.jpg 
Views:	115 
Size:	341.5 KB 
ID:	20430

    so we could change a few tiles along the inland route from hills to fertile tiles to make that route the fastest but there might be another way which could fix both armenia-pontus and armenia-cappadocia at the same time.

    if we look at the current Armenia-Cappadocia path we can see it goes a long way round

    Click image for larger version. 

Name:	armenia-pontus05.jpg 
Views:	137 
Size:	353.2 KB 
ID:	20431

    whereas the route near Pontus looks a lot shorter

    Click image for larger version. 

Name:	armenia-pontus06.jpg 
Views:	125 
Size:	352.5 KB 
ID:	20432

    however that route is currently blocked by the river and also, as Armenia is already adjacent to Cappadocia by another route, then if the fastest Armenia->Cappadocia path clipped through Pontus that would glitch the pathing.

    if i push the cappadocia region up a little so armenia is no longer adjacent to pontus (except via impassable mountain tiles) then the game won't mind pathing to pontus via cappadocia and at the same time pushing the river near pontus up a tile creates a more direct armenia-cappadocia path which looks like it might be the fastest.

    which seems to work (the distance is still too far for the pathing arrow to get the whole path but when cappadocia builds roads it's long enough for the cappadocia-armenia pathing)

    Click image for larger version. 

Name:	armenia-pontus07.jpg 
Views:	111 
Size:	380.9 KB 
ID:	20433

    and the Pontus->Armenia pathing arrow is also within range

    Click image for larger version. 

Name:	armenia-pontus08.jpg 
Views:	120 
Size:	366.4 KB 
ID:	20434

    but not Armenia->Cappadocia when only Armenia has roads

    Click image for larger version. 

Name:	armenia-pontus09.jpg 
Views:	185 
Size:	368.2 KB 
ID:	20435

    however Armenia->Cappadocia does come within range when both regions have roads thus confirming it's both the fastest path and that the game knows it

    Click image for larger version. 

Name:	armenia-pontus10.jpg 
Views:	118 
Size:	393.6 KB 
ID:	20436

    #

    26: Armenia-Media

    Armenia is adjacent to Media by this route

    Click image for larger version. 

Name:	armenia-media01.jpg 
Views:	198 
Size:	330.8 KB 
ID:	20418

    but the fastest path is much more direct and clips through Atropatene

    Click image for larger version. 

Name:	armenia-media01b.jpg 
Views:	119 
Size:	286.5 KB 
ID:	20426

    one way to fix this might be to give the chunk of Media between the two rivers to Atropaten (light blue) so armenia-media are no longer adjacent.

    this would make hatra-atropatene regions adjacent and the path between those seems okay if Armenia loses a tile or two.

    Click image for larger version. 

Name:	armenia-media02.jpg 
Views:	129 
Size:	331.8 KB 
ID:	20419

    it would also make atropatene-babylon adjacent but as it's too far for the pathing arrow it's hard to say if the fastest path would be this

    Click image for larger version. 

Name:	armenia-media03.jpg 
Views:	124 
Size:	317.6 KB 
ID:	20420

    which would be okay, or this

    Click image for larger version. 

Name:	armenia-media04.jpg 
Views:	129 
Size:	312.3 KB 
ID:	20421

    which would cross through media and break the region clipping rule.

    After editing the region it seems that without roads the babylon-atropatene path would cross media (possibly causing the AI to glitch)

    Click image for larger version. 

Name:	armenia-media05.jpg 
Views:	133 
Size:	282.8 KB 
ID:	20422

    with roads in Media this path is reinforced (and as roads have increased the range of the pathing arrow so it now reaches all the way to Phraaspa we can be sure it's the actual fastest path)

    Click image for larger version. 

Name:	armenia-media06.jpg 
Views:	117 
Size:	295.6 KB 
ID:	20423

    however with roads in Atropatene it seems the fastest path switches to go through Atropatene which should be fine

    Click image for larger version. 

Name:	armenia-media07.jpg 
Views:	115 
Size:	337.2 KB 
ID:	20424

    so the Babylon-Phraaspa pathing might not cause a problem or if it does it might fix itself when Phraaspa builds roads but if it does turn out to cause a problem i can just remove the bridge between Atropatene and Babylon so the regions no longer count as adjacent.

    I wouldn't usually like to remove a path between regions to fix a problem but I don't mind in this case as the Persian Royal Road (in terms of RTW regions) went Babylon-Hatra-Cappadocia so Hatra as a crossroads region seems appropriate.

    #

    After some testing this seems to work well. Generally changing a bunch of regions at once leads to new glitches somewhere but if so I haven't spotted them yet.

    #

    Anyway hopefully these case studies will prove useful to someone. I won't go through all the 30 or so i noticed on the vanilla map as it'll mostly be repeating myself.

    The general pattern is the changes needed are either a) small edits involving: fords, river placement, a few region ownership tiles or placing an impassable tile or two or b) a rubik's cube type deal where you have to juggle a bunch of regions at once to ensure only the ones with valid fastest paths are adjacent in game terms (i.e. having a shared border with passable terrain).
    Last edited by nikolai1962; 01-07-2018 at 05:30.
    It's not a map.

    Member thankful for this post:



  15. #105
    Senior Member Senior Member ReluctantSamurai's Avatar
    Join Date
    Feb 2008
    Location
    USA
    Posts
    2,483

    Default Re: Game AI stuff (1.5)

    From what I've observed, the Middle East appears to have more than it's share of path-finding problems. In looking at the RTW map in it's entirety, perhaps it's just my imagination, but there seems to be a lot more twisting and winding of roads through mountains and rough terrain than anywhere else I've never cataloged it, but just like Carthage seems to get buried under a slew of path-finding problems in the Western Med, Seleucia mirrors that problem in the Eastern Med. They rarely ever target the nearest rebel town of Palmyra (in the east), or Halicarnassus (in the west). Getting into the Lycia province is the most puzzling, as it's just a stone's throw across the river

    movement costs may matter indirectly as finding the fastest path through difficult but not impassable terrain is an obstacle also, just not as much of one as impassable terrain - so roads and difficult terrain may have an effect there
    Although it involves considerably more tinkering, increasing movement rates might be a good follow-up to map alterations in aiding path-finding problems...

    I'm thinking a better solution may be the exact opposite and give the unwanted direction a close by region with very high unrest instead. So instead of a dozen armies crawling over the desert towards a very distant settlement the AI just has one army constantly retaking the same close by settlement.
    That's just evil

    as the Persian Royal Road (in terms of RTW regions) went Babylon-Hatra-Cappadocia so Hatra as a crossroads region seems appropriate.
    Although it's a topic for a different thread, the Persian Royal Road was as advanced as anything the Romans built. I had some links somewhere covering the topic, and it makes for some fascinating reading (and caused me to give the Parthians the "Paved Road-building" capability).

    In any case, fabulous work
    High Plains Drifter

  16. #106

    Default Re: Game AI stuff (1.5)

    From what I've observed, the Middle East appears to have more than it's share of path-finding problems.
    agree - that whole quarter of the map and the bit around massilia/lugdunensis are the two worst imo

    They rarely ever target the nearest rebel town of Palmyra (in the east), or Halicarnassus (in the west). Getting into the Lycia province is the most puzzling, as it's just a stone's throw across the river
    yes, it's the strangest thing as when pontus takes sardis they usually go on to take halicarnussus with no problem so it's not a persistent clipping type problem, it's something else. there's a few places like that which i've never managed to figure out but i'm hoping they're a side effect of problems elsewhere and so will eventually clear as other problems are cleared.

    Although it involves considerably more tinkering, increasing movement rates might be a good follow-up to map alterations in aiding path-finding problems...
    Yes definitely - increasing MP fixes a lot of problems on its own. I kept them at 80 while doing this as i specifically wanted to see where the AI gets stuck so I could try and fix it but the plan was always to increase MP when i was done, Although I'll probably do it by giving movement traits to AI generals.

    Although it's a topic for a different thread, the Persian Royal Road was as advanced as anything the Romans built
    yes, knowledge getting lost after a civ collapse and then reinvented somewhere else

    In any case, fabulous work
    Thanks, I'm pretty pleased to be honest as I can finally enjoy the game again.

    In fact took a break from map editing to play a bit before moving on to the next stage - trying to ensure every settlement is within pathing range. Will be interesting to see if that fixes the remaining unexplainable problems or just creates new ones :)
    Last edited by nikolai1962; 01-09-2018 at 07:35.
    It's not a map.

  17. #107

    Default Re: Game AI stuff (1.5)

    breakthrough on the multi-region movement - kicking myself as it's obvious once you see it but I didn't have such a clear example before...

    adding some regions in parts of the vanilla map to make sure all settlements in adjacent regions are within pathing range of each other and got a situation where Hasdrubal regularly got stuck on the single blue tile by the mouse cursor in the middle of the image below (en route from Carthage via the Leptis Magna region to the desert region in the lower right corner .)

    Click image for larger version. 

Name:	multiregion01a.jpg 
Views:	139 
Size:	221.2 KB 
ID:	20442

    (I knew the army started in Carthage cos it was Hasdrubal and not a randomly named captain and he hadn't moved out of Carthage yet.)

    (nb portions of the map like this where 3+ regions join at a point are prime contenders for the region clipping bug.)

    looking at the settlement to settlement path from Carthage to the settlement in the target region there are no obvious issues

    Click image for larger version. 

Name:	multiregion01.jpg 
Views:	190 
Size:	237.6 KB 
ID:	20443

    however they are not adjacent regions so if we assume the AI uses region to region movement in this situation what might that be? assuming the game knows the region to region path is Carthage region ->Leptis Magna region-> desert region then let's say it's first move is to calculate the fastest path to the closest border tile of the region adjacent to the target region (i.e. Leptis Magna region) which by eye looks like it would be this.

    Click image for larger version. 

Name:	multiregion02.jpg 
Views:	205 
Size:	255.4 KB 
ID:	20444

    the fastest path from that tile to the target settlement also seems okay

    Click image for larger version. 

Name:	multiregion03.jpg 
Views:	121 
Size:	218.1 KB 
ID:	20445

    however the path to the closest tile in the target region clips

    Click image for larger version. 

Name:	multiregion04.jpg 
Views:	126 
Size:	226.8 KB 
ID:	20446

    placing an impassable tile in the right spot should stop the path clipping and fix the problem

    Click image for larger version. 

Name:	multiregion05.jpg 
Views:	127 
Size:	243.3 KB 
ID:	20447

    which it does (at least from that direction).

    Click image for larger version. 

Name:	multiregion07.jpg 
Views:	122 
Size:	230.7 KB 
ID:	20448

    #

    this is actually a more general case of the region clipping previously mentioned in that the fastest path between two *adjacent* settlements will in most (all?) cases automatically include the fastest path from start settlement to closest passable tile in target region.

    #

    from past observation my theory was the AI used region to region movement to get to an adjacent region and then switched to finding a path to the settlement itself but this example suggests it paths to get in the actual target region first. this kind of pathing glitch happens a lot but it's usually hard to be sure what the precise cause is as unless it happens in the first few moves you generally don't know where the AI army was when it was assigned its target but in this case by lucky accident the combination of a) the odd shape of the target region in this example (a temporary thing while i juggled region borders) and b) it being Hasdrubal and very early in the game made it obvious.
    Last edited by nikolai1962; 01-11-2018 at 23:21.
    It's not a map.

    Member thankful for this post:



  18. #108

    Default Re: Game AI stuff (1.5)

    the previous post implies that in multi-region movement the key is not the overall settlement to settlement path but

    a) the armies start tile to the nearest (or fastest to reach) tile of the next region in the region-to-region path

    b) the path from that resulting tile to the fastest border tile of the next region in the chain

    and finally

    c) the path from the resulting border tile in the target region to the target settlement

    an example of where this can happen

    #

    on the vanilla map the distance from campus alanni to a border tile of the caucasus regions is beyond path finding distance

    Click image for larger version. 

Name:	steppedist01.jpg 
Views:	137 
Size:	249.3 KB 
ID:	20466

    (nb there's no way to know if the game's internal max path finding distance for AI armies is the distance allowed the player using their right-click movement but it's the only clue available)

    (nb AI armies won't always be assigned targets from a settlement tile - they could be in any tile in the source region - but they often are in the settlement or the waiting spot outside the settlement (usually the tile SW of the settlement if it's not blocked) so measuring from the settlement is a good first iteration)

    from the other direction the path from a caucasus region settlement to a steppe border tile is well within range

    Click image for larger version. 

Name:	steppedist02.jpg 
Views:	128 
Size:	291.4 KB 
ID:	20467

    and the steppe border tile to the settlement is within range also

    Click image for larger version. 

Name:	steppedist03.jpg 
Views:	132 
Size:	227.8 KB 
ID:	20468

    there are multiple ways to fix this:
    - move the campus alanni settlement down
    - push the border of the caucasus regions up
    - add an extra region
    all of which can create new pathing problems so need to check afterwards.

    I added an extra region - imaginatively titled campus_alanni02

    Click image for larger version. 

Name:	steppedist04.jpg 
Views:	139 
Size:	310.9 KB 
ID:	20469

    #

    another example

    on the vanilla map the arabia settlement is distant from some of its adjacent settlements so the borders of those regions are pushed out such that the distance for the nearest border tile to the arabia settlement is within range e.g. vanilla Palmyra region

    Click image for larger version. 

Name:	arabia01.jpg 
Views:	128 
Size:	220.8 KB 
ID:	20470

    and vanilla Bostra region

    Click image for larger version. 

Name:	arabia02.jpg 
Views:	112 
Size:	215.9 KB 
ID:	20471

    however now i'm pretty sure i can fix most pathing problems i've reactivated one of my original aims which was to make regions (or a cluster of regions) have the same shape as the roman provinces they eventually became a part of so that if you're playing Roman you can make your empire look like historical maps and as a result made the distance between the Palmyra border tile -> Arabia settlement too far.

    Click image for larger version. 

Name:	arabia03.jpg 
Views:	116 
Size:	222.2 KB 
ID:	20472

    No problem though - easily fixed as long as you know what to look for.
    Last edited by nikolai1962; 01-28-2018 at 20:30.
    It's not a map.

    Member thankful for this post:



  19. #109
    Senior Member Senior Member ReluctantSamurai's Avatar
    Join Date
    Feb 2008
    Location
    USA
    Posts
    2,483

    Default Re: Game AI stuff (1.5)

    A lot of this is much like the process of map creating in Pacific General that I did. Play-testing the map to make sure units behaved correctly was a large part of the time involved. The finished map often had many, many alterations from the beta version...
    High Plains Drifter

  20. #110

    Default Re: Game AI stuff (1.5)

    yes exactly - we can't change the AI code but we can change the map to cope better with the flaws in the existing AI code
    It's not a map.

  21. #111

    Default Re: Game AI stuff (1.5)

    a type of glitch, a minor addendum and a major breakthrough

    1) a type of glitch

    generally if the AI is stuck it can be hard to spot as often it is just one stack among many but then there's the other kind

    Click image for larger version. 

Name:	glitch.jpg 
Views:	156 
Size:	384.3 KB 
ID:	20518

    this can happen when
    a) a faction has only one potential adjacent land target and the army assigned to it is stuck
    b) a faction has no potential land targets and the a naval landing has glitched
    c) a faction temporarily has no adjacent land targets cos it's at peace with all it's neighbors - this generally only happens briefly after defeating one enemy faction and before starting a new war with a neighbor

    in this case it was (c) - Macedon has just defeated Greece and was at peace with all its other neighbors

    #

    2) a minor addendum

    the fastest way to clear most path-finding glitches is to check the settlement-to-settlement path between adjacent regions looking for any clipping issues however

    vanilla Macedon: army in Larissa moves out to city "waiting spot" (usually the tile SW of settlement unless it's blocked) and waits, getting extra units from Larissa each turn and getting the Captain promoted to general (the AI will often promote a captain of a stack that has been assigned a target settlement)

    261BC

    Click image for larger version. 

Name:	stuck01.jpg 
Views:	153 
Size:	371.7 KB 
ID:	20519

    and waits 254BC

    Click image for larger version. 

Name:	stuck02.jpg 
Views:	125 
Size:	362.6 KB 
ID:	20520

    and waits 226BC

    Click image for larger version. 

Name:	stuck03.jpg 
Views:	133 
Size:	370.9 KB 
ID:	20521

    eventually (209BC) another faction takes the target settlement (Athens)

    Click image for larger version. 

Name:	stuck04.jpg 
Views:	131 
Size:	377.3 KB 
ID:	20522

    and the stack moves

    Click image for larger version. 

Name:	stuck05.jpg 
Views:	133 
Size:	385.5 KB 
ID:	20523

    but after 100+ turns of not expanding and paying the upkeep for a full stack that isn't doing anything it's a bit late

    Click image for larger version. 

Name:	stuck06.jpg 
Views:	124 
Size:	373.9 KB 
ID:	20524

    #

    Solution

    if you look at the fastest path from Larissa to Athens it seems okay

    Click image for larger version. 

Name:	stuck_sol01.jpg 
Views:	144 
Size:	366.7 KB 
ID:	20525

    and to be thorough the fastest path from Larissa's waiting spot to Athens also

    Click image for larger version. 

Name:	stuck_sol02.jpg 
Views:	180 
Size:	370.1 KB 
ID:	20526

    but if you move the mouse around the tiles adjacent to the target settlement rather than the settlement itself the path clips the Corinth region

    Click image for larger version. 

Name:	stuck_sol03.jpg 
Views:	145 
Size:	377.6 KB 
ID:	20527

    also, just to be thorough again, on the assumption the AI doesn't calc settlement to settlement but 1) start tile to fastest path to a passable tile in the target region and then 2) from that tile to the target settlement then check that too - which clips also if for whatever reason the path finding chooses to go that way around the mountain

    Click image for larger version. 

Name:	stuck_sol04.jpg 
Views:	141 
Size:	357.6 KB 
ID:	20501

    on the assumption the path-finding does go that way for some reason it is easily fixed by giving the tile it clips through to the Athens region - which seems to work

    #

    so the expanded sequence is

    1) check the fastest path settlement-to-settlement doesn't clip
    2) check the fastest path from the start settlement's waiting spot to the target settlement doesn't clip
    3) check the fastest paths to tiles adjacent to the target settlement don't clip
    4) lastly check the fastest path from the start settlement to a passable tile in the target region is not different from the fastest path overall

    #

    example of last point

    the fastest path from Narbo to Lugdunum seems okay

    Click image for larger version. 

Name:	umm01.jpg 
Views:	140 
Size:	411.2 KB 
ID:	20528

    (actually it's not as although the diagonal from Narbo region to Lug region doesn't clip, the underlying orthogonal path can only go either right and up or up and right and the latter is blocked by the mountain tile so the orthogonal path clips the Massilia region - however it can easily be fixed by removing that corner tile from Massilia)

    however the fastest path from Narbo to the nearest passable tile in Lugdunensis is like this

    Click image for larger version. 

Name:	umm02.jpg 
Views:	137 
Size:	393.8 KB 
ID:	20529

    and the fastest path from that tile within Lugdunensis region to Lugdunum clips back into Narbo region.
    Last edited by nikolai1962; 01-28-2018 at 23:35.
    It's not a map.

    Member thankful for this post:



  22. #112

    Default Re: Game AI stuff (1.5)

    split into two posts as too many attachments

    #

    3) a major breakthrough

    path finding problems are mostly in three categories
    1) problems at the very start of the game which i could never figure out till now
    2) problems that recur consistently during early expansion
    3) problems that mostly occur later in the game and more randomly depending on the ebb and flow of expansion

    I'd given up on what caused (1), fixed most of (2) and was finishing off (3) and just realized how to fix (1).

    example Thrace faction, Sautes

    at the beginning of the game before factions are at war with other factions they target nearby rebel regions so Sautes ought to target Byzantium

    270BC

    Click image for larger version. 

Name:	sautes01.jpg 
Views:	139 
Size:	327.8 KB 
ID:	20530

    268BC

    Click image for larger version. 

Name:	sautes02.jpg 
Views:	134 
Size:	328.3 KB 
ID:	20531

    265BC Sautes has died but the now Captain led army still doesn't move as Macedon heads for Byzantium

    Click image for larger version. 

Name:	sautes03.jpg 
Views:	128 
Size:	343.0 KB 
ID:	20532

    260BC if Macedon had succeeded the army would have been given new orders and moved off but they didn't so it's still stuck

    Click image for larger version. 

Name:	sautes04.jpg 
Views:	122 
Size:	343.3 KB 
ID:	20533

    there's a bunch of these in vanilla among the factions e.g. Vindex for the Gauls, Arsaces for Parthia etc and glitches like this right at the start of the game have a compound effect on a faction's expansion.

    there are three ways armies like this become unstuck during the game:

    1) another faction takes the settlement so the stuck army gets new orders
    2) the distance between the stuck army and the settlement comes within one turn of movement (roads are built, general gets a movement trait etc)
    3) occasionally attacking or being attacked by a nearby rebel spawn

    you can "fix" these problem by making the path one turn only through one or more of: increasing base movement points, giving the general a movement trait, building roads in advance, moving the general closer, moving the settlement etc but this is more like over-riding the problem than figuring it out and fixing it.

    for example Sautes with base movement points set to the vanilla 80

    Click image for larger version. 

Name:	sautes05.jpg 
Views:	130 
Size:	324.4 KB 
ID:	20534

    with base movement points increased to 120 he is within one turn of Byzantium

    Click image for larger version. 

Name:	sautes06.jpg 
Views:	121 
Size:	330.7 KB 
ID:	20535

    and attacks first turn

    Click image for larger version. 

Name:	sautes07.jpg 
Views:	114 
Size:	312.9 KB 
ID:	20536

    #

    The clue i missed is the rare occasions when a stuck army moves to attack nearby rebels.

    the bug is an army assigned to attack an adjacent rebel settlement in the first turn before it has moved is not fully initialized in some way and only becomes so after its first move.
    so counter-intuitively an actual fix is to move the army further away - specifically to a region that isn't adjacent to the the target settlement so the army has to do region-to-region movement first, in this case reduce MP back to 80 and move Sautes into the other Thrace faction region

    Click image for larger version. 

Name:	sautes08.jpg 
Views:	120 
Size:	330.3 KB 
ID:	20537

    and he quite happily find his way to Byzantium over the next few turns

    Click image for larger version. 

Name:	sautes09.jpg 
Views:	113 
Size:	300.0 KB 
ID:	20538

    Click image for larger version. 

Name:	sautes10.jpg 
Views:	122 
Size:	321.8 KB 
ID:	20539

    Click image for larger version. 

Name:	sautes11.jpg 
Views:	117 
Size:	322.1 KB 
ID:	20540

    update: with further testing it turns out the army doesn't have to be in another region just > 2 turns move away from the target settlement so < 1 or > 2 turns away is okay but if both > 1 and < 2 turns away it gets stuck. useful to know as any time you change MP some armies may become stuck and some unstuck.
    #

    there are a bunch of these among the various factions e.g Vindex in his original spot would never move unless you made Massilia within one turn of movement

    Click image for larger version. 

Name:	sautes16.jpg 
Views:	118 
Size:	330.6 KB 
ID:	20541

    but if you move him just over the region border into Aquitaine

    Click image for larger version. 

Name:	sautes12.jpg 
Views:	135 
Size:	339.3 KB 
ID:	20542

    he'll quite happily find his path to Massilia

    Click image for larger version. 

Name:	sautes13.jpg 
Views:	123 
Size:	323.2 KB 
ID:	20543

    Click image for larger version. 

Name:	sautes14.jpg 
Views:	119 
Size:	355.7 KB 
ID:	20544

    Click image for larger version. 

Name:	sautes15.jpg 
Views:	120 
Size:	316.9 KB 
ID:	20545

    update: actually only 3 in the vanilla game: Vindex, Sautes and Arsaces, as the others are > 2 turns away from their targets.
    #

    took me 10+ years but finally figured it out.
    Last edited by nikolai1962; 01-29-2018 at 05:46.
    It's not a map.

    Member thankful for this post:



  23. #113
    Senior Member Senior Member ReluctantSamurai's Avatar
    Join Date
    Feb 2008
    Location
    USA
    Posts
    2,483

    Default Re: Game AI stuff (1.5)

    the bug is an army assigned to attack an adjacent rebel settlement in the first turn before it has moved is not fully initialized in some way and only becomes so after its first move
    with further testing it turns out the army doesn't have to be in another region just > 2 turns move away from the target settlement so < 1 or > 2 turns away is okay but if both > 1 and < 2 turns away it gets stuck
    Some weird internal thing? Does the same thing happen with a faction at war with another faction, rather than rebels?

    but after 100+ turns of not expanding and paying the upkeep for a full stack that isn't doing anything it's a bit late
    Seen that scenario played out repeatedly

    took me 10+ years but finally figured it out
    Sometimes, the solution isn't in a straight line...
    High Plains Drifter

  24. #114

    Default Re: Game AI stuff (1.5)

    Quote Originally Posted by ReluctantSamurai View Post
    Some weird internal thing?
    Yes, I've noticed something like this before with armies moving to a target and getting stuck > 1 but < 2 turns away. Just a guess but I think there are two bits of path-finding code, long-distance and short-distance and the game switches from one to the other when an army is "in range." However my guess is the game was originally developed with higher base MP and the "in range" code has a glitch somehow related to that i.e. it somehow switches too soon.

    Quote Originally Posted by ReluctantSamurai View Post
    Does the same thing happen with a faction at war with another faction, rather than rebels?
    good question - vanilla factions only start at war with rebels and this bug only seems to apply to armies given orders to attack before they've moved and so by the time the factions get into wars with each other most of the starting armies have moved (apart from the ones that are already stuck). However it might happen in mods that start factions at war with each other?

    will have to try and test for this

    (though now i think of it scipii have no available rebel targets and begin a war in sicily soon after the start - will have to check to see what happens there)

    the only other way i could imagine this happening is if a newly spawned general was given a target (rebel or faction) before they moved out of a city.

    Quote Originally Posted by ReluctantSamurai View Post
    Seen that scenario played out repeatedly
    yes - a faction at the start may only have one or twp targets so if one is bugged their expansion is handicapped from the beginning.


    Quote Originally Posted by ReluctantSamurai View Post
    Sometimes, the solution isn't in a straight line...
    all's well that ends well

    #

    vanilla armies that start outside settlements (may have missed a few)

    julli (2)
    1) rebel target < 1 turn away
    2) watchtower

    brutii (2)
    1&2) no available land rebel target -> naval landing

    scipii (1)
    hmm?

    gauls (2)
    1) rebel target (stuck)
    2) watchtower

    britons (2)
    1) watchtower
    2) no available rebel target (moves to settlement)

    dacia (1)
    rebel target but > 2 turns away

    thrace (1)
    rebel target (stuck)

    numidia (1)
    rebel target > 2 turns away

    carthage (1)
    no land rebel target (on sicily)

    egypt (1)
    watchtower

    parthia (1)
    rebel target (stuck but only briefly as armenia takes target)

    armenia (1)
    watchtower

    pontus (1)
    rebel target > 2 turns away

    key thing is it's easy to fix - just move the army closer or farther away
    Last edited by nikolai1962; 01-30-2018 at 01:41.
    It's not a map.

  25. #115

    Default Re: Game AI stuff (1.5)

    Does the same thing happen with a faction at war with another faction, rather than rebels?
    seems so - the Scipii are given Syracuse as a target by the senate but the army outside Messana is < 1 turn away so isn't stuck and attacks on turn one but if you move him > 1 turn's move away he doesn't move.
    It's not a map.

  26. #116

    Default Re: Game AI stuff (1.5)

    this happens on MTW2 as well - most starting armies are either < 1 turn away or > 2 turns away from their rebel targets and so move to attack on turn one but a few are > 1 but < 2 turns away e.g. Vaasco for Spain and won't move. move Vaasco > 2 turns away from the adjacent rebel region settlements and he moves to attack on turn one.

    only had a quick look but at first glance both Venice and Scotland also have a general stuck at the start for the same reason.
    It's not a map.

  27. #117
    Senior Member Senior Member ReluctantSamurai's Avatar
    Join Date
    Feb 2008
    Location
    USA
    Posts
    2,483

    Default Re: Game AI stuff (1.5)

    key thing is it's easy to fix - just move the army closer or farther away
    I just don't understand why such a simple fix wasn't done by the devs I can see missing problems a number of years into the game, but some of these stacks stalling within the first few moves should have been spotted if proper play-testing had been done
    High Plains Drifter

  28. #118

    Default Re: Game AI stuff (1.5)

    I just don't understand why such a simple fix wasn't done by the devs
    if you spend time watching the AI move you notice it straight away but when i was working on this the first time 10+ years ago I assumed it was a path finding problem rather than a bug and so spent *hours* editing the map around Massilia to try and get Vindex to move - and the same later with Vaasco in MTW2. it being a simple bug like this never occurred to me until this attempt.

    weird.
    Last edited by nikolai1962; 02-01-2018 at 02:54.
    It's not a map.

  29. #119

    Default Re: Game AI stuff (1.5)

    I made a modified version of the descr_strat in which I added the maximum roads to every settlement to see how the roads link from one city to another. This makes it easier to see possible problems the AI may have. Attached is the descr_strat in case anyone wants to use it.

    Found an issue between Tolosa and Burdigala. Unfortunately the screenshot won't upload.

    Also some settlements didn't have any roads (unsure if this is a bug).
    Attached Files Attached Files
    4 Seasons (6 Empires battle for supremecy); 3.0 version
    Total War Eras (start at 970, 1080, 1200, 1300, 1400, or 1500); 2.4 version
    Eras Total Conquest (start at 1230, 1346, 1547); 1.2 version

  30. #120

    Default Re: Game AI stuff (1.5)

    @uanime5

    thanks

    Also some settlements didn't have any roads (unsure if this is a bug)
    roads only form if there's a complete orthogonal path between two settlements (up, down. left, right) even if the road is drawn with diagonals after being calculated - so it could be that.

    (edit: also if a settlement/region isn't referenced in the descr_strat.txt the game doesn't throw an error it creates a rebel village without any buildings so it could be that also)
    Last edited by nikolai1962; 03-25-2018 at 12:39.
    It's not a map.

Page 4 of 5 FirstFirst 12345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO