nip.parameters.protocol.MnipProtocolParameters#
- class nip.parameters.protocol.MnipProtocolParameters(max_message_rounds: int = 8, min_message_rounds: int = 1, sequential: bool = False, prover0_first: bool = True, randomize_channel_order: bool = True)[source]#
Additional parameters for the MNIP interaction protocol.
- Parameters:
max_message_rounds (int) – The maximum number of rounds of the game. Each round corresponds to one move by one or more agents.
min_message_rounds (int) – The minimum number of rounds of messages. Before this point, the verifier’s guesses are not registered.
sequential (bool) – Whether the provers send messages one after the other, or both simultaneously.
prover0_first (bool) – When the provers send messages sequentially, whether prover 0 goes first.
randomize_channel_order (bool) – Whether to randomize the order of the channels when prompting the verifier. Only relevant in text-based protocols.
Methods Summary
__eq__
(other)Return self==value.
__init__
([max_message_rounds, ...])__repr__
()Return repr(self).
_get_param_class_from_dict
(param_dict)Try to get the parameter class from a dictionary of serialised parameters.
Construct a set of basic parameters for testing.
from_dict
(params_dict[, ignore_extra_keys])Create a parameters object from a dictionary.
get
(address)Get a value from the parameters object using a dot-separated address.
to_dict
()Convert the parameters object to a dictionary.
Attributes
max_message_rounds
min_message_rounds
prover0_first
randomize_channel_order
sequential
Methods
- __eq__(other)#
Return self==value.
- __init__(max_message_rounds: int = 8, min_message_rounds: int = 1, sequential: bool = False, prover0_first: bool = True, randomize_channel_order: bool = True) None #
- __repr__()#
Return repr(self).
- classmethod _get_param_class_from_dict(param_dict: dict) type[ParameterValue] | None [source]#
Try to get the parameter class from a dictionary of serialised parameters.
- Parameters:
param_dict (dict) – A dictionary of parameters, which may have come from a
to_dict
method. This dictionary may contain a_type
key, which is used to determine the class of the parameter.- Returns:
param_class (type[ParameterValue] | None) – The class of the parameter, if it can be determined.
- Raises:
ValueError – If the class specified in the dictionary is not a valid parameter class.
- classmethod construct_test_params() BaseHyperParameters [source]#
Construct a set of basic parameters for testing.
- classmethod from_dict(params_dict: dict, ignore_extra_keys: bool = False) BaseHyperParameters [source]#
Create a parameters object from a dictionary.