Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

AAAI Poster ConSystLab

VIEWS: 32 PAGES: 2

									                                            An Interactive Constraint-Based Approach to Sudoku
                   Christopher G.              Kai-Chen          Reeson1 •
                                                                  Kenneth M.            Berthe Y.       Huang 2 •                             Bayer 1 •                            Choueiry1,2
1Constraint Systems Laboratory, University of Nebraska-Lincoln • 2Information Sciences Institute, University of Southern California

                       Solver: sudoku.unl.edu/Solver • Constructor: sudoku.unl.edu/Constructor
                      Goals                                                                                     Solver                                                                                   Constraint Propagation
• To the public:                                        Solver is a Java applet that uses CP techniques to support the user to play Sudoku.
  – Illustrate the power of CP                          The player can…
• For the research:                                    …load an instance                                                                                                                                                       FC
  – Investigate the use of CP to interactively         from the online
    support & guide human players
                                                       library                                                                                     …undo/redo any action
• For education:                                                                                                                                                                                                               AC
  – Teach basic and advanced CP techniques
                                                                                                                                                 …assign all cells whose
                                                       …assign values to
• For insight into human reasoning:                                                                                                           domains have a single value
  – Understand how it differs from                     cells and play the
    algorithmic approaches                             game without aid
                                                                                                                                                   …check the number of
                    Sudoku                                                                                                                                 solutions left                                                    GAC
 A Sudoku…                                             …display the
 • is well posed if it has a single solution           remaining values                                                                            …apply a variety of CP
 • is minimal if removing any ‘given’ yields           in the domain of                                                                                       techniques
   more than one solution                              each cell
 • is symmetric if the filled cells on the
   grid exhibit some axial symmetry
                                                                                                                                                                                                                             SAC
                                                       Solver displays the number of hints. The user                   Hint highlights the        Solver detects errors
                                                       can iterate through them.                                       cell that the player       and highlights the
                                                                                                                       needs to think             variables in the broken
                                                                                                                       about..                    constraint…
                                                                                                                                                                                                                        SGAC
                                                       The user can choose the
                                                       type of hint & the level
                                                       of consistency:
                                                                                                                                                                                                                                                   FC

                                                         • 2 types of hints: Singleton & Vital                                                                                                                                                    AC
                                                         • 8 levels: FC, AC, Single GAC, GAC,
                                                           Single SAC, SAC, Single SGAC, SGAC                                                                                                                                      GAC                      SAC
             #15 on Royle’s web   site1                                                                                                                                                             … cannot remove
                                                                                                                                                                                                    more values than..
                                      CSP Models                                                                                       Constructor                                                                                              SGAC
 Each cell is a variable whose domain is set of numbers 1…9. The constraints are                                     • Supports entering & storing instances                               Conjectures:
 ‘all-different’ constraints on each row, column, and block.                                                         • Counts & displays all solutions                                     1. SGAC solves well-posed 9x9 Sudoku
                                          We can model each                                                                                                                                2.SGAC  relation (1,2)consistency
                                          all-diff constraint
                                          either as a set of                                                                                                                               Observations: Human players…
                                          binary mutex                                                                                                                                     … can do GAC after some training
                                          constraints...                                …or as a single                                                                                    … cannot mentally do shaving (i.e., SAC,
                                                                                     non-binary alldiff                                                                                      SGAC)
                                                                                         constraint of                                                                                     … solve Sudoku using convoluted
                                                                                               arity 9.                                                                                      patterns with imaginative names.
             We implement both models to allow the player to compare and understand                                                                                                          Often, several patterns correspond
             the effectiveness of constraint propagation operating on each model.                                                                                                            to the same propagation mechanism

                         Support: UCARE grant awarded to Chris Reeson & CAREER Award #0133568 from the National Science Foundation.                                                                        References
                                                                                                                                                               1. Gordon Royle. Minimum Sudoku. people.csse.uwa.edu.au/gordon/sudokumin.php, 2005
                                                                                                                                                               2. Helmut Simonis. Sudoku as a Constraint Problem. Workshop on Modeling and Refomulating CSPs, 2005
                                            An Interactive Constraint-Based Approach to Sudoku
                   Christopher G.              Kai-Chen          Reeson1 •
                                                                  Kenneth M.            Berthe Y.       Huang 2 •                             Bayer 1 •                            Choueiry1,2
1Constraint Systems Laboratory, University of Nebraska-Lincoln • 2Information Sciences Institute, University of Southern California

                       Solver: sudoku.unl.edu/Solver • Constructor: sudoku.unl.edu/Constructor
                      Goals                                                                                     Solver                                                                                   Constraint Propagation
• To the public:                                        Solver is a Java applet that uses CP techniques to support the user to play Sudoku.
  – Illustrate the power of CP                          The player can…
• For the research:                                    …load an instance                                                                                                                                                       FC
  – Investigate the use of CP to interactively         from the online
    support & guide human players
                                                       library                                                                                     …undo/redo any action
• For education:                                                                                                                                                                                                               AC
  – Teach basic and advanced CP techniques
                                                                                                                                                 …assign all cells whose
                                                       …assign values to
• For insight in human reasoning:                                                                                                             domains have a single value
  – Understand how it differs from                     cells and play the
    algorithmic approaches                             game without aid
                                                                                                                                                   …check the number of
                    Sudoku                                                                                                                                 solutions left                                                    GAC
 A Sudoku…                                             …display the
 • is well posed if it has a single solution           remaining values                                                                            …apply a variety of CP
 • is minimal if removing any ‘given’ yields           in the domain of                                                                                       techniques
   more than one solution                              each cell
 • is symmetric if the filled cells on the
   grid exhibit some axial symmetry
                                                                                                                                                                                                                             SAC
                                                       Solver displays the number of hints. The user                   Hint highlights the        Solver detects errors
                                                       can iterate through them.                                       cell that the player       and highlights the
                                                                                                                       needs to think             variables in the broken
                                                                                                                       about..                    constraint…
                                                                                                                                                                                                                          SGA
                                                       The user can choose the
                                                       type of hint & the level
                                                                                                                                                                                                                          C
                                                       of consistency:
                                                                                                                                                                                                                                                   FC

                                                         • 2 types of hints: Singleton & Vital                                                                                                                                                    AC
                                                         • 8 levels: FC, AC, Single GAC, GAC,
                                                           Single SAC, SAC, Single SGAC, SGAC                                                                                                                                       GAC                     SAC
             #15 on Royle’s web   site1                                                                                                                                                             … cannot remove
                                                                                                                                                                                                    more values than..
                                      CSP Models                                                                                       Constructor                                                                                              SGAC
 Each cell is a variable whose domain is set of numbers 1…9. The constraints are                                     • Supports entering & storing instances                               Conjectures:
 ‘all-different’ constraints on each row, column, and block.                                                         • Counts & displays all solutions                                     1. SGAC solves well-posed 9x9 Sudoku
                                          We can model each                                                                                                                                2.SGAC  relation (1,2)consistency
                                          all-diff constraint
                                          either as a set of                                                                                                                               Observations: Human players…
                                          binary mutex                                                                                                                                     … can do GAC after some training
                                          constraints...                                …or as a single                                                                                    … cannot mentally do shaving (i.e., SAC,
                                                                                     non-binary alldiff                                                                                      SGAC)
                                                                                         constraint of                                                                                     … solve Sudoku using convoluted
                                                                                               arity 9.                                                                                      patterns with imaginative names.
             We implement both models to allow the player to compare and understand                                                                                                          Often, several patterns correspond
             the effectiveness of constraint propagation operating on each model.                                                                                                            to the same propagation mechanism

                         Support: UCARE grant awarded to Chris Reeson & CAREER Award #0133568 from the National Science Foundation.                                                                        References
                                                                                                                                                               1. Gordon Royle. Minimum Sudoku. people.csse.uwa.edu.au/gordon/sudokumin.php, 2005
                                                                                                                                                               2. Helmut Simonis. Sudoku as a Constraint Problem. Workshop on Modeling and Reformulating CSPs, 2005

								
To top