FreeOrion

Forums for the FreeOrion project
It is currently Sun Dec 17, 2017 5:33 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed Aug 09, 2017 9:43 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
redacted since my original post was too much the product of a misunderstanding and therefor distracting/unhelpful.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Wed Aug 09, 2017 10:17 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12045
Location: Munich
FLEET_UPKEEP_MULTIPLICATOR and SHIP_PART_COST_MULTIPLIER are not the same thing. The latter is only affected by the ship part cost scaling game rule.


Top
 Profile  
 
PostPosted: Thu Aug 10, 2017 12:47 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
Ah, OK, I guess that was a bad inference on my part. I do think we should still plan to (at least at some point) add AI support for such potential gameplay variances, and in my response on your PR I mentioned a bit more of an idea on how to help organize tracking such tasks.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Thu Aug 10, 2017 8:38 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12045
Location: Munich
Does the AI already consider the costs of parts / hulls / designs when choosing what to produce? If so, it's already somewhat considering the changes introduces by a rule tweak...


Top
 Profile  
 
PostPosted: Thu Aug 10, 2017 11:10 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
The AI does check actual ship cost at specific locations In the most directly production-related code, when it is trying to decide things like "what is my best bang-for-buck ship design for role Y", or "what's the best location for me to build a ship for role Y". So for those no special adjustment is needed for the scaled cost rule you describe (though its my recollection that for assessing the cost efficiency of a number of types of ships like warships, where we might build a lot of them, that the efficiency calc works with an adjusted cost that has an additional adjustment based on the current upkeep rate).

There are some other places, though, where it is dealing with more general decisions (and perhaps also partly as a holdover from when the players couldn't even build outpost pods at the outset), that it uses generalized costs. Like when the AI is trying to decide its overall priority for building outposts/colonies and assessing estimated outpost cost relative to total PP available, it uses a general calculation based on base cost and upkeep info from AIDependencies.py, or when setting a minimum colony valuation to consider for possible outposting or colonization I think it is currently using a hardcoded floor that was once loosely derived from the respective pod cost. That's what comes to mind at the moment, anyway. I suppose those cases could be swapped to a dynamic calculation without being aware of the game rule by either averaging across all possible build locs or else choosing a sample location (and probably having a default value as a safety backup).

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Thu Aug 10, 2017 11:45 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12045
Location: Munich
The game rules should be exposed to the Python API...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group