Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2004:
[freeciv-ai] Re: (PR#10110) AI underestimates Temples
Home

[freeciv-ai] Re: (PR#10110) AI underestimates Temples

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mstefek@xxxxxxxxx
Subject: [freeciv-ai] Re: (PR#10110) AI underestimates Temples
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 16 Sep 2004 05:30:43 -0700
Reply-to: rt@xxxxxxxxxxx

<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




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