Data Composition
Data composition classes.
- class ComposedReward(*rewarders: GlobalReward)[source]
Bases:
GlobalReward
Rewarder for composed data types.
This type can be automatically constructed by passing a tuple of rewarders to the environment constructor’s reward argument.
- Parameters:
rewarders (GlobalReward) – Global rewarders to compose.
- datastore_type
alias of
ComposedDataStore
- link_scenario(scenario: Scenario) None [source]
Link the rewarder to the scenario.
- Parameters:
scenario (Scenario)
- Return type:
None
- initial_data(satellite: Satellite) ComposedData [source]
Furnsish the datastore with
ComposedData
.- Parameters:
satellite (Satellite)
- Return type:
- create_data_store(satellite: Satellite) None [source]
Create a
CompositeDataStore
for a satellite.- Parameters:
satellite (Satellite)
- Return type:
None
- calculate_reward(new_data_dict: dict[str, ComposedData]) dict[str, float] [source]
Calculate reward for each data type and combine them.
- Parameters:
new_data_dict (dict[str, ComposedData])
- Return type:
dict[str, float]
- reward(new_data_dict: dict[str, ComposedData]) dict[str, float] [source]
Return combined reward calculation and update data.
- Parameters:
new_data_dict (dict[str, ComposedData])
- Return type:
dict[str, float]
- class ComposedDataStore(satellite: Satellite, *datastore_types: type[DataStore], initial_data: ComposedData | None = None)[source]
Bases:
DataStore
DataStore for composed data types.
- Parameters:
satellite (Satellite) – Satellite which data is being stored for.
datastore_types (type[DataStore]) – DataStore types to compose.
initial_data (ComposedData | None) – Initial data to start the store with. Usually comes from
initial_data
.
- data_type
alias of
ComposedData
- get_log_state() list [source]
Pull information used in determining current data contribution.
- Return type:
list
- compare_log_states(prev_state: list, new_state: list) Data [source]
Generate a unit of composed data based on previous step and current step logs.
- Parameters:
prev_state (list)
new_state (list)
- Return type: