Announcement

Collapse

Welcome to the New Server!

Apolyton.net is now pointing to the new server. Please let us know if you spot any oddities or have any suggestions for what to add to the site!
See more
See less

Fixing the enemy units behind-the-lines problem

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

  • Fixing the enemy units behind-the-lines problem

    There is one big issue regarding demo eight that I think we need to discuss now. Numerous people have complained, and still do, about the "whack-a-mole" nature of having to chase down by hand small enemy units. These enemy units can be generated either by units of another civ sneaking by your main forces, or appearing due to rioting. I find this one of the more frustrating elements of the game as it exists now myself. If we can come up with a quick and dirty fix for this problem before the release of demo eight, I think it would be well worth it.

    There are two somewhat separate issues that I want to elaborate upon here. As mentioned above there is the issue of enemy units in "home" territory that can take extraordinary efforts to track down because of the simultaneous movement system. I'll refer to that as the "unit" problem. In addition there is a " land" problem that can remain even after the enemy unit is dead. Where you have to move through every single previously-controlled square to re-establish control. Generally the unit problem is worse than the square problem, since you can always just arrange a movement path to go over previously-conquered squares to reclaim them.

    One solution that occurs to me is a "patrol" order. A task force with this order would have a movement path entered, and be responsible for controlling an area within a certain number of squares or movement points from that path. For a linear movement point on a flat plan the TF would then attempt to control a rectangular piece of the map. If all the ground were under friendly control and there were no enemy units with in the area that the unit is responsible for, the unit would simply patrol back and forth along its movement path. If an enemy TF , either of another civ, or a rebel, were identified within the area, the patrolling TF would attempt to attack it. The patrolling TF would only consider the enemy TF a target if the patrolling TF were significantly large to take the enemy out. If the patrolling TF does not have an enemy TF that it considers a valid target but there are enemy-controlled squares within its area, then it would move to those squares to reestablish control.

    If this sort of thing is practical, then I think it would solve most of the problems of player frustration from whack a mole. It would still be possible for the enemy TF to lead the patrolling TF on a bit of a chase. But if the chase didn't usually last too long it wouldn't be a huge deal. One other modification that might help would be having the unit movement rates reduced as supply reduces combat power. That way a rebel unit might expect to be moving slower once it is expelled from its home territory, and be easier to chase down. Certainly having more than one TF on patrol for overlapping areas would also make it much easier to chase down any interloper.

    I would like to see some brainstorming of ideas for how to solve this issue at least crudely in a way that doesn't take too much effort. I think solving the unit problem is more important than solving the land problem, although potential fix is that would address both are of course best. Also, I'd like to hear if the idea on patrolling units above is something that can reasonably be implemented given current capabilities.
    Project Lead for The Clash of Civilizations
    A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
    Check it out at the Clash Web Site and Forum right here at Apolyton!

  • #2
    A few more options to consider:

    1. Give units in home territory a +1 to movement and reduce units in enemy territory to a move of 1. This simulates the fact that units defending home territory know and can use the best paths to reach the frontline quickly and the fact that any invading army will slow to cover its flank and rear as it advances. This also prevents the enemy using your road network against you, until he's captured it.

    2. Instead of just 'patrol' why not go one step farther and also do a 'patrol border' order, which automatically sets the movement path to patrol the border of the civ (or the province where the order was issued). In fact, since having the unit moving in circles on the map could be distracting, I'd like the unit to disappear entirely and go into a 'province defense' force, but that can wait until later, since it would also require building some sort of GUI to deal with this 'province defense' force.

    3. If playtesting shows that the above two aren't enough, and only then would I consider this option, we could implement some sort of ZOC that only occurs for the defender in home territory.

    As a long term solution, here's what I'd like to see:

    No units on the map at all (most of the time) and thus no tedious moving of units every turn...
    There is a pool of units (which the player builds normally) for each civ, all new units enter this pool. This pool automatically defends the civ's borders (as in #2 above). If the player decides to go to war, he brings up his military advisor and says, "I need 30% of my forces to attack China (or whoever)." He can fine-tune these orders by saying "45% of artillery and only 30% of the rest" or adding an additional 50 tanks and 100 fighters, for example. Once the order has been given, a single task force appears on the map. The player then sets about giving it orders such as attack the southern province, capture the city of Hong Kong, don't loose more than 50% casualties, etc. Then the TF automatically sets out to execute those orders. When the TF reaches China, it automatically breaks into any number of necessary divisions and executes the plan issued by the player.

    You'll notice I said 'plan.' That's intentional, as the player would basically have an interface to the AI planning module, and would build a plan for it. The AI could then use this plan to execute the orders given, and learn from it as well.

    -edit-
    Of course, those masochists among us who enjoy moving 100 units per turn could opt to take control of the invasion rather than designing a plan.
    Last edited by alms66; December 10, 2004, 20:32.

    Comment


    • #3
      Let me suggest entirely different solution to the unit problem:
      -Riots
      -Fleeing from fights
      -Militia

      Riots generate many units. Probably too many. I can reduce the number of units generated. It won't really suppress the problem, but if there are less units, they are likely to die faster. Not solving the problem, but tangential.

      Fleeing from fights:
      Most of the time, small remaining units come from a routed army which fled away. They sometimes manage to flee back to a square which you used to control. This makes for chases. If units can flee when routed only if the target square (which they come from) is controlled by them (or noone or an ally), they would stay in place more and get reduced to pieces without requiring as much chasing.

      Militia:
      I don't like the Patrol proposal because I think it would waste lots of resources and not be easy to code. The border patrol with abstraction looks better to me, but I think it shouldn't even require the player creating units and dedicating them. In fights, a militia can be generated in order to help unis destroy enemy units. This could be expanded so that militia would be able to fight even if there are no friendly units. Militias wouldn't hamper big armies, but they could get rid of smaller ones. That would mean that your well populated squares would defend themselves alone from small armies, while squares with small populations might still be conquered by small forces.
      Clash of Civilization team member
      (a civ-like game whose goal is low micromanagement and good AI)
      web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

      Comment


      • #4
        I'm willing to go with your solutions Laurent, and see if they solve the problem enough. Changing the movement rates a bit depending on control of the territory moved into, as alms suggests, is also a possibility. However, that could cause problems with path finding etc., so it's probably best left as a backup possibility.

        In another thread I suggested that movement rate be changed due to supply level. Is that another "quick fix" that might be applicable here? I have to admit I don't even know where rebels get their supplies from, or if they even need them in the current code.

        Alms, the abstract stuff you suggested the end of your post, in terms of just being able to give the AI an abstract plan for it to implement , is still in the long-term spec as far as I know. But that kind of thing is a long way off, so I don't think we should divert from current activities to discuss it at this point. I don't think there are many people that want to get rid of units and task forces on the map completely.
        Project Lead for The Clash of Civilizations
        A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
        Check it out at the Clash Web Site and Forum right here at Apolyton!

        Comment


        • #5
          In another thread I suggested that movement rate be changed due to supply level. Is that another "quick fix" that might be applicable here? I have to admit I don't even know where rebels get their supplies from, or if they even need them in the current code.
          I must confess I don't know either... I suspect they are not checked at all.
          Answering a related point raised by alms, the riots model doesn't say that rebel units would stop being if the cause of the rebellion stops. They are supposed to try to seize power instead. Check the social model and we can discuss it in the Social Model thread.
          Clash of Civilization team member
          (a civ-like game whose goal is low micromanagement and good AI)
          web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

          Comment


          • #6
            I coded a few things and aml not satisfied. Having militia intervene even when there are no enemy units doesn't work very well because it can't work in territory where the locals prefer your enemy to you. e.g. Persians in the social scenario won't help to fight against Persians. I'm not committing my changes because they don't seem to change much. I'll do so next week-end if a week of testing doesn't reveal bugs.
            I still would like to have something abstract to help get rid of weak stray units. I'll try to see if I can tweak the existing code for militia creation to get it more effective or if it needs something else. A 'patrol' spending entry in the economy could also be used to get rid of the problem and would be easier to track as patrollers and militias are two different things.
            Clash of Civilization team member
            (a civ-like game whose goal is low micromanagement and good AI)
            web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

            Comment


            • #7
              Originally posted by LDiCesare
              Militia:
              I don't like the Patrol proposal because I think it would waste lots of resources and not be easy to code. The border patrol with abstraction looks better to me, but I think it shouldn't even require the player creating units and dedicating them.
              I don't see why you think the Patrol order would waste resources, wouldn't you simply reissue the same movement queue that existed before? This seems to be about the same intensity as the current 'move' order, or a slight bit more.

              As for the border patrol (abstracted form), I envisioned that all units the player creates would be used for border patrol. Thus the player does not need to intervene. He builds units for the sake of having the strongest force, not specifically for border patrol. The player would have to pull out the troops he needed when (and only when) he decided to go outside his own borders, though.

              Comment


              • #8
                How do I know where to patrol? Do you mean you issue a path and let it go around that path indefinitely? If so, yes it's cheap on resources. But then you have to fix it everytime the border changes, and it doesn't prevent an enemy from entering the zone you control when the patrol is at the other end of its path.
                If all your units inside your territory participate to border patrol, then it's going to be very hard to invade anything.
                Already, the code I put to provide automatic upheaval of militia to help defenders (when they are sufficiently numerous) gives a BIG boost to defense. Anything more would be unbalanced. I'm not even sure I'm going to deliver the code I did.
                More or less: When an army enters a square, I systematically check ethnic groups to see if they should raise a militia. They usually don't, unless you have an army that needs help, or the incoming army is really small (the problem of small is very dependant on the size of units: In Delenda, an army of 5000 men is quite small, but is still big compared to the population of most squares). The result is it's far easier to defend a square when the opponent is more or less of the same strength as you.
                The difference with last week-end is that militia will try to help in that order, those who oppress them the least, then the civ whose prefered nationality they are, then the defender civ. Thus Persians won't help macedonian defenders against persians, but Gauls will help either Carthaginians or Romans, depending on ethnic discrimination and who owns the square. It's nice, but I don't think it solves the problem.
                There's still one other thing I think could e done: Kill units that are in really bad shape. Currently, a 5000-man unit reduced to 200 will keep fighting other battles, which is probably not a good idea. They should disband or surrender after reaching a minimum number, which would get rid of the smallest units which take forever to kill, and thus remove one source of the problem instead of trying to find solutions to fix it afterwards.
                Clash of Civilization team member
                (a civ-like game whose goal is low micromanagement and good AI)
                web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                Comment


                • #9
                  Originally posted by LDiCesare
                  How do I know where to patrol? Do you mean you issue a path and let it go around that path indefinitely? If so, yes it's cheap on resources. But then you have to fix it everytime the border changes, and it doesn't prevent an enemy from entering the zone you control when the patrol is at the other end of its path.
                  As an early implementation, I’d put it as a player-only feature, so yes, it follows the path the player sets, and only that. I imagine we’d refine the process later on.

                  Originally posted by LDiCesare
                  If all your units inside your territory participate to border patrol, then it's going to be very hard to invade anything.
                  Not at all. You simply withdraw the troops you want, at any time you want them, as though the “border patrol” were a bank account and troops were currency.

                  Originally posted by LDiCesare
                  There's still one other thing I think could e done: Kill units that are in really bad shape. Currently, a 5000-man unit reduced to 200 will keep fighting other battles, which is probably not a good idea. They should disband or surrender after reaching a minimum number, which would get rid of the smallest units which take forever to kill, and thus remove one source of the problem instead of trying to find solutions to fix it afterwards.
                  Rather than ‘kill’ the unit, and thus lose the population, I’d prefer to have them settle (depending on the circumstances) in the square where combat occurred. This serves two purposes:
                  1. It’s fairly historically correct to assume that battles far from home (we’ll need a definition for that) would settle in the local area after major loses (again needs a concrete definition).
                  2. It presents an interesting possibility for the player. Suppose that 200 people settled, grew and eventually became a major presence in the empire. Once the religious assimilation code is in, it could be more interesting because those 200 could spread religion as well.
                  Last edited by alms66; December 18, 2004, 02:18.

                  Comment


                  • #10
                    Originally posted by LDiCesare
                    Already, the code I put to provide automatic upheaval of militia to help defenders (when they are sufficiently numerous) gives a BIG boost to defense. Anything more would be unbalanced. I'm not even sure I'm going to deliver the code I did.
                    What you did sounds interesting to me. Would it be possible to make it controlled by a command switch? If it's easy enough it would be good to have a command-line switch that also allowed the level of support to be varied. A level of zero could mean no militia support, in the level of one hundred could be what you have now. Then we could play around with the parameters and see what levels seemed appropriate.

                    click cancel's still one other thing I think could e done: Kill units that are in really bad shape. Currently, a 5000-man unit reduced to 200 will keep fighting other battles, which is probably not a good idea. They should disband or surrender after reaching a minimum number, which would get rid of the smallest units which take forever to kill, and thus remove one source of the problem instead of trying to find solutions to fix it afterwards.
                    After my most recent set of play testing last weekend I had the following thoughts:

                    1. Eliminate all units that fall to below 10% of starting strength. (If a similar unit exists in that square that could take the reinforcements that it should get them.)

                    2. Any unit that is in a fight at worse than 10:1 odds should be annihilated. (There may be some exceptions, for example if the weaker force has higher mobility it should have some chance of getting away.)

                    Number 2 above points out what I think is a big flaw in the combat system. It restricts the number of units that can fight a given unit to a very small number. (I think it is either one or two.) In the real world there are many ways were the excess troops can make a huge amount of difference. I think that at a minimum the combat matching should allow greater odds. Perhaps such a change is beyond the scope for demo 8, so I will just copy this part of my post over to the military thread.
                    Project Lead for The Clash of Civilizations
                    A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                    Check it out at the Clash Web Site and Forum right here at Apolyton!

                    Comment


                    • #11
                      A command switch can be done, but figures wouldn't help much, as it's already very hard and somewhat subjective to judge the effect.
                      Eliminating too weak units I will do. There's already a check like that, but it's based on starting health in the turn, and not unit maximum health. I'll do it. The proportion will not be a straight 10% but something along those lines based on morale because I think that's what morale stands for (if remains less than 1/morale, knowing morale is about 10 for an average troop).
                      Clash of Civilization team member
                      (a civ-like game whose goal is low micromanagement and good AI)
                      web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                      Comment


                      • #12
                        I think the problem should be fixed with the last code update I sent. If that doesn't seem to fix it, I suggest lowering the morale of elements. See the military model VI thread for details.
                        Clash of Civilization team member
                        (a civ-like game whose goal is low micromanagement and good AI)
                        web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                        Comment


                        • #13
                          The recent changes seem to have helped significantly! I think it's good enough for the demo at this point (although I need to playtest a bit more). I will do that while I make some scenario changes to fix typos etc.

                          Thanks Laurent.
                          Project Lead for The Clash of Civilizations
                          A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                          Check it out at the Clash Web Site and Forum right here at Apolyton!

                          Comment


                          • #14
                            I think that the 'land' problem is more problematic than the 'unit' problem. The only reason why I want to track down and kill the stray enemy units is because if I don't, they conquer my entire province except by well-defended city. If it were the case, and I have already suggested it, that control of a square reverted to its original owner unless held for several turns, then a single enemy unit wouldn't be able to take large swathes of my territory. The second advantage is that the enemy unit would have to stay still to gain anything and thus I can track it down while its stays still.

                            I think this solution is realistic as it models for the change of local government & police etc. of the square. The same can be applied for province capitals i.e. you get to keep the entire province if you hold the capital for several turns.

                            Perhaps the number of turns needed to 'conquer' a square could be related to its chance of rioting (as an indicator of dicontent with current regime).

                            I'm also down with the militia idea.

                            Comment


                            • #15
                              The idea in and of itself is sound. A unit should have to move into a tile and stay there for that turn, at least, to change ownership. Having more than 2 turns would probably not be worthwhile though. It would bog wars down as players have to leave individual units behind the lines to "occupy" the tiles in order to gain control, or worse if we require the occupying force be larger depending on the population and resistance of the tile. Then, they'd have to move them once ownership changed, it would be a hassle.

                              I'd rather have the automated "provincial defense" pool we discussed above and elsewhere (I think) than to be forced to leave those units behind. Like I said though, holding a tile for a 1 turn minimum would be good on the changing of ownership.

                              This is also still a good option to consider, IMO:
                              Originally posted by alms66
                              1. Give units in home territory a +1 to movement and reduce units in enemy territory to a move of 1. This simulates the fact that units defending home territory know and can use the best paths to reach the frontline quickly and the fact that any invading army will slow to cover its flank and rear as it advances. This also prevents the enemy using your road network against you, until he's captured it.

                              Comment

                              Working...
                              X