AI is tooooooo slow

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Message
Author
User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

AI is tooooooo slow

#1 Post by EricF »

I really like this game. I like it more than some games I have paid money for. I like the UI, the technologies, pretty much every thing, but....
In the beginning waiting a minute or two for the AI is only slightly annoying, however come late game, turn 200+, waiting sometimes 10 minutes or more for a turn to finish is agonizing. I want to play the game not read a book (which is mostly what I do while waiting). My machine is not the greatest (single core, 32bit 3Ghz 4GigRAM), but it's not THAT bad.
As I said, I like this game, but the waiting is a deal breaker for me, sorry.
I'm a little reluctant to post this complaint, because I'm sure everybody is aware of this problem.
Python scripts may be a good fast way to experiment with, but if this thing is going to be playable you are going to have to switch to something compiled.
I know, I'm sorry. I just gave a big work assignment to people who are doing this for free.
(maybe I should just figure out a way to win faster. I probably do turtle too much)
Thanks again though for an interesting and enjoyable game.
Playing latest test build

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: AI is tooooooo slow

#2 Post by Vezzra »

Are you sure it's the AI players that take so long? Because in my experience it's actually the turn processing in late game that gets really slow (and the UI gets extremely sluggish). The AI processing time usually is the least of my problems. So switching from Python to something faster won't help at all with that...

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: AI is tooooooo slow

#3 Post by AndrewW »

Also, what version are you using?

There have been some speed improvements in later versions.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: AI is tooooooo slow

#4 Post by Vezzra »

AndrewW wrote:Also, what version are you using?
EricF wrote:Playing latest test build

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: AI is tooooooo slow

#5 Post by AndrewW »

EricF wrote:Playing latest test build
Oops, somehow skipped over that part.

Wouldn't think it would be that slow on the system mentioned.

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: AI is tooooooo slow

#6 Post by Morlic »

What are your universe settings?

Can you post some logfiles including the slow turns?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Ruldra
Krill Swarm
Posts: 14
Joined: Fri Oct 23, 2015 12:54 am

Re: AI is tooooooo slow

#7 Post by Ruldra »

I didn't try any of the test versions after the official 0.4.5 release, but my PC has around the same stats as OP and I never had such long waiting times.

In the beginning turns are resolved instantly for me and even around turn 200 it takes 10-15 seconds at most. Are you sure it isn't something related to your PC? Or maybe you're generating way too large galaxies.

User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

Re: AI is tooooooo slow

#8 Post by EricF »

6 AI players 175 stars

When the game says 'Starting turn *'
The AI players begin their turn. They finish their turn and then you see the save game information.
It is at this time that you can manually save a game.
You can't do it earlier because the AI is still doing its turn.
That is why some people always see that menu option greyed out.
After the AI has finished then I hit the turn button.
The turn is processed. This takes only a few seconds.
What could possibly be wrong with my PC?
Any suggestions?
I'm playing as Administrator.
I'm running WinXP SP3
Attachments
AI_6.zip
(142.35 KiB) Downloaded 69 times

User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

Re: AI is tooooooo slow

#9 Post by EricF »

Another log
Attachments
freeorion.zip
(141.82 KiB) Downloaded 61 times

User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

Re: AI is tooooooo slow

#10 Post by EricF »

freeoiriond.log

I'm glad to see others are not experiencing my problem.
Hopefully my problem can be fixed
Attachments
freeoriond.log
(421.83 KiB) Downloaded 80 times

User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

Re: AI is tooooooo slow

#11 Post by EricF »

let me know if there is any more info that you need.
This isn't because I'm using Windows XP is it?
Any other XP users out there?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: AI is tooooooo slow

#12 Post by Geoff the Medio »

Single core might be an issue... If you watch in task manager as AIs play their turn, done each in succession take up most of the CPU, finish, submit its turn, and then wait as the next AI starts playing? Does the first tend to not finish its turn until after you have ended yours?

User avatar
EricF
Space Dragon
Posts: 357
Joined: Fri Jul 29, 2016 10:12 am

Re: AI is tooooooo slow

#13 Post by EricF »

All the freeorionCA processes run at the same time.
Does the first tend to not finish its turn until after you have ended yours?
Nope.

Update;
For reasons I won't go into, I uninstalled FO and deleted the old save games.

I have started a new game and I am on about turn 70.
AIs only take about 10-15 seconds to finish.

I took a screen shot of the task manager right after the AIs have finished and I have just hit the 'Turn' button.
FOTM.JPG
FOTM.JPG (44.94 KiB) Viewed 1428 times
Last edited by EricF on Tue Aug 09, 2016 12:35 pm, edited 1 time in total.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: AI is tooooooo slow

#14 Post by Vezzra »

EricF wrote:Any other XP users out there?
Not actually an XP user, but I do my test runs for the weekly FO builds for Windows on an ancient XP machine. It's dual core, but the other specs are even lower than yours IIRC (512MB RAM, 1.something GHz CPU etc.). It exhibits some of the same symptoms - particularly a prolonged delay immediately at the start of the game until the AIs are done doing their first turn. Although apparently it's not the actual order generation that takes so long, but something during the init phase before - it takes some time until the AI greeting messages appear in the chat window, something I don't experience on my (much more powerful) Mac.

The UI is a bit sluggish already at the start of the game (a default quickstart one, that is), I've never tried to actually play on that machine as I expect it to become unplayable rather quickly on that computer.

The only thing I can offer is to run a test on my old (a bit more powerful) XP laptop, if you can upload one of your saves of a game that has progressed to the point where it takes the AI several minutes to do their turns on your system. Post a link to the save and the exact version of FO you used. I'll try to squeeze in a little test if I can.

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: AI is tooooooo slow

#15 Post by Morlic »

2016-08-07 22:48:52.631375 [debug] AI : Techs currently at head of Research Queue:
2016-08-07 22:48:52.631375 [debug] AI : LRN_QUANT_NET allocated 44.40 RP -- unlockable items: []
2016-08-07 22:48:52.631375 [debug] AI : CON_ARCH_MONOFILS allocated 0.00 RP -- unlockable items: ['BLD_SPACE_ELEVATOR']
2016-08-07 22:48:52.631375 [debug] AI : SHP_CONTGRAV_MAINT allocated 0.00 RP -- missing preReqs: ['CON_ARCH_MONOFILS'] -- unlockable items: ['SH_SELF_GRAVITATING', 'BLD_SHIPYARD_CON_GEOINT']
2016-08-07 22:48:57.584500 [debug] AI : GRO_XENO_HYBRIDS allocated 0.00 RP -- unlockable items: []

A lot of time seems to be spent waiting while other AIs are handled ... Could you start a game with just a single AI and pass turns until it becomes slow, then post the logs again?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply