Battleship game in Python and XSB Prolog