[R-sig-finance] [offtopic] solving sudoku in R?
Krishna Kumar
kriskumar at earthlink.net
Sat Jan 28 01:07:29 CET 2006
Achim thanks for pointing to David's package not being on R-help I
missed the recent announcement.
Gabor thanks for lpSolve. Any hints ?
>>What __ON EARTH__ has this to do with R-SIG-Finance ??
>>REALLY, this belongs to R-help and nowhere else!
Martin, Ya it is a very tenuous link but my motivation was to generate ideas. And to get
pointers to R-packages out there. I will try R-help next time.
David, Thanks for sending me the updated version. I will have a go at
it. From the preliminary comparison your original
version is faster my updated version see attached does better and at
times is blazingly fast but lacks consistency..
As you can see I use random permutations but it still is brute force and
the search tree is different in any two attempts.
I think it might be worth trying to compare the speed over a set of
problems with different levels of complexity.
And for what it is worth I have attached a simple sudoku generator.
> puzzle<-gensudoku(entropy=30)
Generates a puzzle, entropy determines the difficulty.
Best,
Kris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rsudoku.r
Url: https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20060127/29f60233/rsudoku.pl
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sudokugen.r
Url: https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20060127/29f60233/sudokugen.pl
More information about the R-sig-finance
mailing list