Baseline Controller
This module contains functionality for evaluating a baseline controller and generating scores and visualizations for a high-altitude balloon environment.
- Modules:
Baseline controller functions
Evaluation and plotting utilities
- baseline_controller.baseline_controller(obs)[source]
Given the current altitude and a list of relative flow column entries ([altitude, relative angle, speed]), this function returns the best altitude to transition to in order to minimize the relative angle and the action needed to reach that altitude.
- Parameters:
obs (dict) – Observation dictionary containing: - altitude (float): The current altitude. - flow_field (list of lists): Each list contains [altitude, relative angle, speed].
- Returns:
float: The best altitude to transition to.
int: Action to take (2 for up, 1 for stay, 0 for down).
- Return type:
tuple
- baseline_controller.baseline_controller_thresholded(obs, angle_threshold=0.17453292519943295)[source]
Given the current altitude and a list of relative flow column entries ([altitude, relative angle, speed]), this function returns the closest altitude to transition to within a specified angular threshold, and the action needed to reach that altitude. If no altitude is found within the threshold, it will select the next best altitude outside the threshold.
- Parameters:
obs (dict) – Observation dictionary containing: - altitude (float): The current altitude. - flow_field (list of lists): Each list contains [altitude, relative angle, speed].
angle_threshold (float) – Maximum allowable relative angle for selecting an altitude.
- Returns:
float: The best altitude to transition to.
int: Action to take (2 for up, 1 for stay, 0 for down).
- Return type:
tuple