patchFreeciv - Patches: patch #5028, Server setting for random trait...

 
 
Show feedback again

patch #5028: Server setting for random trait selection

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat 09 Aug 2014 05:05:32 PM UTC  
 
Category: generalPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.6.0, 3.0.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 01 Nov 2015 11:19:43 AM UTC, comment #9:

> I think it's a shame that AI traits aren't accessible in
> standard rulesets.

-> patch #6516

> Sounds like we should adopt the playtested values?

-> patch #6515

Jacob Nevins <jtn>
Project Administrator
Sat 31 Oct 2015 06:37:52 PM UTC, SVN revision 30331:

Added server setting 'traitdistribution'.

Requested by Jacob Nevins

See patch #5028

(Browse SVN revision 30331)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 31 Oct 2015 06:37:35 PM UTC, SVN revision 30330:

Added server setting 'traitdistribution'.

Requested by Jacob Nevins

See patch #5028

(Browse SVN revision 30330)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri 30 Oct 2015 09:25:21 AM UTC, comment #6:

> I don't see how 'traits-set' thinking would work without
> becoming an unmaintainable mess in a ruleset

Yes, fair enough.

> Even ['xxx_default'] has quite complex rules what is the
> 'default' value when different values are not explicitly defined

True. Your solution in the patch looks reasonable.

> Would this suffice?

Looks good to me. Thanks!

Jacob Nevins <jtn>
Project Administrator
Sun 25 Oct 2015 03:00:36 PM UTC, comment #5:

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)

Would this suffice?

(file #25439)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 20 Oct 2015 10:31:15 PM UTC, comment #4:

> 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.

They're not the same.

Sounds like we should adopt the playtested values?

Jacob Nevins <jtn>
Project Administrator
Tue 20 Oct 2015 07:50:56 PM UTC, comment #3:

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.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 12 Oct 2015 10:22:05 PM UTC, comment #2:

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).

Jacob Nevins <jtn>
Project Administrator
Sun 05 Oct 2014 01:19:37 PM UTC, comment #1:

> 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?)

Jacob Nevins <jtn>
Project Administrator
Sat 09 Aug 2014 05:05:32 PM UTC, original submission:

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.

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #25439:  TraitDistMode.patch added by cazfi (13kB - text/plain-diff)

 

Depends on the following items: None found

Digest:
   task dependencies, patch dependencies.

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 01 Nov 2015 11:18:34 AM UTCjtnDependencies-=>patch #6516 is dependent
    Sat 31 Oct 2015 06:38:07 PM UTCcazfiStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Sun 25 Oct 2015 03:00:36 PM UTCcazfiAttached File-=>Added TraitDistMode.patch, #25439
      StatusIn Progress=>Ready For Test
    Fri 23 Oct 2015 07:31:31 PM UTCcazfiCategoryNone=>general
      StatusNone=>In Progress
      Assigned toNone=>cazfi
      Planned Release2.6.0=>2.6.0, 3.0.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup