Announcement

Collapse
No announcement yet.

Make the AI into Alexander

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

  • #31
    Originally posted by Zachriel

    Actually attacking takes place with an attack, then an automatic move into the unoccupied square. So you get to attack and move with all foot units, at least some of the time. If the square is still occupied, then the turn is indeed over. That is because hand-to-hand units must close to attack.

    If the proposed rule was implemented, that is, treating the archers in a tactical fashion, they could attack from the adjoining square, then move off. Most of the time, the archers would attack and then not move, in order to remain in the stack or fortification.
    I hate to be picky here, but regardless of terrain, entering a tile with an enemy unit in it (i.e. attacking that unit) costs a minimum of 1 movement point. If your unit is on roads within your empire, you can't move a unit one tile, attack onto another tile, and move away with the last 1/3 move point.

    My example demonstrates why the designers made the game this way in the first place; if foot units could attack then move on roads, gameplay would be drastically different. Having a high movement score is extremely powerful. Just giving this ability to foot soldiers might solve the AI problem, but reduces the power of existing fast units. I think nye's solution of giving 2 move to foot soldiers and 3+ move to fast units is too much of a change.

    Zach, I think we're agreed that the archer-type units in civ don't accurately reflect their true utility in the real world. Archers are closer to bombard units than foot soldiers. But drastically changing these units simply won't happen in any future patch; Firaxis decided to call their 2/1/1 unit 'Archers' and their 4/1/1 unit 'Longbowmen'. That's all there is to it. I'm sure you can use the editor to changes their names, if that helps.

    My problem is that, regarding the units currently available in the game, the AI simply doesn't know how to use them effectively. Sort of reminds of Alpha Centauri where the AI simply never ever used the 'Copter chassis. That was funny. I think it's possible to teach the computer how to best use the available units; giving them more moves is too quick and dirty a solution, IMO.


    Dominae
    And her eyes have all the seeming of a demon's that is dreaming...

    Comment


    • #32
      You may well be right Dominae.

      The 2MP for foot might serve to make the AI competitive, MAYBE. If it did, it would be a good mod for our purposes. There would be other down sides probably. But if it dramatically increased the AI's ability in war, then it may well be worth it.

      Increasing the power and effectiveness of the foot units is the whole point, since they are often the AIs favorite units.
      (\__/)
      (='.'=)
      (")_(") This is Bunny. Copy and paste bunny into your signature to help him gain world domination.

      Comment


      • #33
        Originally posted by Alexnm
        Yes, they could. If we were on 2020 or 2030.
        They could it right now. Look at all these chess programs that compete with grandmasters. But you would have to pay not $50, but maybe $500 or more for a game, and certainly you'd need a better hardware (Wintel is cheap crap).

        PS: I'm aware that the complexity of Civ3 is far higher than chess and am not talking about a brute force approach.

        Comment


        • #34
          I think a way for the AI to better compete with Civ3 grandmasters (such as Aeson ) would be: vastly improve the AI's behavior in the ancient era. Most games are won there, and not later. There are 2 core strategies:

          A - The early warmonger, aka oscillating wars. Early beat, cripple and vassalize your 4-6 closest neighbors (on huge maps) with a couple of decisive rushes in the ancient and early medieval age. The way against it would be, make the AI in the ancient era more aggressive, so it will be a risk to send almost all forces in a conquest, because another neighbor might rush you the same time, and not concentrate merely on expansion like it's now.

          B - The builder approach, use of ICS stratiegies combined with extortion and gain of cities and techs on peace renegotiations. The AI could counter this by not giving in and doing the same.

          There may be different combinations of both.

          As was said many times, Soren needs to improve the strength evaluation algorithm. Vastly. That's it! Counting peaceful settlers and workers, and paramilitary forces like scouts as military is simply stupid.

          Currently I'm playing a "B" type game, huge, continents, 16, Monarch. I'm trying Aesons builder approach, not that I'm so good like he is, but it works. I'm 3 techs in the medieval age, have a one tech lead, about 70 cities and more settlers on the way (the average AI has 10-15), 5 luxuries, and all 14 AI's (China is still missing) are scared the hell of me. I can't understand why. I have less military units than cities (a few still are undefended) and an offensive force of 7 or 8 MW's (that's nothing). But I have more than 60 workers and a couple of scouts. I fought only one short war, because I was attacked by Abe, who later allied with Monte. Both took back a crappy size-1 city I extorted earlier, that was it. I didn't even attack. About 10 turns later I made peace with Abe on the even, and Monte gave me another size-1 city for peace. Ten more turns later, Abe gave me a city again for free. Why is that possible? Is the AI unable to see that I can't attack? Why does it not send me to hell when I come every 20 turns?

          Comment


          • #35
            Sir Ralph,

            You are totally on target... early game warfare is one of the key areas where the AI falls down (boy isn't it true in Civ3: once the AI falls down, it can't get up).

            I've mentioned this as an aside several times, but one of the only instances of AI behavior that really strikes a note of fear in me is when a couple of stacks of 4 Legionaries show up. I don't know what it is, and Rome in general is not a powerhouse, but it seems like Caesar is the only AI who knows WHEN and HOW to launch an attack. Namely, when he has relative strength, and also with sufficient application of force. Japan does it too, but I've usually broken them before Samurai can be enough of a force.

            I would add to the "strength evaluation algorithm"... human players also seem to add "threat assessment" to the equation. Proactive responses can include early genocide, resource denial, etc. The AI just tries to expand.

            R
            "Verily, thou art not paid for thy methods, but for thy results, by which meaneth thou shalt kill thine enemy by any means available before he killeth you." - Richard Marcinko

            Comment


            • #36
              The code is late stage, so the changes I propose may be difficult to implement. If done early in cycle they are relatively easy to put in.

              As for artillery, one of the easiest ways is to specifiy percentages for unit type production instead of using flags. For example:
              10% bombard
              20% defensive units
              40% offensive units
              20% mobile units
              10% settlers
              Instead of build rarely, build often, build rarely, build sometimes. Maybe a stack can be tagged for offense and the AI can check the current makeup of the stack and build accordingly. Add a pinch of randomness for some variety.

              Another improvement would be a chance that the AI expands to a set number of cities and then pauses instead of expanding willy nilly to the point where it can not possibly defend all its cities. Predictable AI expansion is a key to many early conquest strategies. An AI that does not always expand so quickly makes for more uncertainty and forces a human player to modify some easy strategies. This change requires another slider, or another flag, such as Expansion desire. This is different from aggression level.

              One way to implement this is by number of defensive units per city. A cautious expander might wait until it has six defensive units per city before expanding past a certain number (maybe half the Forbidden city number for any map size plus or minus a random factor to keep the human guessing). An medium expander might go when it has three defenders per city. An aggressive expander might accept one defender per city. Again, this is off the top of my head. Another way to go is to expand to a set number of cities, build an offensive stack or two. Then expand some more if there is open land, or attack if a nearby neighbor has weak defenses. Again, with the current code so late into the development cycle, this change may be difficult to weave in. If it is in the design document, this kind of strategy is easy enough to code.

              For offense, a good change is to wait for more units to attack. The AI often starts a war with a stack of three or four units. An early stack of ten or more may be available at that time, and would be much more effective and strike real fear into human players. Imagine at stack of ten units heading for your capital at 700 B. C. I have never seen such tactics except maybe on Diety when the AI masses some of its 15 free units. One way to implement this is to build offensive stacks and tag when the stack is complete. The formula for stack ready to go, can have difficulty level, time in the game, and map size, number of enemy cities as inputs. Add a pinch of randomness and I see an improvement over current tactics.

              Comment


              • #37
                Conservation of Force

                We've all seen it, the lines of AI units strung out marching through the swamp towards us in stacks of 2 or 3.

                Sometimes, usually due to luck, the AI will come in a bunch. 20 or 30 units in a small 2 or 3 tile column along roads. When that happens, the human sweats.

                The key is effectiveness. 30 units strung out over 10 or 15 tiles are too easy to destroy in a piece-meal fashion. They all die. They are completely ineffective.

                How hard would it be for the AI to divy its forces up into 2 or 3 categories? Category 1 would be garrisons. Category 2 would be expeditionary forces. A third category might be reserves.

                Obviously, everyone (I hope) garrisons their cities and key tiles in their domains. Not a lot to say about that. One thing that would be good though might be if the AI varied it's garrisons by vulnerabilty and importance of the city. I've seen far too many capitals with the same number of units in it as much smaller, less important cities.

                Category 2 and 3 are harder. The AI should gather it's forces into groups (stacks) in a safe area. When the group reaches the size needed for effectiveness, it is then released for use. Early in the game, stacks of 2 or 3 units can be very effective. Later on 4 or 8 units are required to maintain effectiveness. Very late in the game you would need to combine several 8 or 10 unit stacks to maintain effectiveness.

                What do these units do? Well, while at peace they fortify in good defensive positions and wait for needs to arise. They may boil around a bit within the empire as attitutudes and relationships with neibours change over time. When war comes the AI is going to fight either offensively or defensively. If offensive, several groups should be assigned to a given task, such as take city X. If defensive the groups should be held in or near cities, waiting to strike at enemy offensive forces.

                The point would be that when the AI showed up to fight in the field, it would show up with forces capable of winning. The judgement of what a sufficient force should be (2 or 8 or 24) should be made based on the relative strengths of the AI and it's enemies in number of OFFENSIVE units. Not workers, not even Pikemen should count in the equation. The whole point is to conserve the effectiveness of your forces. Pikemen will seldom launch themselves out of a city at passing columns of units (well, OK, maybe they would if it were 1 Cavalry at a time parading past).

                Reserves as a third category might be a bit more tricky for the AI (and many humans) to make effective use of. They operate under the same grouping criteria as category 2 units, but they are held further back in an empire. They are committed to recover from a serious set back defensively. Sometimes they are thrown into an offensive as the last drop of water that overflows the cup and leads to ultimate victory. I am not sure that the AI could easily be made to use reserves effectively. Many professional and or experienced human leaders have completely blown their effective use.

                One thing though, if the AI made selective use of reserves and grouped them appropriately some of us players would be in for a rude shock from time to time. And that's the whole idea.
                (\__/)
                (='.'=)
                (")_(") This is Bunny. Copy and paste bunny into your signature to help him gain world domination.

                Comment


                • #38
                  I like the idea of dividing up the military into garrison, expeditionary and reserves. I believe this is doable if it is part of the original design. Again, because the current code is so late into the cycle, weaving a structure like this on top of the existing nest of code might be near impossible.

                  I would include settlers as part of expeditionary, and would sometimes have the AI build more troops before expanding past a certain number of cities. Sometimes the AI would do what it does now, expand without regard for being able to protect their cities, sometimes hold back and wait for an expeditionary force to protect its new cities. Imagine how surprised a human player might be if he/she attacks a newly founded city or a settler and finds a big stack instead of a single unit. Keep the human player guessing and the AI has a better chance.

                  Reserves might be held back to respond if there are threats against certain homeland core cities or if a large percentage (50%?) of the expeditionary force is lost. Sometimes the AI goes into a frenzy and attacks everything in sight. Reserves could also be committed at that time. Reserves are the best use of mobile units, maybe 70% mobile units, 20% bombard, 10% defensive. A more subtle change is to decrease garrisons and increase reserves after railroads. Unfortunately, the infinite movement allowed by railroads makes it harder for the AI to deal with this time period.

                  Comment


                  • #39
                    The AI needs to fortify defensive troops on good defensive terrain near its borders, as well as on resources.

                    Why? Because when I invade the AI, my fast-movers, who are poor on defense, charge straight for the nearest mountain, or failing that a hill. This drastically improves their chances of surviving counterattack (especially knights and cavalry, with their 3 defense). If that terrain were denied me, I'd have more difficulty. In fact, I'd have to use combined arms stacks.

                    When the AI attacks me, do you think I let them get up on moutains next to my cities? Hell, no!

                    Also, I find that it's much too easy to cut off a crucial resource such as iron. There should be a good unit fortified on that Iron mountain. At least that. Actually, to make it really tough, there should be a special mobile reserve to defend such areas, to prevent pillaging of connecting roads. But that's really complicated, I'm sure.

                    The AI also needs to attempt to destroy a strong stack of enemy troops in the field, instead of being scared of it and running right past it to try and capture workers.

                    Just a few thoughts...

                    -Arrian
                    grog want tank...Grog Want Tank... GROG WANT TANK!

                    The trick isn't to break some eggs to make an omelette, it's convincing the eggs to break themselves in order to aspire to omelettehood.

                    Comment


                    • #40
                      Well classical military thought holds that for just about any offensive action you should have three main groups; Main Effort, Diversion Effort, and Reserves.

                      Main effort should get about 50% of your force. Diversion should get about 30%. And reserves should get about 20%.

                      When an AI invades you it should have one main mass with about half of the invasion force. A second smaller mass with about a third. It should hold back one fifth untill at least the second turn of the invasion, and then move that force to where ever you have put most of your troops in response.

                      Instead we have the strung out effect where effectively we keep dealing with 20% of the AI's force over, and over, and over again.

                      The AI should give itself a "target ceiling" of the number of units it should invade you with. This should be fairly easy to code a simple algorithm based upon the size of your army and the number of your cities. It should wait to invade untill it has this target force built AND the whole force is in three stacks. Stack one is the main effort, and is located one square back from the border at the point closest to it's objective (probably a city). Repeat for the Diversion stack. Stack three should be located at a point equadistant from the other two stacks, but back about 5 squares from the border.

                      The three forces then form a rough triangle, with the main effort and diverson forces forming the base roughly along the border, and the reserve at the tip pointing away from the border.

                      The AI then waits till all three stacks are massed, and invades.

                      Now this puts you in an interesting position. You would have one big monster stack smacking into you. At another point you'd have a smaller stack, but too big to ignore. And if you hurt either stack, it gets reinforced.

                      Austin

                      Comment

                      Working...
                      X