patchFreeciv - Patches: patch #3321, Server option to change default AI...

 
 
Show feedback again

patch #3321: Server option to change default AI type

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Fri 15 Jun 2012 10:39:04 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: 

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 05 Oct 2014 01:49:32 PM UTC, comment #7:

Doesn't seem any more urgent in 2.5 than it was in 2.4. Removing release target.

Jacob Nevins <jtn>
Project Administrator
Wed 06 Feb 2013 10:41:51 PM UTC, comment #6:

> So far the (partly implemented) plan has been to make default AI configure option.

(This has happened for 2.5.x in patch #3666.)

Jacob Nevins <jtn>
Project Administrator
Sat 16 Jun 2012 10:23:37 PM UTC, comment #5:

> Is it likely to make it into 2.4.x?


I think ai module building system is currently in nice stable state in S2_4. I'm not going to develop it with S2_4 in mind, but if backporting turns out to be trivial once it has been finished for TRUNK...

Marko Lindqvist <cazfi>
Project Administrator
Sat 16 Jun 2012 01:10:15 PM UTC, comment #4:

> So far the (partly implemented) plan has been to make default
> AI configure option. At least when new ai type is part of
> freeciv tree, you are reconfiguring to build it anyway.

Hm, true. That would probably suffice for AI developers. Is it likely to make it into 2.4.x?

Jacob Nevins <jtn>
Project Administrator
Fri 15 Jun 2012 11:06:52 PM UTC, comment #3:

> I'm not sure it's possible to change type after player creation


It's not possible as there's ai type specific structures about players, cities, and units. It's assumed (and that's hard to reliably change) that values for current ai type are correct. That's not true if data about another ai type, and not current one, has been maintained.
Arbitrary example: AI type wants to track how reliable other players are so it stores information to its private player structure about any pacts broken by other players. This works when player is under its control (note that this does not mean that player must be under ai control, just that player has this ai type assigned) from beginning to the end, but player cannot switch to this ai type mid-game as it would have no history information.

Marko Lindqvist <cazfi>
Project Administrator
Fri 15 Jun 2012 10:48:04 PM UTC, comment #2:

Players created in the editor are also hardcoded to "classic".
I was going to raise another bug to add an editor property, but actually I'm not sure it's possible to change type after player creation; if so it doesn't make sense as an editor property.
Developers might reasonably want to create scenarios with different AI types in specific situations rather than random starting positions etc. Having a server option would allow this (if changed on the fly while crafting the scenario).

Jacob Nevins <jtn>
Project Administrator
Fri 15 Jun 2012 10:47:21 PM UTC, comment #1:

> Obviously they can hack the source, but it feels like there
> should be a server command which changes what
> default_ai_type_name() returns.


Maybe, maybe not. So far the (partly implemented) plan has been to make default AI configure option. At least when new ai type is part of freeciv tree, you are reconfiguring to build it anyway.

Marko Lindqvist <cazfi>
Project Administrator
Fri 15 Jun 2012 10:39:04 PM UTC, original submission:

Currently, most ways of creating new players on S2_4 are hardcoded to use the "classic" AI type:

  • barbarians
  • civil war
  • aifill
  • aitoggle'd human players (I think?)

The only way to create a non-"classic" AI is an explicit "/create".

People testing new AI types might reasonably want to switch all AIs over to their new one at some point in testing. Obviously they can hack the source, but it feels like there should be a server command which changes what default_ai_type_name() returns.

(Perhaps in future one might want fine-grained control e.g. a specific AI type for barbarians, but that can wait IMO.)

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:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 05 Oct 2014 01:49:32 PM UTCjtnPlanned Release2.5.0=>
    Sun 05 Aug 2012 03:12:22 PM UTCjtnPlanned Release2.4.0,2.5.0=>2.5.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup