nip.utils.rollouts.get_pretty_pure_text_round_message#
- nip.utils.rollouts.get_pretty_pure_text_round_message(protocol_handler: ProtocolHandler, decision: Int[ndarray, 'agent'], raw_decision: Annotated[ndarray, 'agent'], continuous_decision: Float[ndarray, 'agent'], message: Annotated[ndarray, 'agent channel']) dict[str, str] [source]#
Get a pretty version of the messages sent in a round of a pure-text scenario.
This function returns a dict of
key: value
pairs determined as follows:If a verifier has made a decision, the dict has keys of the form “{verifier_name}.decision” and values the decision made by each verifier which made a decision, including the continuous decision value in parentheses.
If no verifier has made a decision, the keys are of the form “{agent_name}@{channel_name}” and the values are the messages sent. If no agent sent a message, the dict is empty.
- Parameters:
protocol_handler (ProtocolHandler) – The protocol handler for the experiment.
decision (Int[np.ndarray, "agent"]) – The discrete decision made by each agent, where any value other than 2 indicates that the agent has made a decision.
raw_decision (String[np.ndarray, "agent"]) – The raw decision text sent by each agent (which may be None).
continuous_decision (Float[np.ndarray, "agent"]) – A float version of the decision made by each agent, which is a value between -1 and 1.
message (String[np.ndarray, "agent channel"]) – The messages sent by each agent to each channel (which may be None).
- Returns:
pretty_message_dict (dict[str, str]) – A dictionary of the messages sent in the round, determined as described above.