Announcement

Collapse
No announcement yet.

AI : Army Movement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    However in both games I see units sitting in the middle of the main civ territory:
    Attached Files
    Civ2 military advisor: "No complaints, Sir!"

    Comment


    • #17
      In the case above it is the 2 res game, the units are concentrated at the coast, I think this is OK as the Incians are at war with the Scotts and the Americans on the other side of the see. However one thing I don't like about the groups is that there are more groups then necessary. We don't see 12 units at one place but rather 4 or 6. That is more vulnerable to an attack then the 12 units solution. However some more compact rallying and that would be fine for the invasion. The oversea invasion itsself seems to work, however the AI moves single ships and that is not so good, because this means that the units arrives at different points of time on the target continent, where single units are a easy goal. In fact the units should arrive at the same point of time and at the same place, a 12 statck is better then a 2 stack. In fact another problem of this fleet is that the ships have all different targets. My strategy in that case would be to move the units or enough units to one target on the other continent combine there the force and attack.
      Attached Files
      Last edited by Martin Gühmann; September 3, 2004, 13:12.
      Civ2 military advisor: "No complaints, Sir!"

      Comment


      • #18
        The situation in the 5 res game is similar. But now the Incas are at war with the Germans on the other side of the Incian continent. And again a lot of units on around the Incian cities, although it is no problem for the Incas to combine there forces and march to the German cities. In fact one problem I see on this picture is that there are units on the same tile, but aren't grouped. With all the armies here the Incans could conquer all the German cities on the Incian continent and expell the Germans from the Incian continent.
        Attached Files
        Civ2 military advisor: "No complaints, Sir!"

        Comment


        • #19
          In comparision to the Incas the Germans have it better with their invasion/reinforcement transports. We have again single ships but the Germans have a big target area with their cities at the Incian coast, so it doesn't matter if the ships don't share the same target and the fresh troops are good for the city defence. However there is also something positive to report for the Incas. There is an Incian stack with a Catapult in near Dortmund, the garrision of Dortmund just contains one unit and so in fact Dortmund will be history in two turns.
          Attached Files
          Civ2 military advisor: "No complaints, Sir!"

          Comment


          • #20
            The situation for other civs like the Arabs is similar. In the 2 res game the Arabs are at war with the Chinese, but were at war with the Indians on the same continent. However there are again a lot units around the capital, and that was also the case when they were at war with the Indians.
            Attached Files
            Civ2 military advisor: "No complaints, Sir!"

            Comment


            • #21
              The situation in the 5 res game is similar, but I would have expected that the Arabs would have taken the city of Apache. However at the current turn both civs live in peace with each other. And the cities on both sides are full with troops.
              Attached Files
              Civ2 military advisor: "No complaints, Sir!"

              Comment


              • #22
                I also find the difference in exploration behaviour for the Indians. They explored a little bit more and settled a little bit more but I doubt that the difference is significant, maybe the only effect is the exploration resolution. But to veryfy this some more games are needed to check this. Left in the picture the world map of the Indians in the 2 res game right the world map for the Indians for the 5 res game after 267 turn.
                Attached Files
                Civ2 military advisor: "No complaints, Sir!"

                Comment


                • #23
                  Another thing I noticed is the settling behaviour, but actual I already noticed this in a game without your modifications calvitix, the AIs don't settle aggressivly enough. I was able to fix this in GoodMod for ApolytonPack with some text file modifications and I thought by adding those modifications to the startegies.txt I would fix it here as well, but in fact I see here in that game a settler that is obviously waiting for doomsday or whatever. Actual I think the Germans will release a settler from that ship and fill the gap, that should have been filled by the Incians ages ago. And I don't see that the too many cities strategies should be in effect here either as the Incians never hit the city limit. Another thing is that the Incans in the 2 res game have 6 settlers even if the strategies.txt tells them to have only at most 4 settlers.
                  Attached Files
                  Civ2 military advisor: "No complaints, Sir!"

                  Comment


                  • #24
                    To the picture above, there is a gap between the Incian city of Huari and the rest of the Incian territory, I also thought that I fixed this problem.

                    However now to the military strength in both games the strengthes do not grow liniarly. That is a good sign, because this means that troops are using and killed in battles. However this should be more effictive. But in the end we have to investigate how it turns out in the next 300 turns. But in the end I see that we still need some improvement.

                    -Martin
                    Attached Files
                    Civ2 military advisor: "No complaints, Sir!"

                    Comment


                    • #25
                      Hi Martin,

                      Thanks for all those reports

                      To be clear, all the changes I have done about grouping are to allow AI to group units. For the moment, the AI also comport itself as the activision developpers implemented it (contrary to Frenzy for example, I didn’t force the units to group).
                      I didn’t change anything for the moment about the way transports works or AI attacks, I just change the order in goal affectation to enable them.


                      Originally posted by Martin Gühmann
                      However now to the military strength in both games the strengthes do not grow liniarly. That is a good sign, because this means that troops are using and killed in battles. However this should be more effictive. But in the end we have to investigate how it turns out in the next 300 turns. But in the end I see that we still need some improvement.
                      So Yes, there is still a lot of work left.

                      A lot of improvement or problem you mention can be resolved by adjusting the values in goals.txt and strategies.txt. I’m working on it, for the moment on maps without sea (there is enough problems to solve first only with one continent…)



                      Originally posted by Martin Gühmann
                      However one thing I see is that the AI has units in the middle of nowhere. What do the units there.
                      To better understand what each army is doing, you can activate armytext (even in final version) by changing the m_armyTextOn variable to ‘true’ in the gfx_options.cpp constructor.
                      (I usually add the coords in infobar too (by desactivating #ifdef _DEBUG after the command : Concat(g_theStringDB->GetNameStr("INFOBAR_UNEXPLORED")); in infobar.cpp).


                      Originally posted by Martin Gühmann
                      And the same situation in the 5 res game, well the Incians explored a little bit further then in the 2 res game
                      I tried it again an it effectively appears that with a 5 resolution AI is exploring further, unless you have a lot of small islands. Perhaps it will be wise to set the value depending on map size and number of continents. For the moment, rollback to 5 will be easier.

                      About Calculation time, one problem is that the expore goals are added every turn with my modifications (I desactivated a condition that added explore goals only when there aren’t any left.
                      I tried to change it to add explore goals only when half of maxeval goals are remaining, so it improve performance and the goals are regulary added.


                      Originally posted by Martin Gühmann
                      However in both games I see units sitting in the middle of the main civ territory:
                      With original AI, the unused units were send back to towns. Now they stand where they are. But I don’t think those units are unused. It's probably a NO_PATH problem (please check it with armytext).

                      Originally posted by Martin Gühmann
                      We don't see 12 units at one place but rather 4 or 6. That is more vulnerable to an attack then the 12 units
                      The units are grouping until the needed force for the goals is reached. To have 12 units group, the force match ratio in strategies.txt can be raised (specially value_ratio (or we can add threat ratio in needed_force_computing).

                      Comment


                      • #26
                        The unit that stopped exploration in the South and are fortified have no goal. The other unit was moved back, but it has no path problem, I checked the path and the path points into the sea.
                        Attached Files
                        Civ2 military advisor: "No complaints, Sir!"

                        Comment


                        • #27
                          The fortified units in the center of the empire have no goal. Only some of the units in the center of the empire have a goal. So the AI is wasting power for attack, by not grouping and let them "sleep". At least the AI could group those unused units to 12-stacks. For the settlers it looks like the settlers should be moved to spots on the other side of the world, but all the transport capacity is used for the attack forces.

                          -Martin
                          Attached Files
                          Civ2 military advisor: "No complaints, Sir!"

                          Comment


                          • #28
                            Hi,
                            I never had seen so much unused forces! (due to personality of Incans perhaps…). I just discovered a bug in my armytext concerning 'NO GOAL'. When a unit is doing the same goal for several turns, the armytext is reset to NO_GOAL… So perhaps they weren't all unused but blocked for any reason. I'm fixing the NO_GOAL bug and I'll post the new patch soon. Could you post a savegame for this game?

                            Other points I'm working on (I'm in holiday this week, I expect to have time to finish them to post all I'll have done) :

                            Wounded units retreat:
                            When a unit is wounded (criterion : less than half HP), it will have bonus for defend or retreat goals, and malus for other attack goals.

                            Territory respect :
                            When non-trespassing agreement, all the goals concerning the territory will be considered as BAD_UTILITY (explore, seige, attack,…) - Only for Civ with Lawful or neutral.

                            Problem with garrison units :
                            When a city is taken (by seige force), all the group is actually affected to garrison. So I have to ungroup garrison forces (only one or two have to be affected to garrison, other can be affected to other goals.

                            Grouping Problems :
                            When units are one tile close and want to group, it appends on several cases a 'cat-mouse' play : the two units endless go to tile where the other unit was.

                            Pathing problems :
                            1. Grouped units cannot go across cities (due to max army problem). The pathfinding don't check that (it checks only the final destination), and the army is blocked. I trried to place roads to avoid the city, but the pathfinding apparently prefer going through cities.

                            2. When units are in enemy territory, (civilian or not), they most of the time path close to enemy cities (to use the benefits of roads). Problem : enemy bombards them (AI loose a lot of units this way). It will be wise for those units to avoid tiles that are too close from cities.

                            3. Roads problem : when a tile with road is polluted, AI don't build road around…

                            In order to realize those last points, I introduced a concept of avoid tiles (tiles that are forbidden for pathfinding). When demanding to find path, we give as parameter a list of avoid tiles.

                            Princip :
                            1. find a path without setting avoid tiles.
                            2. Check for each tile of path if it has enough room (or if it is too dangerous, or if the tile is polluted).
                            3. If such tiles are found, set them as avoid tiles and try to find another path.
                            4. again check…. This can be reproduced several time (MAX_CYCLES has to be defined).

                            I know, it's again time consuming, but I didn't find other solutions. Perhaps any ideas ?


                            Exploration
                            No idea why units aren't explore further. Perhaps they entered in war, and all units were required to set war. (It appends during my test games). The problem I have seen in games that need sea invasion is the lack of transport units (specially If the sea distance is high). As I said I first concentrate my efforts on 'One continent games' - map with only land.

                            With units respecting non-trespassing treaty, I experienced that AI doesn't explore much in enemy territory. So I add a new goal : GOAL_STEALTH_EXPLORE, to use special units to explore deeply in enemy territory. It works fine, except the fact that settlers ARE special units (and I have the same problem you mention, there is too much settler unit, even if there is no room left to settle… perhaps we'll have to add a condition : settler units can only be build if there is settle goals). So I have a lot of settlers coming right in my territory, a pleasure for slavers :.

                            Stealth Units
                            By observing special units, I discover they aren't very efficient : (spy trying to steal_technology on civ that don't have any,… abolitionists that try to free slaves where there isn't… I think I'll apply a filter to cancel all those stupid goals. AI so will cheat, by knowing where it's useful to send spy and other units, but it's really needed (otherwise those units are quite useless for AI - I Ttink that's why there have been desactivated in SAP…

                            For all the changes described here, I have to introduce several new constants in 'goals.txt' and 'strategies.txt', It seriously reduce the chances of backward compatibility (and mod compatibility). But I think we have to go in that direction to really improve the game.

                            As I said, I'm on holyday, so I don't know how often I'll be connected… (I'll also change my Internet connection too, I'll soon have DSL). Please be patient if I don't respond quickly next weeks…

                            Comment


                            • #29
                              Originally posted by calvitix
                              Wounded units retreat:
                              When a unit is wounded (criterion : less than half HP), it will have bonus for defend or retreat goals, and malus for other attack goals.
                              I don't think less than halh HP is a good criterion alone, you also have to consideer the military readiness, so a better criterion would be less HP then military readiness gives.

                              Originally posted by calvitix
                              Grouping Problems :
                              When units are one tile close and want to group, it appends on several cases a 'cat-mouse' play : the two units endless go to tile where the other unit was.
                              Well you have to check before the move if there is still the other unit on the destination tile to end that game.


                              Originally posted by calvitix
                              Pathing problems :
                              1. Grouped units cannot go across cities (due to max army problem). The pathfinding don't check that (it checks only the final destination), and the army is blocked. I trried to place roads to avoid the city, but the pathfinding apparently prefer going through cities.
                              I think the path finding algorithm needs to be improved in general to take this problem into consideration.

                              Originally posted by calvitix
                              2. When units are in enemy territory, (civilian or not), they most of the time path close to enemy cities (to use the benefits of roads). Problem : enemy bombards them (AI loose a lot of units this way). It will be wise for those units to avoid tiles that are too close from cities.
                              In my BetterAI.slc I check whether the city is a good goal if the army encounters one. In general when an army is in enemy territory, then everthing there is a possible goal. If the unit should go to a city to attack it but it encounters an enemy stack that is weak enough it attacks this stack. If the enemy stack is too strong and the army can bombard the army bombards. If it encounters on the way to another city a city that is also worth of taking then the city is taken. In conclusion I would change the goal of the army if there is something on the way. It is more intelegent to take outposts first then the capital in the middle of the empire.

                              Originally posted by calvitix
                              With units respecting non-trespassing treaty, I experienced that AI doesn't explore much in enemy territory. So I add a new goal : GOAL_STEALTH_EXPLORE, to use special units to explore deeply in enemy territory. It works fine, except the fact that settlers ARE special units (and I have the same problem you mention, there is too much settler unit, even if there is no room left to settle� perhaps we'll have to add a condition : settler units can only be build if there is settle goals). So I have a lot of settlers coming right in my territory, a pleasure for slavers :.
                              That's right that settlers and slavers are special units, but the setter has VisionClass: Standard and the slaver has VisionClass: Stealth. So you should rather consider the vision class, then the attribute special unit.

                              Originally posted by calvitix
                              Stealth Units
                              By observing special units, I discover they aren't very efficient : (spy trying to steal_technology on civ that don't have any,� abolitionists that try to free slaves where there isn't� I think I'll apply a filter to cancel all those stupid goals. AI so will cheat, by knowing where it's useful to send spy and other units, but it's really needed (otherwise those units are quite useless for AI - I Ttink that's why there have been desactivated in SAP�
                              That's a real problem, if the spy figures out the other civ does not have any techs to steal he should change the goal and try something else on the same city. Abolistionists should know which city has slaves has human player you know it when you arrive at the city. For the special units in Apolyton Pack, I cannot remember that they have been disabled there, the only problem there might be the settings in strategies.txt. In fact I was able to make the AI use of them in GoodMod and not only the slaver, but also Clerics. One problem I see with the special units is if they have more then one possible order, that I was only able to make the AI use of one order but not of the other orders.

                              -Martin
                              Civ2 military advisor: "No complaints, Sir!"

                              Comment


                              • #30
                                Here are both savegames, the savegame with the test1 suffix is the 2 res game the savegame with the test2 suffix is the 5 res game. Note that I used the cheat editor to switch to the Barbs in order to let the AI play, so both games are saved as Barbs.

                                -Martin
                                Attached Files
                                Civ2 military advisor: "No complaints, Sir!"

                                Comment

                                Working...
                                X