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: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Cache win_chance in get_defender(attacker) (PR#1269)
From: Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx>
Date: Fri, 22 Feb 2002 17:37:21 -0600

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".
-- 
Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
"And they said work hard, and die suddenly, because it's fun."
        -Robyn Hitchcock.


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