FreeOrion

Forums for the FreeOrion project
It is currently Sat May 26, 2018 7:12 pm

All times are UTC


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.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: AI doesn't attack player
PostPosted: Tue Apr 10, 2018 4:54 pm 
Offline
Space Kraken

Joined: Sat Dec 10, 2011 5:46 am
Posts: 107
I've tried to run game test (https://github.com/freeorion/freeorion/pull/2050) with 3 maniacal AI and 400 turns.

When I opened latest save I found out AIs don't capture my capital and even they don't attack my ships.

Is it intended to don't allow AI to attack human player capital or there some bugs prevents them?

Attachment:
test_ai.png
test_ai.png [ 439.54 KiB | Viewed 241 times ]

_________________
Gentoo Linux amd64, gcc-6.4.0, boost-1.65.0
Ubuntu Server 18.04.0 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer public server at freeorion-test.dedyn.io. Version 2018-05-22.2e3c6f4
Donates are welcome: BTC: 14XLekD9ifwqLtZX4iteepvbLQNYVG87zK


Top
 Profile  
 
PostPosted: Tue Apr 10, 2018 5:43 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4614
o01eg wrote:
I've tried to run game test (https://github.com/freeorion/freeorion/pull/2050) with 3 maniacal AI and 400 turns.
When I opened latest save I found out AIs don't capture my capital and even they don't attack my ships.
Is it intended to don't allow AI to attack human player capital or there some bugs prevents them?
No, at least not for Maniacal or Aggressive AIs which should have been all you had (maybe for Beginner, I don't recall at the moment). And I have certainly had plenty of AI test games where I am just observing the AIs and they definitely will come capture my capital once they come across it.

But this PR you link is the one for only running one turn and then quitting? It does look like the you got to turn 400 and the AIs advanced a fair bit, so I'm puzzled how that fits with this PR, but anyways, check if you encounter this behavior with master or only with your PR.

_________________
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: Tue Apr 10, 2018 6:00 pm 
Offline
Space Kraken

Joined: Sat Dec 10, 2011 5:46 am
Posts: 107
Dilvish wrote:
But this PR you link is the one for only running one turn and then quitting? It does look like the you got to turn 400 and the AIs advanced a fair bit, so I'm puzzled how that fits with this PR, but anyways, check if you encounter this behavior with master or only with your PR.

The test accepts environment variables to manage number of turns and AIs.

_________________
Gentoo Linux amd64, gcc-6.4.0, boost-1.65.0
Ubuntu Server 18.04.0 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer public server at freeorion-test.dedyn.io. Version 2018-05-22.2e3c6f4
Donates are welcome: BTC: 14XLekD9ifwqLtZX4iteepvbLQNYVG87zK


Top
 Profile  
 
PostPosted: Sun May 13, 2018 5:48 am 
Offline
Space Floater

Joined: Sat Jul 01, 2017 4:54 am
Posts: 34
I have experienced similar issues, AI in late game often becomes unaggressive.

Currently playing:
2018-04-30.2146fa3 + some custom changes(essentially higher production ATM)

Multiplayer games with 3 AI, 1 moderator, 100 or so systems
Trigger seems to be something like two AI's have doom stacks with 2K attack+def. I believe there is some threshold of defending doom stack size. If the defender doesn't have doom stacks, it just gets swallowed.

They just start bogging down and become timid fleet fiddlers. Just Churning ships around not sitting on enemy worlds more then turn or two.
I have seen this in multiple games, multiple different recent branches in the code. The weaker AI's turtle - reasonable. The strongest AI just slows right down and becomes extremely cautious. invasion rate drops to near zero. Not what I would expect from maniacal AI with clear advantage.

Hypothesis: AI decides that the defending doom stack is too tough, targets something 'behind' the doom stack, but then not enough remaining defence to protect against if defending doom stack should attack. So sits and waits for more offence to be built.

I suspect there are problems with issue_fleet_orders_for_fleet_missions but after looking at it for a short bit. That will not be easy for me to figure out what it is doing.

Example:
In my current game turn 388
leading AI has 5x production of second place 375 ships, something like 10-20x the estimated fleet strength
second place AI 120 ships
3rd is at 36 production... 1 colony 2 worlds but has residual fleet of 110 ships 7.3k attack 6.5k def

lead has 40K attack 60k def 1200 troops worth of ships within 3 jumps of the 3rd place empire's two planets two systems.
second place has 7 colonies 1k attack 1k defence in 5 jumps from said world.
second places primary (and only) doom stack is 12 jumps away with 21k attack 13k def

Hmm both defending doom stacks are sitting on their respective home worlds.... could be related, but hope not.

Additional problem that makes it difficult to test, turns take a long time:

first place AI
21:03:41.697570 [debug] python : timers.py:46 - Timing for timer:
21:03:41.697674 [debug] python : timers.py:47 - ======================================================
21:03:41.697922 [debug] python : timers.py:50 - survey_universe 81 msec
21:03:41.698633 [debug] python : timers.py:50 - find_best_designs_this_turn 5730 msec
21:03:41.698880 [debug] python : timers.py:50 - calculate_priorities 3797 msec
21:03:41.699105 [debug] python : timers.py:50 - assign_scouts_to_explore_systems 56 msec
21:03:41.699414 [debug] python : timers.py:50 - assign_colony_fleets_to_colonise 218 msec
21:03:41.699514 [debug] python : timers.py:50 - assign_invasion_fleets_to_invade 147 msec
21:03:41.699602 [debug] python : timers.py:50 - assign_military_fleets_to_systems 400 msec
21:03:41.699689 [debug] python : timers.py:50 - generate_fleet_orders_for_fleet_missions 1344 msec
21:03:41.699789 [debug] python : timers.py:50 - issue_fleet_orders_for_fleet_missions 65867 msec
21:03:41.699863 [debug] python : timers.py:50 - generate_research_orders 1267 msec
21:03:41.699924 [debug] python : timers.py:50 - generate_production_orders 1045 msec
21:03:41.699983 [debug] python : timers.py:50 - generate_resources_orders 2653 msec
21:03:41.700038 [debug] python : timers.py:52 - ------------------------------------------------------
21:03:41.700114 [debug] python : timers.py:53 - Total: 82613 msec
21:03:41.702438 [debug] python : timers.py:45 -
21:03:41.702548 [debug] python : timers.py:46 - Timing for bucket:
21:03:41.702613 [debug] python : timers.py:47 - ===============================
21:03:41.702689 [debug] python : timers.py:50 - Server_Processing 24927 msec
21:03:41.702754 [debug] python : timers.py:50 - AI planning 124106 msec
21:03:41.702811 [debug] python : timers.py:52 - -------------------------------
21:03:41.702884 [debug] python : timers.py:53 - Total: 149033 msec


3rd place AI
21:05:17.796516 [debug] python : timers.py:46 - Timing for timer:
21:05:17.796609 [debug] python : timers.py:47 - ======================================================
21:05:17.796737 [debug] python : timers.py:50 - survey_universe 36 msec
21:05:17.796840 [debug] python : timers.py:50 - find_best_designs_this_turn 91 msec
21:05:17.796940 [debug] python : timers.py:50 - calculate_priorities 1946 msec
21:05:17.797038 [debug] python : timers.py:50 - assign_scouts_to_explore_systems 46 msec
21:05:17.797139 [debug] python : timers.py:50 - assign_colony_fleets_to_colonise 156 msec
21:05:17.797250 [debug] python : timers.py:50 - assign_invasion_fleets_to_invade 172 msec
21:05:17.797353 [debug] python : timers.py:50 - assign_military_fleets_to_systems 122 msec
21:05:17.797456 [debug] python : timers.py:50 - generate_fleet_orders_for_fleet_missions 887 msec
21:05:17.797581 [debug] python : timers.py:50 - issue_fleet_orders_for_fleet_missions 21103 msec
21:05:17.797704 [debug] python : timers.py:50 - generate_research_orders 96 msec
21:05:17.797796 [debug] python : timers.py:50 - generate_production_orders 328 msec
21:05:17.797887 [debug] python : timers.py:50 - generate_resources_orders 884 msec
21:05:17.797974 [debug] python : timers.py:52 - ------------------------------------------------------
21:05:17.798105 [debug] python : timers.py:53 - Total: 25872 msec
21:05:17.798751 [debug] python : timers.py:45 -
21:05:17.798876 [debug] python : timers.py:46 - Timing for bucket:
21:05:17.798981 [debug] python : timers.py:47 - ===============================
21:05:17.799097 [debug] python : timers.py:50 - Server_Processing 130536 msec
21:05:17.799205 [debug] python : timers.py:50 - AI planning 39607 msec
21:05:17.799294 [debug] python : timers.py:52 - -------------------------------
21:05:17.799404 [debug] python : timers.py:53 - Total: 170143 msec


Top
 Profile  
 
PostPosted: Sun May 13, 2018 8:25 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4614
Hmm, I could easily see them getting stuck in a kind of positive feedback loop, each getting overfocused on their opposing doomstacks. I've got a thought on something to try for it, I'll try to put a PR up soon.

_________________
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  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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