Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Re: (PR#3646) freeciv-ai ai_military_findvictim
Home

[Freeciv-Dev] Re: (PR#3646) freeciv-ai ai_military_findvictim

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#3646) freeciv-ai ai_military_findvictim
From: "ue80@xxxxxxxxxxxxxxxxxxxxx" <ue80@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 7 Mar 2003 05:21:17 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, Mar 07, 2003 at 05:06:04AM -0800, Gregory Berkolaiko wrote:
> 
> On Fri, 7 Mar 2003, ue80@xxxxxxxxxxxxxxxxxxxxx wrote:
> 
> > Hi,
> > 
> > in ai_military_findvictim(
> > 
> >   /* Ferryboats with passengers do not attack. */
> >   if (punit->ai.passenger > 0) {
> >     return 0;
> >   }
> > 
> > why that? Attacking with caravels and fregattes is better than getting
> > attacked by the same unit.
> 
> For simplicity.  But you are welcome to write a patch which should figure 
> the cost of the passangers into the cost of the unit and then into the 
> kill_desire equation.

An idea was in my serverside autoattack code. Value you destroy > Value
you lose. Both weighted with probabilities.
And both for attacking/defending case.

The value can be the unit value or something else. But not attacking a
transport loaded with 8 howitzers with a fregatte with 1 warrior on it,
shouldn't be excluded.

> > And even attacking a caravel with a trireme is better than getting
> > attacked. Ok perhaps we should try to unload first, but thats not a good
> > idea in every case.
> > 
> > With that restriction the normal playerattack case isn't possible:
> > Move a fregatte with a horsemen near to an enemy city, kill the defender
> > (lets say its an horsemen), unload the horsemen, enter the city.
> 
> How about move a frigate to a city, unload the horsemen, attack city with 
> frigate, enter city with horsemen?  You method is better in presence of 
> autoattack though.  Mind you, present AI can do neither (at least 
> "intentionally")

With autoattack you "never" get that city. 
But would be that other case, try to unload your transport and attack
after that.

> > Something else:
> > /*************************************************************************
> > This function looks at tiles adjacent to the unit in order to find
> > something
> 
> It says "this function".  There are other functions :)

Which?

I've seen mech-infs with full movepoints moving away from an empty city 
with distance 2. Same in many other cases, i don't have a savegame to
show that, but think i will create one soon.
1 for every case:
Horse, Musketeer (on rail), alpine, para, Heli.

Thomas
-- 
Thomas Strub  ***  eMail ue80@xxxxxxxxxxxxxxxxxxxxx
Wenn Du nicht programmieren kannst und Dir für Arbeit zu schade bist:
Werde Berater, Analyst oder organisiere Kongresse.



[Prev in Thread] Current Thread [Next in Thread]