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: rf13@xxxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Exploring triremes getting lost (PR#961)
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Mon, 17 Sep 2001 23:36:45 -0400

Computers are so anal abot these things :-).

I use a pattern of moving out one square from land, checking
for a fish, or sliver of land in all the seaward directions
to see if it is safe to continue, and then moving "along" the 
coastline into squares with the maximum number of unknown 
borders if not. The last move then returns me to a known coast.

In a warmap sense, squares need to be identified by how far 
they are from any known coast. You can only ever move to a 
square if your remaining move count is less than this.
Otherwise the normal AI head for the black is perfectly ok.
If it can't ever get someplace because it violates this rule
then it will never generate the path and never try. If all
its paths to get somewhere useful are blocked, you don't care
anymore - let it wander in little circles, or go home.

Of course aifuzzy may periodically foul this up.

The next refinement to this is to attempt "Columbus" moves
by heading directly out from land into the "most" far away
tiles. Then you run back if you haven't seen anything and 
are still alive. You start doing this only when your triemes
learn second stage floatation, and you have nothing better
to do, want to find other civs, or more land. A few of 
these can add a lot of "bad" spots to your warmap. Should 
not be done with loaded triremes.

If you are still isolated and haven't bothered to get a 
sailboat, then do double Columbus moves into the remaining
black. These are almost sure death, and not much useful if
you can't find a shorter route back, but the trireme can
explore the other side. It is sometimes useful to take 
along a diplomat, or explorer on these one-way trips.

Cheers,
RossW
=====

At 03:09 PM 01/09/17 +0100, Gregory Berkolaiko wrote:
>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]