Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/texus/battleship-puzzle-solver

Prolog program that solves battleship puzzles, written as a university assignment.
https://github.com/texus/battleship-puzzle-solver

Last synced: 18 days ago
JSON representation

Prolog program that solves battleship puzzles, written as a university assignment.

Awesome Lists containing this project

README

        

Battleship Puzzle Solver
========================

This program was a university assignment.

The program is not suitable to solve difficult puzzles within reasonable time.
- A completely empty 6x6 puzzle can be solved in just a few seconds
- An 8x8 puzzle with 20 out of the 64 cells filled in will take around 5 seconds.
- An 8x8 puzzle with 15 out of the 64 cells filled in will take around 35 seconds.

Run
---

These instructions are for linux only, but the program will also work under different operating systems.

Start your prolog interpreter
swipl

Load the code
?- ['Battleship.pl'].

You can now also load and run the examples
?- ['Examples.pl'].
?- example2.