[Freeciv-Dev] Re: (PR#18237) ai.ruleset
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
2006-07-02 scripsit Per I. Mathisen :
>
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=18237 >
>
> On Sun, 2 Jul 2006, Marko Lindqvist wrote:
> > AI code has lots of constant factors that make it work well under
> > default rules, but badly if some critical rule is changed. It does not
> > scale well rulewise.
> > To make AI code scale well to different rulesets is almost impossible
> > with our manpower and such an AI would be quite CPU hog.
> > Instead I would like to handle some of the scaling work to ruleset
> > authors. I'd like to introduce ai.ruleset, which contains some of the AI
> > parameters.
> > Additional advantage of such ruleset would be that users could change
> > AI behaviour even if rules otherwise stay. Those wanting largepox AI
> > would set city founder want lower and building want higher.
> >
> > Oh, since it does not contain actual rules, ai.ruleset might be bad
> > name. How about ai.parameters instead?
>
> I agree with your general assessment.
>
> How about putting this in the script.lua file? Scenario authors very
> likely will wish to change AI behaviour depending on the situation anyway.
> We could add lua API functions to change the AI parameters. There could
> also be a lua function to report what difficulty setting we are in, and
> then we could move all AI difficulty code out from the server and into the
> lua script.
I have a patch (which, since a few days, seems to work; I will send it
as soon as it is updated to last SVN revision) that replaces the
rulesets with lua files. In this way it would be convenient to someday
write, at least, significant parts of the AI using LUA; this would
probably make it easier for ruleset authors to write (in LUA) the AI
adapted to their rulesets, and would lower the pressure on C writers.
|
|