agentsociety.configs.agent¶
Module Contents¶
Classes¶
Defines the types of institution agent class types. |
|
Configuration for different types of agents in the simulation. |
Data¶
API¶
- agentsociety.configs.agent.__all__¶
[‘AgentConfig’]
- class agentsociety.configs.agent.InstitutionAgentClass¶
-
Defines the types of institution agent class types.
Initialization
Initialize self. See help(type(self)) for accurate signature.
- FIRM¶
‘firm’
- GOVERNMENT¶
‘government’
- BANK¶
‘bank’
- NBS¶
‘nbs’
- class agentsociety.configs.agent.AgentConfig¶
Bases:
pydantic.BaseModelConfiguration for different types of agents in the simulation.
- model_config¶
‘ConfigDict(…)’
- memory_config_func: Optional[collections.abc.Callable]¶
None
Memory configuration function
- memory_from_file: Optional[str]¶
None
Memory configuration file. If s3 is enabled, the file will be downloaded from S3
- memory_distributions: Optional[dict[str, Union[agentsociety.agent.distribution.Distribution, agentsociety.agent.distribution.DistributionConfig]]]¶
None
Memory distributions. Required when using number, ignored when using memory_from_file.
- validate_configuration()¶
Validate configuration options to ensure the user selects the correct combination
- serialize_agent_class(agent_class, info)¶
- serialize_memory_config_func(memory_config_func, info)¶
- serialize_memory_distributions(memory_distributions, info)¶