[freeciv-ai] Re: (PR#10110) AI underestimates Temples
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10110 >
Mateusz Stefek wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10110 >
>
> I got this feeling by watching a game where AI was building Granaries
> and Aqueducts in cities of size 5, but it never builded a Temple.
> Looking at the AI code I'm conviced that something is wrong:
> Temple:
> case EFT_MAKE_CONTENT:
> if (!government_has_flag(gov, G_NO_UNHAPPY_CITIZENS)) {
> v += pcity->ppl_unhappy[0] * amount;
> v += amount * c;
> }
v += pcity->ppl_unhappy[0] * amount;
This needs to take into account the production of a citizen. See
best_worker_tile_value(). It also needs to check if there are actually
any elvises: it doesn't help to build a temple if one isn't needed, even
if there are some unhappy people. Of course this is hard since you're
not allowed to check SP_ELVIS. So you either have to guess or do a full
recalculation of the city, I think.
However neither of these is possible for "other" cities. But still
there we need to guess at the average bonus, rather than just assuming
it to be 1. Probably you can find an average_tile_value() function
somewhere and use that, or maybe divide it by 2.
> Granary:
> case EFT_GROWTH_FOOD:
> v += c * 4 + 25;
> break;
4 is arbitrary; this should be commented.
+25 is meaningless and bad I think...
jason
- [freeciv-ai] Re: (PR#10110) AI underestimates Temples,
Jason Short <=
- [freeciv-ai] Re: (PR#10110) AI underestimates Temples, Per I. Mathisen, 2004/09/15
- [freeciv-ai] (PR#10110) AI underestimates Temples, Mateusz Stefek, 2004/09/15
- [freeciv-ai] Re: (PR#10110) AI underestimates Temples, Jason Short, 2004/09/15
- [freeciv-ai] Re: (PR#10110) AI underestimates Temples, Marko Lindqvist, 2004/09/15
- [freeciv-ai] Re: (PR#10110) AI underestimates Temples, Jason Short, 2004/09/15
- [freeciv-ai] Re: (PR#10110) AI underestimates Temples, Per I. Mathisen, 2004/09/15
- [freeciv-ai] Re: (PR#10110) AI underestimates Temples, Per I. Mathisen, 2004/09/15
- [freeciv-ai] Re: (PR#10110) AI underestimates Temples, Jason Short, 2004/09/15
- [freeciv-ai] Re: (PR#10110) AI underestimates Temples, Jason Short, 2004/09/15
- [freeciv-ai] Re: (PR#10110) AI underestimates Temples, Marko Lindqvist, 2004/09/15
|
|