Mikrotik WDS Frame Forward

what algorithm a Mikrotik AP in a WDS multi hope network uses to choose the best next relay station to forward a 802.11 frame to?