Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149)
Home

[Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149)
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Sun, 23 Dec 2001 13:49:59 -0500

At 05:46 PM 01/12/22 -0800, Raahul Kumar wrote:
>
>--- "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx> wrote:
>> At 02:34 AM 01/12/22 -0800, you wrote:
>> >--- "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx> wrote:
>> >> At 02:03 PM 01/12/20 +0100, Petr Baudis wrote:
>> >> >Dear diary, on Thu, Dec 20, 2001 at 12:42:28PM CET, I got a letter,
>> >> >where Raahul Kumar <raahul_da_man@xxxxxxxxx> told me, that...
>> >> 
>> >> >> I wish someone would speak up as to why 16 is a good number for sad
>> value.
>> >> >> > +#define SADVAL 16
>> >> >Nice wish :-). Ross? Ben?
>> >> 
>> >> Almost certainly a heuristic from play testing.
[...]
>> >Explain this a bit more. If I understand you correctly, this is yet
another
>> >weighting. Presumably it should be in the range (0-100) but as always
>> although
>> >it never goes down below 0, it seems it can exceed 100. What does
values of
>> >for example
>> >
>> >7 * 16 mean?
>> 
>> Whatever you want it to ...
[...]
>> The end target is always a [0-100 or critical] weight. There may be
>> all sorts of intermediate heuristics or effects folded in, of which
>> this may just be a part (hence [0-100] is not meaningful). Then he
>> playtested ad nauseum adjusting the heuristics so game events occurred
>> in ways that pleased him. This might mean he preferred a Temple over
>> a Harbour, and therefore the Temple heuristic got bumped or the Harbour
>> dropped in some obscure parameterized effect.
>> 
>> The individual details are pretty much meaningless, it is the combined
>> effect that makes the game play the way it does. Thus if you change
>> something it can have lots of side effects, and you need to run client
>> autogames with several faction windows and watch for bad choices, then
>> go back and readjust to correct these.
[...]
>Thanks for the info Ross. I think I failed to explain why the figure 
>of 
>
>7 * 16 = 112 
>
>is particularly important in the unahappiness case. Normally, a figure of
>greater than 100 means buy right now. But if a city is in disorder, you
>cannot buy anything. So what is the correct behaviour?

You need to track down all users of this routine to see what they do
with the value. It may be directly stuck into a "choice" in which case
it is a weight, and 7 unhappies will result in a critical request. But
it may just be used in some other intricate and initially totally baffling
computation. It is best if such things always reflect a standard weight
and baffling computations be taught to understand this because then you 
can then use these return (sub-)computations consistently everywhere.
This is the sort of cleanup that would really help.

I think some rush buys are still possible under disorder. If not this
is a deviation from the real Civ rulles which still allow you to buy 
pacifier items under disorder.

But even if not, the choice could get set as the current building task
which should mean that when the AI recovers from unhappiness this will
hopefully be the first thing it does.

>__________________________________________________
>Do You Yahoo!?
>Send your FREE holiday greetings online!
>http://greetings.yahoo.com

Cheers,
RossW
=====




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