A rule-based collision avoidance system