Exercise Bank — Speaking in Tongues: Agent Communication, Then and Now
The printed Chapter 5 keeps Exercises 1–6; the bank continues from Exercise 7.
Exercise 7. Over one run, the team exchanges 250 messages. Transport is Shannon-grade: each transmission is corrupted with probability 10^{-2}; every corruption is caught by a checksum and the message resent, resends independent and corrupted with the same probability; and a delivered message harbours an undetected corruption with probability 10^{-9}. Independently of transport, each delivered message is silently misread — resolved to the wrong referent or reading, with no error raised — with probability 0.015. (a) Compute the expected number of transmissions per delivered message, and hence the expected number of extra sends per run that reliable transport costs. (b) Compute the expected number of undetected corruptions per run, the expected number of misreadings per run, and the ratio between them. (c) Compute the probability that a run contains at least one misreading, and the expected number of runs between undetected corruptions. (d) Assign each failure mode to one of Weaver’s levels, and explain which of the two Shannon’s machinery could suppress still further — and why the other is beyond its reach in principle, however good the code.
Exercise 8. Following Cohen and Perrault, model the team’s talk as operators on mental-state atoms, writing B_i \varphi for “agent i believes \varphi” and \mathrm{Goal}_i(\varphi) for “agent i has the goal that \varphi”, with \varphi here the proposition that the flaky test is fixed. The speech act request(i, j, \varphi) has precondition \mathrm{Goal}_i(\varphi) and effect B_j(\mathrm{Goal}_i(\varphi)); inform(i, j, \varphi) has precondition B_i \varphi — the sincerity condition — and effect B_j \varphi. Two internal, non-communicative steps complete the vocabulary: adopt, by which a cooperative j holding B_j(\mathrm{Goal}_i(\varphi)) acquires \mathrm{Goal}_j(\varphi), and work(j), which requires \mathrm{Goal}_j(\varphi) and makes \varphi true along with B_j \varphi. The orchestrator o starts with \mathrm{Goal}_o(\varphi) and the coder c with nothing. (a) Exhibit the shortest sequence of steps ending in B_o \varphi, giving the full atom set after each step and checking each precondition. (b) Construct a second run whose message trace — the speech acts alone, which are all o observes — is identical to (a)’s, but in which inform’s precondition is false; conclude precisely why a semantics stated in terms of private mental states cannot be verified by any observer of the trace. (c) Implement the progression: atoms as strings, an operator as preconditions plus effects, and a checker that applies a plan to a state, verifying at each step either every precondition (an omniscient auditor) or only the atoms belonging to a named observer, who takes the rest on trust. Use it to validate (a) and to demonstrate (b) mechanically. (d) What single addition to the exchange lets o distinguish the two runs after all — and what does the answer imply about where trust in an inform must be anchored?
Exercise 9. Redesign the team’s message fabric under the discipline of Section 5.5: constrain the channel where correctness must be guaranteed, and spend natural language only where its expressiveness earns its keep. The recurring exchanges are (1) orchestrator to coder, task assignment; (2) coder to orchestrator, progress report; (3) tester to all, test outcome; (4) reviewer to orchestrator, verdict on a branch; (5) coder to orchestrator, clarification question and answer; and (6) coder to reviewer, rationale for a design decision. (a) For each exchange choose a typed schema, natural language, or a hybrid, sketching the fields of every schema you introduce, and honour three constraints: an assertion that other agents will act on without re-checking must be produced by machinery or be independently verifiable, and you must say which field and produced by what; a declaration must carry its authority, and you must say who may set the field and what enforces that; and every retention of natural language must state what its expressiveness is buying. (b) Audit the design against the three faces of falsehood: for each face, point to the element that neutralises it or name the exchange in which it survives. (c) Name the residual risk no such design can remove, and place it on Weaver’s ladder.
Exercise 10 (lab). Estimate empirically the reading distributions that Exercise 3 assumed. Choose a one-line instruction from the team’s domain that is genuinely ambiguous — “update the tests for the parser” will do — and two context conditions: X, a short preamble establishing that continuous integration has been failing all morning, and Y, one establishing that a coverage target has just been raised. Fix a classification rubric before sampling: the distinct readings you will recognise (say, make the failing tests pass, add new tests, modernise the test style) and a written rule for assigning a response to one. For each condition, sample a model at least thirty times at non-zero temperature, asking for a one-line statement of what it would concretely do; classify every response; and report the empirical distributions \hat{p}_X and \hat{p}_Y. Compute the within-context agreements \sum_i \hat{p}_{X,i}^2 and \sum_i \hat{p}_{Y,i}^2 and the cross-context agreement \sum_i \hat{p}_{X,i} \hat{p}_{Y,i}, and compare the three. What does the comparison say about context as the resolver of ambiguity, and where does Exercise 3’s independence model misdescribe what you observed? Record the model identifier and the date beside your results.