I love programming, therefore I often write programs, small or large, for different purposes.
For instance, I often write programs for my research. However, this page is dedicated to a more frivolous kind of programming. It is basically a place for me to place little (or not so little) programs I wrote and make them available to whoever wants to look at them.
A friend was learning OCaml while working on a project insolving a SAT solver. So I decided to write an interface in OCaml for the popular SAT solver MiniSat. Since the result was interesting, I decided to publish it here.
NEW: Version 0.2 (10/24/2007):
- Added a function to reset the state of the solver so that multiple problems can be solved during a single execution.
Available here: MiniSat-ocaml-0.2.v1.14.tar.bz2
Today I was solving a simple sudoku puzzle (e.g., ref) that I got from a magazine. Half way through it, I noticed I made a mistake, because it became unsolvable. At this point, I thought that I could write a program to solve the puzzle. And so it happened. I wrote a small program in OCaml to solve a sudoku puzzle. In specific, I wrote a solver that does not use backtracking and therefore can only solve "easy" puzzles. What would be really interesting is writing a "grader" of sudoku puzzles, that determines the complexity of the puzzle. Probably the amount of backtracking that is needed to solve it would be a good way to do that. In easy puzzles, for instance, backtracking is not required.
Available here: sudoku.tar.bz2