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: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Exploring triremes getting lost (PR#961)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Sep 2001 16:49:55 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Sep 17, 2001 at 03:09:31PM +0100, Gregory Berkolaiko wrote:
>  --- 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.

IMHO an ideal solution would be to have a new GOTO_MOVE_TRIEME
goto_move_restriction.Then it could be checked in the
whole_map_iterate(x1, y1) of part 3 of ai_manage_explorer if there is
a valid path to (x1, y1).

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Just because you put a flag on the moon doesn't make it yours, it just
  puts a hole in the moon."


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