Learning the racing rules of sailing game