Discussion:
[Freeciv-Dev] [bug #22786] "Manual Turn Done in AI mode" not useful?
Jacob Nevins
2014-10-11 23:18:01 UTC
Permalink
URL:
<http://gna.org/bugs/?22786>

Summary: "Manual Turn Done in AI mode" not useful?
Project: Freeciv
Submitted by: jtn
Submitted on: Sun 12 Oct 2014 00:18:01 BST
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Release: S2_5 r26758
Discussion Lock: Any
Operating System: GNU/Linux
Planned Release:

_______________________________________________________

Details:

(I may have misunderstood how this is supposed to work... can someone with a
long memory say if this is a regression?)

As I understand it, with "Manual Turn Done in AI mode" (the default), a user
of non-observer client attached to a player under AI control (e.g. in /away
mode) is supposed to press "Turn Done" every done; whereas if the option is
cleared, the client will send a "turn done" to the server as soon as it sees
other players are ready.

However, whenever a player is AI controlled, the "Turn Done" button is
insensitive (get_turn_done_button_state()). So if the option is enabled, the
only way the game will progress is if the AI-controlled player's client
detaches (or a timeout times out).

Could this be as simple as adding ai_manual_turn_done into
get_turn_done_button_state()?
(May also want a callback function on the client option to handle
transitions.)




_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?22786>

_______________________________________________
Message sent via/by Gna!
http://gna.org/
Marko Lindqvist
2014-10-11 23:29:48 UTC
Permalink
Follow-up Comment #1, bug #22786 (project freeciv):

Note 1: I didn't think about this when changed code so that now also AI
players need to acknowledge their turn done (so threaded AI is not supposed to
have finished as soon as main thread has passed control to it and returned
itself). So in TRUNK this is certainly much more horribly broken than in
eaerlier branches - maybe worth separate ticket even.

Note 2: IIRC it was there even before /away mode was introduced, so it applied
to any /aitoggled player which was being watched (actually it probably
predates also separate observer connections)


_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?22786>

_______________________________________________
Message sent via/by Gna!
http://gna.org/
Marko Lindqvist
2015-08-01 00:55:04 UTC
Permalink
Update of bug #22786 (project freeciv):

Category: None => general
Status: None => Ready For Test
Planned Release: => 2.5.1, 2.6.0, 3.0.0

_______________________________________________________

Follow-up Comment #2:

While fixing this, I found both ai_manual_turn_done enabled and disabled to be
broken. The game didn't progress either way.

Fix attached:

- Make Turn Done button sensitive when "ai_manual_turn_done" is enabled
- Have change of "ai_manual_turn_done" value to adjust sensitivity of Turn
Done button
- Allow client to send turn done packet even when player is AI controlled
- Count client with AI controlled player as "connection under control" if it
already has made properly ended turn, when checking against game going
rampant*
- End current turn when switching under AI control and ai_manual_turn_done is
disabled (previously only new turns starting under AI control were handled)
- When busy agents prevent ending turn immediately when we'd do so, allow
postponed turn ending to work even if player is under AI control

*) It's possible to construct corner-cases where this is arguably wrong, but
in general I think this works better than old code that could lead server
never to finish turn if the last turn done was from a client switching under
AI control, and there was no other clients connected at the time.

One thing I couldn't get to work yet was immediate turn done when player is
already under AI control and ai_manual_turn_done option gets changed to
disabled -> new ticket.

(file #24713, file #24714)
_______________________________________________________

Additional Item Attachment:

File name: TurnDoneAiMode.patch Size:5 KB
File name: TurnDoneAiMode-S2_5.patch Size:5 KB


_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?22786>

_______________________________________________
Message sent via/by Gna!
http://gna.org/
Marko Lindqvist
2015-08-06 19:06:44 UTC
Permalink
Update of bug #22786 (project freeciv):

Status: Ready For Test => In Progress
Planned Release: 2.5.1, 2.6.0, 3.0.0 => 2.5.2, 2.6.0, 3.0.0


_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?22786>

_______________________________________________
Message sent via/by Gna!
http://gna.org/
Marko Lindqvist
2015-10-27 20:10:46 UTC
Permalink
Follow-up Comment #3, bug #22786 (project freeciv):

The server part has been moved to -> bug #23991

_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?22786>

_______________________________________________
Message sent via/by Gna!
http://gna.org/
Marko Lindqvist
2015-12-09 01:12:28 UTC
Permalink
Update of bug #22786 (project freeciv):

Planned Release: 2.5.2, 2.6.0, 3.0.0 => 2.5.x, 2.6.0, 3.0.0


_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?22786>

_______________________________________________
Message sent via/by Gna!
http://gna.org/
Marko Lindqvist
2017-05-04 00:02:30 UTC
Permalink
Update of bug #22786 (project freeciv):

Status: In Progress => Duplicate
Assigned to: None => cazfi
Open/Closed: Open => Closed

_______________________________________________________

Follow-up Comment #4:

Handled at hostedredmine: https://www.hostedredmine.com/issues/657412

_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?22786>

_______________________________________________
Message sent via/by Gna!
http://gna.org/

Loading...