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 15:02:00 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

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.

> Possibilities (ascending in code complexity):
> 1. Panic (go in random direction).
> 2. Push on to the destination.
> 3. Come back to shore (danger of infinite loops here).
> 
> Right now it does 2.
> 
> --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> > On Sun, Sep 16, 2001 at 12:38:21PM -0700, Gregory Berkolaiko wrote:
> [..]
> > > -- I also did little cleaning up in gotohand.c.  Sorry if it confuses
> > > those few who'll be reading the patch.
> > 
> > It would be nice if you can seperate this.
> 
> mmm, I will try :(

The s/k/dir/ and *_iterate changes.

> > It also looks like you have some knowledge about how the methods
> > work. Can you add some comments to the code?
> 
> I managed to decipher the sailing part, and yes I roughly know what
> unknown variable does.  So I can put in a limited number of comments.

This would be good.

> > I don't understand why you use two square_iterate here? If (x,y) is
> > known and (x,y) is a coastline ocean tile this method return 1. What
> > other cases do you try to handle?
> 
> when (x,y) is not known and very few tiles around it are known.
> an example: 
> nothing within radius 1 of (x,y) is known,
> (x+1,y) is a land tile
> (x+2,y) is known
> 
> then on the left side of the (x+2,y) graphic tile you will see a narrow
> strip of land and will be able to conclude that (x+1,y) is land and
> therefore (x,y) is either land or near land.

Ok.

> maybe my naming is bad, maybe my programming is...

No it is my slow perception and my laziness ;)

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "It is not yet possible to change operating system by writing
  to /proc/sys/kernel/ostype."              sysctl(2) man page


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