This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def choose_actions(sensors, predicted_tracks, reward_function, smapping=[0,2], tmapping=[0,2]): | |
"""Work out which action to take. Sensors must be able to return actions, a collection which is either | |
iterable or testable for membership. Tracks have been predicted to a time of interest in advance (this | |
logic could exist inside choose actions with the addition of a :class:`Predictor`. A reward function is | |
passed - or could be accessed from the parent state. Mappings to the x,y position of sensor and track are | |
provided - it's assumed that the angle to target is in x,y on a flat earth.)""" | |
# Firstly, can a sensor see a target? Create a dictionary of those | |
sensor_target_pair = dict() | |
for sensor in sensors: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.