Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: agents, tiles, recycled IDs
Home

[Freeciv-Dev] Re: agents, tiles, recycled IDs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: nikodimka <nikodimka@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: agents, tiles, recycled IDs
From: Raimar Falke <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Mon, 20 Oct 2003 18:03:51 +0200

On Thu, Aug 21, 2003 at 02:58:06PM -0700, nikodimka wrote:
> 
> Hello
> 
> During the development of puppetter interface
> I came to the following questions I'd be happy to find answers for:
> 
> 1) Easy one:
>    Is there a guaranty that unit/city IDs never recycled?
>    I mean can I assume that if for example a unit has been killed
>    its id will never be used again in the same game?

That is a good question. I don't know the answer because if a
unit/city is killed you get a notify and can remove your data about
the object.

> 2) Are there any plans on extending agents interface to react
>    on map tiles as it reacts on units and cities?

No. But if you need them, just add them. I would accept such a patch.

> 3) It would be usefull when getting notification on unit change
>    to access the old state of the unit. 
>    So agents can easily determine which of unit fields have changed.
>    With no access to the old state the only possibility for agent to 
>    figure out changes is to keep track of all available units.
>    I have already asked the question at freeciv-ai@ but unfortunately got no 
> answer. :(

I also thought about this problem and my solution was an
agent. Surprise surprise. This means that there an agent which tracks
all changes and provides the other agents with a history. Think of it
as an historian. So this history agent (HA) can answer such questions
like "what was the previous state of this object?", "how did this unit
changed?", "what is known about the enemy city at tile (3,4)?", "what
is known about enemy units on this island?", "what unit types does
enemy player foobar controls?".

No code was written for this history agent yet.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "From what I am reading Win98 and NT5.0 will be getting rid of all that
  crap anyway. Seems that Microsoft has invented something called TCP/IP and
  another really revolutionary concept called DNS that eliminates the
  netbios crap too. All that arping from browsers is going to go away.
  I also hear rumors that they are on the verge of breakthrough discoveries
  called NFS, and LPD too. Given enough time and money, they might
  eventually invent Unix."
    -- George Bonser in linux-kernel


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