Closed kotc closed 4 years ago
Thanks for the suggestion.
It looks like this might be doable in SOCGameHandler.endTurnIfInactive()
by checking if trade is waiting for a response from any humans, or only bots, then for bots using a shorter timeout than ROBOT_FORCE_ENDTURN_TRADEOFFER_SECONDS
(60 seconds).
Possibly it could also build on the "stubborn robot" code added in 9954f87 for issue #47, but even without that, an improvement from 60 seconds would be good.
i think max tradeoffer should be limited to ~10s, 60s seems quite long time, even with humans involved (although clicking 'counter offer' might extend the timeout if human interacts)
I've added code to look for human players before using the 60-second timeout; that should improve the situation. Thanks again for the idea!
For practice games, code is part of the latest beta JAR available at http://nand.net/jsettlers/beta2/JSettlers2.jar
well, what i meant 'look for human players' is that sometimes bots offer trade only to other bots, even if there are humans in the game too. but even then, i think bots trade offers shouldnt last more than 5-8s for the sake of long pauses in game flow
OK thanks, that makes sense. Shortened to about 6 seconds when trade is offered only to bots.
dont know if it's related, but i'm seeing lots of: robot 6: debugRandomPauseActive for 12 seconds etc. with 20190319
Oh bummer. OK, that's now fixed and re-uploaded.
Newly released v2.0.00 includes this. Thank you :)
situation:
expectation: detection of hung bots and/or applying 'auto trade timeout' to bots too