Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

sudoku solver in prolog

Options
  • 15-11-2007 12:32am
    #1
    Registered Users 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 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