trinity.algorithm.sample_strategy.mix_sample_strategy module#

class trinity.algorithm.sample_strategy.mix_sample_strategy.MixSampleStrategy(buffer_config: BufferConfig, **kwargs)[源代码]#

基类:SampleStrategy

The default sample strategy.

__init__(buffer_config: BufferConfig, **kwargs)[源代码]#
async sample(step: int) Tuple[List[Experience], Dict, List][源代码]#

Sample data from buffer.

参数:

step (int) -- The step number of current step.

返回:

The sampled List[Experience] data. Dict: Metrics for logging. List: Representative data for logging.

返回类型:

List[Experience]

classmethod default_args() Dict[源代码]#

Get the default arguments of the sample strategy.

state_dict() dict[源代码]#

Get the state dict of the sample strategy.

load_state_dict(state_dict: dict) None[源代码]#

Load the state dict of the sample strategy.