mmlf

Module: missions.operations.mmlf

Execute MMLF experiments

This module contains an operation and a process for MMLF. One MMLF process consists of a executing one run of a predefined number of episodes of a MMLF world. An MMLF operation consists of one or several runs of one or several MMLF worlds.

Note

The results of the runs are not stored in the standard operation result directories but in the MMLF ReadWrite Area. Only the outputs of the MMLF to stdout are stored in log files stored in the operation result directories.

Author:Jan-Hendrik Metzen

Inheritance diagram for pySPACE.missions.operations.mmlf:

Inheritance diagram of pySPACE.missions.operations.mmlf

Class Summary

MmlfOperation(processes, operation_spec, ...) Operation class for executing MMLF experiments.
MMLFProcess(mmlf_path, world_conf_path, ...) Process for executing an MMLF run

Classes

MmlfOperation

class pySPACE.missions.operations.mmlf.MmlfOperation(processes, operation_spec, result_directory, world_name, number_processes, create_process=None)[source]

Bases: pySPACE.missions.operations.base.Operation

Operation class for executing MMLF experiments.

An MMLF operation consists of one or several runs of one or several MMLF worlds.

Class Components Summary

_createProcesses(processes, world_pathes, ...) Function that creates the mmlf process.
_flatten_dict(input_dict) Flatten the (potentially) nested dict input_dict
consolidate() Consolidates the results of the MMLF operation.
create(operation_spec, result_directory[, ...]) A factory method that creates an MMLF operation based on the
__init__(processes, operation_spec, result_directory, world_name, number_processes, create_process=None)[source]
classmethod create(operation_spec, result_directory, debug=False, input_paths=[])[source]

A factory method that creates an MMLF operation based on the information given in the operation specification operation_spec

classmethod _createProcesses(processes, world_pathes, operation_spec, result_directory)[source]

Function that creates the mmlf process.

consolidate()[source]

Consolidates the results of the MMLF operation.

classmethod _flatten_dict(input_dict)[source]

Flatten the (potentially) nested dict input_dict

MMLFProcess

class pySPACE.missions.operations.mmlf.MMLFProcess(mmlf_path, world_conf_path, learning_episodes, test_episodes, result_directory)[source]

Bases: pySPACE.missions.operations.base.Process

Process for executing an MMLF run

One MMLF process consists of a executing one run of a predefined number of episodes of a MMLF world.

The following parameters are mandatory:

mmlf_path:The path to the MMLF code
world_conf_path:
 The relative path of the world configuration file within the specified MMLF rw area
learning_episodes:
 The number of episodes the MMLF agent is allowed to train (i.e. optimize its policy)
test_episodes:The number of episodes the learned policy is tested. This can be set to 1 for deterministic environments.
result_directory:
 The directory where the stdout of the MMLF run is stored

Class Components Summary

__call__() Executes this process on the respective modality
__init__(mmlf_path, world_conf_path, learning_episodes, test_episodes, result_directory)[source]
__call__()[source]

Executes this process on the respective modality