[Freeciv-Dev] Re: [Bug][RFC] Stupid attack behaviour by AI (PR#1340)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx> wrote:
> At 08:56 PM 02/03/23 -0800, Raahul Kumar wrote:
> >--- "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx> wrote:
> >> On Sat, 23 Mar 2002, Gregory Berkolaiko wrote:
> >> > Raahul Kumar drew my attention to this phenomenon: if you park your,
> >> > phalanx on a wee mountain outside an AI city then from time to time the
> >> > city's gates will burst open and AI will attack you with few phalanxes
> >> > similarly inefficient units. Seemingly without any real desire to kill
> >> you...
> >> ...
> >> > because reinforcements are counted in the attack but _not_ counted in
> >> > loss.
> >> >
> >> > So what happens is:
> >> > AI accumulates quite a few defensive units.
> >> Why on Earth does the AI build and attack with _defensive_ units?
> >This is quite a vicious cycle. The answer is in three phases:
> >The AI system of what to build is prioritised in favour of military units,
> and further weighted to favour defensive units first. It also checks the
> nearness of enemy units and that phalanx on a mountain outside the city is
> very near.
> >Rather than build attacking units the AI builds defensive units because it
> believes that single phalanx will take out 3+ phalanx behind city walls.
> is a bug right here. Having enemy units outside the city leads the AI to
> *ALWAYS* build defensive units.
> It is not too difficult to phase over from defence to attack by tweaking
> the danger calculations. After a couple defenders have been built it should
> start producing attack units. It should not attack with the last one or
> two defenders (for bigger cities) unless the battle odds are really in its
> favour. I played with this a bit if you take a look.
Well if you want me to take a look there are two things you could do
1.) Post a link to the latest corecleanups
2.) Split the ai parts away from the rest and post them to freeciv-dev. Petr,
you were working on this last I heard?
I wonder if you also considered the benefits of making every city build at
one great attacking unit. I often build for example catapault
after my two defensive units, just for the ability to take out enemy units next
to my city.
> These parameters are sensitive (== somewhat chaotic), but it is doable :-).
> >There is also a bug in win/loss equation. As Greg described it, the AI
> wrongly thinks it can destroy a fortified phalanx with four attacking
phalanx. > The cost to it is far higher than my loss.
> Actually, there are other effects than pure combat weights at play here.
> It is really dangerous to allow an enemy to keep a fortified defender
> next to one of your cities. It can protect a series of attackers and
> result in city loss which can be infinitely more damaging than a few
> phalanxes. A purely combat odds AI will lose badly against opponents
> that understand some of the more sophisticated advantages/weights.
> But, the AI should still improve on its (apparently) sole takeout
> strategy in this case :-).
> BTW: can it do a diplomatic buyout yet? This should be an obvious
> enhancement to deal with single pesky enemy units.
You know there is no diplomacy code as such. The AI only uses diplomats in
cities, it does not use diplos to buy/steal tech/sabotage. Once the AI has
built a diplomat, it just sits there. Per is working on this at the moment.
Welcome back by the way.
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®