Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [PATCH] aiunit.c ai_military_findvictim() cleanup (PR#
Home

[Freeciv-Dev] Re: [PATCH] aiunit.c ai_military_findvictim() cleanup (PR#

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, Petr Baudis <pasky@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] aiunit.c ai_military_findvictim() cleanup (PR#1264)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Wed, 20 Feb 2002 05:15:28 -0800 (PST)

--- Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> wrote:
>  --- Raahul Kumar <raahul_da_man@xxxxxxxxx> wrote: 
> > 
> > --- Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> wrote:
> > 
> > > I suspect the idea of patt is to force punit to attack a stack of units
> > > if they are endangering punit, even if they are not that weak...
> > 
> > So this is the reason that the ai makes senseless attacks. Any change of
> > convincing the AI not to attack veteran fortified mech inf on mountains any
> > time soon ?
> 
> what can I say,
> have a look at the function, see if you can improve it.

I did. Yuck! I have no idea why these nos are multiplied together, and frankly
I'm much more inclined to a statistical approach.

If the chance of winning a battle is greater than 50 % attack, with modifiers
if the unit is outnumbered etc.

> 
> If you give me a savegame with AI attacking fortified mech on a mountain, I
> will also have a go.
> 

OK, I'll post a savegame soon. In the meantime, for your own amusement park
a veteran mech inf in front of an AI city(explorer etc all work well) that has
mountain squares nearby. Watch the ai waste units. For more ai fun, park a
mech inf in a chokepoint, where the AI has not expanded to yet.

> > > How about writing a separate function 
> > > > > consider_pillaging(x, y, punit) ?
> > > > > in general, not only barbarians should pillage.
> > > > 
> > > > Is it used anywhere else?
> > > 
> > > could be but I don't think so.
> > > but it shouldn't stop you IMO
> > 
> > Making AI units pillage roads and railroads could be a very bad idea. The
> AI
> > might never succeed in taking cities if it pillages roads/railroads along
> > the way.
> 
> You are right.  But I was thinking more about mines and irrigation.
> 

Probably only when the AI does not have enough units to take a city. I never
pillage city squares, I like to turn their cities into mine.

> > > I think we should make many small functions with good names, like
> > > consider_defending_town, consider_pillaging, consider_hut_poaching and
> > > has_passangers.
> > 
> > I think you meant has_passengers.
> 
> yep.
> 
> > > Somehow I like it more.  Don't really know why.
> > > BTW, there is still one apetency lurking...
> > > 
> > 
> > Apetency?
> 
> Yes, it is a little green animal, mostly harmless but can cause
> misunderstanding (just like now) ;)
> It was lurking in Petr's patch...
> 

I see ;).
> G.
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com


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