A collision avoidance algorithm with intention prediction for inland waterways ships