Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

sudoku solver in prolog

  • 15-11-2007 12:32AM
    #1
    Registered Users, Registered Users 2 Posts: 1,829 ✭✭✭


    hey guys, i need help to create a sudoku solver in prolog, anyone know where i could get one or get help with one?


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    You could start by reading this.


  • Closed Accounts Posts: 413 ✭✭sobriquet


    I wrote one for fun a few years ago. Didn't work 100% but I never bothered to finish it. If you can do basic prolog it's really not that hard. Build a set of definitions for your 9x9 grid and what value is at each. For each cell define a list of the actual value or possible values. After that it's just a search problem and given that you're probably doing a college assignment you've probably already been shown how to code a Depth- or Breadth-First search. Implement one of those.


Advertisement