Complete.Org: Mailing Lists: Archives: freeciv-dev: May 1999:
Re: [Freeciv-Dev] Settler AI optimization.
Home

Re: [Freeciv-Dev] Settler AI optimization.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: leth@xxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Settler AI optimization.
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Thu, 20 May 1999 09:06:43 +1000

Claus Leth Gregersen wrote:

> So identically to the initial
> continental numbering it might be a good idea to number the railroad nets.

Ha!  I had this exact same idea just the other day.  Though actually
I was thinking more in terms of improving goto, and I hadn't thought 
it through as much as you have.  

> III) An even smarter implementation will every time there is made a new
> piece of railroad look at it's neighbour tiles, there is 3 situations:
> 1) It's adjacent to no railroad nets, we assign it an unused "railnet
> number"
> 
> 2) It touches 1 and just 1 net, we will assign this tile the "railnet
> number" of the net it touches.
> 
> 3) it is adjacent to more than 1 net, give this tile the lowest of the
> different "railnet numbers" that it's is attached to, and change the number
> of the adjacent nets to the number of the lowest of the adjacent nets. (this
> can be done with a simply floodfilling exactly as the continent
> calculations)

Yep, something like the above is currently done for approximate
continent numbering in the client (according to imperfect client 
knowledge, as more and more squares become known).

> Unfortunately when game is saved/restored you'll need to perform I) or II)
> to restore the railnets.

No big deal, I think.

But as you mentioned, ZOC effects and the details of moving between 
nets are where things get more complicated...

> But i think the idea is pretty neat, and it would be quite funny to code.

Agreed.

-- David

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