Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [Patch] Exploring triremes getting lost (PR#961)
Home

[Freeciv-Dev] Re: [Patch] Exploring triremes getting lost (PR#961)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Exploring triremes getting lost (PR#961)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Mon, 17 Sep 2001 15:09:31 +0100 (BST)

 --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> On Mon, Sep 17, 2001 at 11:41:57AM +0100, Gregory Berkolaiko wrote:
> > Before going into the discussion of code, a general question:
> > what do you think AI should do if it's exploring trireme ventures
> into
> > the open sea and realises that it does not have enough movepoints to
> > reach the destination?
> 
> I have no idea how auto-explore currently work. What do you mean with
> destination? IMHO this case can and should be avoided. Either the
> trireme has to ensure that if it goes through knonw terrain it will
> arrive at a safe place at the end of turn OR it can ensure that after
> a step into unknown terrain it has enough moves left to reach a safe
> position.

Exploring trireme (and other units) work as follows:
1. Looks for huts
2. Looks if it can uncover unknown within one step
   if yes -> do this step -> 2.
3. Look for nearest spot where it can uncover stuff 
   -> go there -> go to 1.

Without patch:
in step 3 trireme chooses any location and goes there. usually dies.

With patch:
in step 3 trireme chooses location X adjacent to land,
attempts to go there along the land, if it is not possible, tries to go
into the sea, if X is too far away then it
-- exits the explorer mode if human controlled.  at this point it has
enough moves to come back to land safely
-- ???? if ai-controlled.

So I am asking for your opinions concerning "????" part.
Coming back to land is a rather complex solution and will produce
infinite loops (can you tell ai to stop exploring?)

In general, it is very hard to judge apriori whether trireme will be able
to reach X safely, or it is too far away.  In my tests this problem
happens rarely: my two triremes explored good half of the world before it
run out of safe things to see.




____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie


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