Tired of solving sudoku puzzles by boring old recursion? Want to titillate your grey matter? Try this!
We are going to try solving the world's toughest (allegedly) sudoku puzzle, and compare two approaches.
- Install AMPL and the solver of your choice - CPLEX, Cbc, etc.
- Solve
hardest.dat
with the provided AMPL modelmain.mod
- Solve
sudoku.py
withpython sudoku.py
- Compare execution time of both approaches
- Revel in the power of mathematical modelling as opposed to boring old Python
- Made originally during 40.302 Adv. Topics in Optimisation (Jan 2017)
- Special thanks to Prof. Ahipasaoglu