I don't see how 'traits-set' thinking would work without becoming an unmaintainable mess in a ruleset, so I'd go by 'xxx_default' route as in attached patch. Even that has quite complex (from the user point of view) rules what is the 'default' value when different values are not explicitly defined ('default' for nation 'default' is global 'default' unless nation has set either 'min' or 'max' invalidating the global 'default', in which case national midpoint is used)

> I think we need to make this even more complex by giving the
> ruleset author control over the "fixed" value used when
> "random" from the range is not chosen.

I feared that.

Two possible ways (both affecting d3f) with different future expandability:

New optional 'expansionist_default' in ruleset

Server option selects whether this is used or uniform probability distribution between min-max, ignoring 'default' (future option values could use different probability distributions, possibly taking midpoint into account)

Allow a ruleset-defined set of min/max pairs, set one to min=max='midpoint' in supplied rulesets

Server option chooses which is used (a bit like 'nationset')

> I'm not sure if trait ranges in experimental are identical to
> those in variant2, but the latter values have been used in one
> real game, second one currently running.

I'm afraid choosing _min and _max values for the ruleset would get extra complicated if one has to also consider what the "midpoint" will then be for the default mode. Effects of the trait value are not always linear, or the sensible variation is mostly to one direction from the sensible default.
So I think we need to make this even more complex by giving the ruleset author control over the "fixed" value used when "random" from the range is not chosen. But fortunately we can make ruleset based definition of that optional, going by the midpoint of the range by default.

I'm not sure if trait ranges in experimental are identical to those in variant2, but the latter values have been used in one real game, second one currently running.

I'd still like to do this, but I'm still blocked by knowing whether there are trait values that make enough difference to be noticeable without rendering the AI useless; and whether random combinations of off-normal traits would be bad.

I don't think I can form an opinion based on autogame testing. Does anyone (cazfi?) have enough experience with non-default trait values to advise?

Otherwise I guess I can make some random guesses at trait ranges (perhaps the ones already in experimental) and supply a health warning. I wouldn't have any supplied ruleset with a trait range have this option enabled by default (except experimental).

> I don't know if allowing all traits to vary over a wide enough
> range to notice simultaneously will produce uselessly weak or
> strong or otherwise unbalanced / un-fun AIs.

Experimental ruleset now has such properties (as of patch #5226).
Does anyone yet know if the resulting AIs are generally competent enough to consider this as an option for more mainstream rulesets? (And/or whether the effect is noticeable?)

I think it's a shame that AI traits aren't accessible in standard rulesets. However, I think it's right that our standard nations shouldn't be given different traits, and that players should be able to play AIs with identical predictable personalities, as before.

A server setting that affected how a trait is chosen between trait_*_{min,max) would allow this.

We could give all nations a range of possible personalities in e.g. classic/nations.ruleset [default_traits]; by default the server would choose the midpoint, giving today's behaviour, but players could opt in to random choice between {min,max}. Rulesets that want randomness could set or force this setting (e.g. alien would want to do this to retain today's trunk behaviour).

An enumerated setting choosing "random" and "midpoint" behaviour is probably sufficient. More options (probably overkill): choice of probability distributions (e.g. max, min, normal distribution); a numeric parameter that ranges from a delta function to a flat probability distribution, with something like a bell curve in between.

I don't know if this fits cazfi's design for traits. In particular, I don't know if allowing all traits to vary over a wide enough range to notice simultaneously will produce uselessly weak or strong or otherwise unbalanced / un-fun AIs. If so we might need another layer of indirection: a list of hand-crafted "personalities" consisting of carefully chosen trait values / ranges, plus a specification that nations choose a specific personality or a random one.

Copyright (C) 2004-2006, the Gna! people. Posted items are owned by whoever posted them.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.