Complete.Org: Mailing Lists: Archives: freeciv-ai: January 2003:
[freeciv-ai] Re: (PR#2477) Improved Auto-Explore
Home

[freeciv-ai] Re: (PR#2477) Improved Auto-Explore

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: cameron@xxxxxxxxxx
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#2477) Improved Auto-Explore
From: "Gregory Berkolaiko via RT" <rt@xxxxxxxxxxxxxx>
Date: Tue, 28 Jan 2003 11:23:59 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Hi Cameron,

On Sun, 26 Jan 2003, Cameron Morland via RT wrote:

> Arg. I forgot that I was experimenting with disabling Part 1 (which
> seems to not degrade performance at all). In this patch I removed part 1
> properly, ie not with `#if`, and renumbered the rest.
> 
> This should decrease the computational cost, since we never need to
> calculate a warmap for explorers, unless we are heading towards a
> non-adjacent tile. Because huts are so highly valued by the
> explorer_desirable function, we will still always explore them.
> 
> The only exception to this is if there are two huts visible on the first
> turn, or if two huts become visible on the same turn; the explorer will
> pick one, and won't necessarily get to the other one quickly. This is
> extremely rare, and generating warmaps is rather expensive.

Also, if one hut is visible but more than 1 step away and there is 
unexplored terrain right under our noses, we will go for the unexplored, 
right?  Which is rather significant change of behaviour but I think we can 
still do it and then see if players complain ;)

Now, I found one mistake and have some questions.

1. Using trireme_loss_pct in explorer desirable could be cheating.  I
think you mentioned it earlier.  I take it you don't want to fix it in
this pass?

2. In the first loop in ai_manage_explorer, when you declare int 
most_desirable, you give a slightly dodgy comment.  int is not a tile, 
it's the value of the most valueable tile.

3. This one is an artefact from using amortize:
  desirable = pow(..., ...)
--- it should be *=  (ok, I conceed to using pow :(  )

4. A well-wisher suggested that maybe the return value of likely_ocean be 
used like a weight rather than bool, like this:
  desirable += ocean * ocean_score + (100-ocean) * land_score;

5. With Per's fix for 2631 in, maybe we can stop idling explorer?  If the 
answer is yes, we can do it in a separate patch, but you have to promise 
to make it! ;)

G.


P.S.  I hope you are not getting frustrated by the slow pace of things.  
We all would like you to continue contributing.




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