[freeciv-ai] Re: Questions on Advdomestic.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 02:01 AM 02/09/21 +0200, Jordi Negrevernis i Font wrote:
>
> In function 'ai_eval_buildings' there are some diferencies in
>dealing with shield bonus improvements:
>
>294 needpower = (city_got_building(pcity, B_MFG) ? 2 :
>295 (city_got_building(pcity, B_FACTORY) ? 1 : 0));
I don't have too much problem with this - it basically returns the
relative shield multiplier you get for power improvements. The "0"
acting as a gating parameter isn't unreasonable either.
>400 if (could_build_improvement(pcity, B_FACTORY))
>401 values[B_FACTORY] = (prod/2) + pollution_benefit(pplayer, pcity,
>B_FACTORY);
Pollution_benefit should never completely remove the incentive for
B_FACTORY in a base state, but if global_warming is high, then this
should be cutoff. There might be some tweaking needed here, but a
printout of the relative weights oveer a game might be useful to decide
just what is out-of-balance.
>411 if (could_build_improvement(pcity, B_HYDRO) &&
>!built_elsewhere(pcity, B_HOOVER))
>412 values[B_HYDRO] = ((needpower * prod)/4) +
>pollution_benefit(pplayer, pcity, B_HYDRO);
>
>421 if (could_build_improvement(pcity, B_MFG))
>422 values[B_MFG] = ((city_got_building(pcity, B_HYDRO) ||
>423 city_got_building(pcity, B_NUCLEAR) ||
>424 city_got_building(pcity, B_POWER) ||
>425 city_affected_by_wonder(pcity, B_HOOVER)) ?
>426 (prod * 3)/4 : prod/2) +
>427 pollution_benefit(pplayer, pcity, B_MFG);
Same thing here.
>429 if (could_build_improvement(pcity, B_NUCLEAR))
>430 values[B_NUCLEAR] = ((needpower * prod)/4) +
>pollution_benefit(pplayer, pcity, B_NUCLEAR);
>
>494 if (could_build_improvement(pcity, B_RECYCLING))
>495 values[B_RECYCLING] = pollution_benefit(pplayer, pcity,
>B_RECYCLING);
>
> This makes a city with high production without HooverDam begin
>building factory if it does not generate polution. But if it generates
>polution it will not build the factory...
I think the magnitude of the pollution effect governs this, not just
the presence of it, plus global-warming state is a factor.
> But will not build the hydroplant or nuclear plant because you don't
>have the factory or manufacturing plant!!!!!
This is correct - they have no value unless there is a Factory or
Mfg Plant and cost money to maintain so this is a bad thing to do.
One also wants to build the Factory/Mfg Plant first to reduce the
time to build the Power improvement and hopefully delay long enough
that a better one than Power Plant is available.
> I say to build happyly factory when you have nuclear plant, hydro
>plant or Hoover Damm.
It should. I haven't seen it not do this under the right conditions.
These are all weighted decisions against other improvement projects.
The weights are not always reasonable, but usually pretty good. There
is always ongoing work to improve things by adjusting for various
game state and effects.
> I don't remember to see a factory or mfgplant on an invaded ai city
>with high production... i think this will make the ai stronger.
Also, after invasion, *especially* in larger cities you lose a lot of
improvements with the most expensive being hit at higher probability.
Use your diplomats to check the improvement list before invasion.
Manufacturing plants really only become useful when you are into the
space or Wonder race and are very costly to get setup. You can build
an awful lot of armour units in the time it takes to get a Mfg Plant
up and running and thus it is not clear if it is a benefit - you might
be dead first.
Cheers,
RossW
=====
|
|