Re: (PR#10110) AI underestimates Temples

"Per I. Mathisen" <per-0/[email protected]>
Newsgroups gmane.games.freeciv.ai
Message-ID <[email protected]>
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10110 >

On Thu, 16 Sep 2004, Mateusz Stefek wrote:
> This evaluation seems to work correctly:
> 	case EFT_MAKE_CONTENT:
> 	  if (!government_has_flag(gov, G_NO_UNHAPPY_CITIZENS)) {
>             int a = MIN(pcity->ppl_unhappy[4] +
> pcity->specialists[SP_ELVIS], amount);
> 	    v += a * a * 2;
> 	    v += amount * c;
> 	  }

Thanks, will look at it.

> Another problem is that AI doesn't reassign workers when it finish
> building an improvement (This is a serious bug).

When? If you mean in want calculations, then yes, this is a limitation.
Running CM to rearrange workers just takes too long. This is what I did in
my first AI effects code, and there just was no way to speed it up
properly.

I am working on a different solution (a greedy worker allocation
algorithm) that should be extremely fast and can be used for this purpose.
It will not be finished in time for release, however, unless someone else
want to take over writing it. If so, I can post the pseudo-code design.

  - Per
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.