Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: Cache win_chance in get_defender(attacker) (PR#1269)
Home

[Freeciv-Dev] Re: Cache win_chance in get_defender(attacker) (PR#1269)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx>
Cc: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Cache win_chance in get_defender(attacker) (PR#1269)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 23 Feb 2002 00:31:04 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Fri, Feb 22, 2002 at 05:37:21PM -0600, Tony Stuckey wrote:
> On Fri, Feb 22, 2002 at 11:00:45PM +0100, Raimar Falke wrote:
> > To be honest I'm looking into the future and consider how to implement
> > agents which perform military actions. And what I see in the current
> > AI code doesn't make me happy. There are similar functions which are
> > "simple", "total", "virtual" and which return "power" or a
> > "rating". If I will do a miliary agent I'm sure to try to avoid very
> > hard.
> > 
> > Based on my current knowledge I would say there are at least the
> > following cases:
> >  - real unit vs a real tile (a unit considers attacking a tile, the
> >  tile don't need to be adjacent)
> >  - virtual unit vs real tile (a city considers building/buying a unit
> >  and want to know how good this will be against the current enemy
> >  units in sight)
> >  - real tile with a virtual unit vs the surrounding area (the agents
> >  searches the savest place for a unit)
> > 
> > There may be other cases. The function for each case have to answer:
> >  - how are my chances of success
> >  - what happens if I win (which units gets destroys, city captured)
> >  - what happens if I loose (which units gets destroys, city captured)
> 
>       Creating and gathering all of this information at the unit level
> seems wrong to me.  I would expect a map-style structure with this
> information.

>       We need to have the unit-versus-tile functions in both real and
> virtual forms to build the map, but I would expect that the AI player as a
> whole has some notion of "greatest threat".  If the AI knows that 17 enemy
> offensive units are northwest of Athens, fragile nonmilitary units would be
> given a movement bias to the southeast, and steps would be taken with any
> excess defensive or offensive units to move northwest into the upcoming
> battle.  Or the AI would give up and declare peace/alliance rather than
> lose the city.  Or something.  The current AI really does none of this.
> It would continue to build defensive units in Athens, waste them in poor
> autoattacks when the enemy units move adjacent, and lose the city without
> a second thought.  And we all know what the AI thinks of "Peace".

All very nice but this is IMHO another layer. IMHO we have
(lower)  unit-vs-unit                [ currently handled by combat.c ]
         unit-vs-stack, unit-vs-tile [ current server AI tries to
                                       approximate this in various
                                       code parts. This is IMHO the
                                       first which should also be
                                       placed (with a good interface)
                                       in combat.c]
         area-vs-unit
(higher) unit-group-vs-area

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  The Software is not designed or licensed for use in on-line control
  equipment in hazardous environments, such as operation of nuclear
  facilities, aircraft navigation or control, or direct life support
  machines. 
    -- Java Compiler Compiler Download and License Agreement


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