View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004999 | Spring engine | AI | public | 2015-11-28 18:21 | 2015-12-29 22:44 |
| Reporter | aeonios | Assigned To | Kloot | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 100.0 | ||||
| Summary | 0004999: Non-Lua AIs desync when game speed is increased | ||||
| Description | I've seen this both with the java interface and C++, when game speed is increased (to 2.0-4.0 speed or so) the AIs get desynced progressively worse as the game continues. The symptoms vary, but typically units end up spazzing out in various ways, for example workers get stuck or constantly switch between jobs without actually moving more than a few elmos, or combat units stop functioning normally (stop using dgun properly, etc) and target selection tends to break down. With java I've also seen pathfinding (java, not spring) stop functioning properly, displaying jitter in the paths, etc. This makes testing and developing AI difficult. | ||||
| Steps To Reproduce | See the ZK AI competition for plenty of test material. Symptoms that develop under accelerated speed also tend to subside noticeably when speed is reduced back to 1.0 (although the AI overall is still a desynced mess). | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
|
|
I confirm that strange behaviour. Though it appears only in multiplayer. UnitIdle event spammed for no reason. Simulation in singleplayer (try directly spring.exe or springlobby) runs at 10x without this bug (could be i just don't notice it). EDIT: CPU speed matters (tournament fights affected by this bug). I never tested it on slow machine. "Singleplayer 10x" was for i7 4.2GHz. |
|
|
I figured out from testing that at least part of the problem is that at high speeds there's a large lag (in frames) between when units are given orders and when they return that they actually have orders. I've only been testing on singleplayer mode, but I suspect it probably does the same on multi. I haven't been able to test unitIdle spam yet, but I'll report when I can figure out how to implement a good test. EDIT: I tested but I didn't detect any incorrect spam of unitIdle. |
|
|
UnitIdle is not the cause but consequence of an issue. I don't know why but commandQueue gets empty after moving a few elmos. That causes disruptive movement and task reassignments. The cause as you mentioned is probably near a large lag (in frames). If there is 3 seconds lag (90 frames) then it turns into 900 frames on 10x speed (in theory). Also there could be some packet limits issues (limits are same when speed increased?) Those are my observations. That or we are talking about different bugs :) |
|
|
AI's are limited in the number of packets they can send per second. At higher game speeds the packet rate for typical bots goes through the roof, so a lot of them will be dropped (randomly from an AI's perspective). |
|
|
Is there any setting to modify this behaviour for local games? |
|
|
In springsettings.cfg, set LinkIncomingPeakBandwidth=0 LinkIncomingMaxWaitingPackets=0 to disable BW limits. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-11-28 18:21 | aeonios | New Issue | |
| 2015-11-28 20:09 | lamer | Note Added: 0015349 | |
| 2015-11-28 20:13 | lamer | Note Edited: 0015349 | |
| 2015-11-28 20:13 | lamer | Note Edited: 0015349 | |
| 2015-11-28 20:15 | lamer | Note Edited: 0015349 | |
| 2015-11-28 20:44 | lamer | Note Edited: 0015349 | |
| 2015-11-28 20:49 | lamer | Note Edited: 0015349 | |
| 2015-11-29 11:32 | aeonios | Note Added: 0015351 | |
| 2015-11-29 12:56 | aeonios | Note Edited: 0015351 | |
| 2015-11-30 13:57 | lamer | Note Added: 0015352 | |
| 2015-11-30 15:04 | Kloot | Note Added: 0015353 | |
| 2015-11-30 17:44 | Anarchid | Note Added: 0015354 | |
| 2015-11-30 18:09 | lamer | Note Edited: 0015349 | |
| 2015-11-30 18:24 | Kloot | Note Added: 0015355 | |
| 2015-12-29 22:44 | Kloot | Status | new => closed |
| 2015-12-29 22:44 | Kloot | Assigned To | => Kloot |
| 2015-12-29 22:44 | Kloot | Resolution | open => no change required |