FreeOrion

Forums for the FreeOrion project
It is currently Fri Oct 20, 2017 4:11 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: AI Meter Updating
PostPosted: Fri Oct 02, 2015 6:45 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12003
Location: Munich
It is necessary for AI clients to update meter estimates and discrepancies each turn?

In AIInterface::InitTurn, there are lines
Code:
        InitMeterEstimatesAndDiscrepancies();
        UpdateMeterEstimates();
        UpdateResourcePools();
Are these all necessary for proper functioning of the AI? Perhaps it would be fine just using whatever meter values the server sends, and doesn't need to redo the meter updating and calculating of discrepancies as is done for the human client?

If it can be skipped, it could save a bunch of AI processing time each turn, and remove a potential crash due to launching a bunch of threads to do the meter calculations.


Top
 Profile  
 
 Post subject: Re: AI Meter Updating
PostPosted: Fri Oct 02, 2015 7:14 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4371
Sounds worth experimenting with. I'll bookmark this for my todo list.

_________________
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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users 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