
 [ AI AVALON Timeout Operation ]
                          Copyright (c) 2022 Hidetoshi NAGAI
                          Copyright (c) 2022 Kyutech AI AVALON Team

Protocol Version Support: 0.7.0 and above

Defining Timeout Handling in Communication.


1. Server --> Agent
When sending a message from the server to the agent (AI player), if
the return code indicating "OK" is not received for an extended period
(including retransmission), it suggests either unstable communication
or intentional delay by the agent. In either case, if communication
cannot proceed successfully, continuing the play becomes difficult.
In such cases, the action the server should take is either to force a
halt to play or to assume that a message has been received. Which one
is chosen can be set as an option for the server operation.

2. Agent --> Server
If a message from the agent (AI player) to the server does not arrive
within the specified time, it will be treated as if the following message
had been submitted:
========================================================================
< construction > (4):
("team", leader-player-number, strength, player-number, player-number, ...)
  ==>
("team", leader-player-number, 1)
# Player numbers are not specified, so the team members will be randomly
# selected.

-----------------------------------------
< construction > (6):
("vote", voting-player-number, team-message-ID, selection)
  ==>
("vote", voting-player-number, team-message-ID, "accept")
# Consider the team as accepted.

-----------------------------------------
< quest > (2):
("action", player-number, "success"_or_"failure")
  ==>
("action", player-number, "omit")
# "Justice" side will be treated as ("action", player number, "success"),
# "Evil" side will be treated as ("action", player number, "failure").

-----------------------------------------
< assassination > (2):
("assassinate", assassin-player-number, player-number-presumed-to-be-Merlin)
  ==>
("assassinate", assassin-player-number,
                            random-player-number-from-the-"Justice"-side)

-----------------------------------------
< discussion > (1)(a):
Question message
 =>
("inquiry", player-number, 0, 0, 0)
# Assume an "omit the question" message was sent.

-----------------------------------------
< discussion > (1)(b), (2)(b), (3)(b), (3)(d):
Explanation message
 =>
("reason", player-number, 0, 0, "omit")
# Assume an "omit the explanation" message was sent.

-----------------------------------------
< discussion > (2)(a), (3)(c):
Assertion message
 =>
("claim", player-number, 0, 0, "omit")
# Assume an "omit the claim" message was sent.

-----------------------------------------
< discussion > (3)(a):
Request message
 =>
("request", player-number, 0, "omit", 0, 0)
# Assume an "omit the request" was sent.

-----------------------------------------
< discussion > (4):
Termination message
 =>
("quit", player-number, 0)
# Assume termination was not desired.

-----------------------------------------
< discussion > (5):
Interrupt requect message
 =>
("interrupt", player-number, 0)
# Assume interrupt request was not desired.


-----------------------------------------------------------------------------
end of document
-----------------------------------------------------------------------------
