random generator Java Applet

Programs which generate, solve, and analyze Sudoku puzzles

random generator Java Applet

Postby cardinal » Sat Oct 04, 2008 5:06 pm

my Java Applet.

Generates random puzzles, and solves ANY puzzle. It is also very fast at solving.
you can use also Java Console to export the puzzles in CSV format.

the puzzles are also minimal, if you remove any clue, it' is not a valid sudoku anymore:)

http://www.geocities.com/poarca/applets/sudoku/applfft.html
cardinal
 
Posts: 9
Joined: 04 October 2008

Postby Bob Hanson » Tue Dec 23, 2008 1:27 am

nice! -- a few questions:

Are you planning to make this opensource? (For example, at SourceForge.net?)

The hint looks more like a "step" to me -- perhaps it should be labeled that way?

This could be quite valuable if a JavaScript interface were included. So one could, for example, have it on a site of one's own, load it, run it, checking its state, etc. What do you think about that?

Any prospect of introducing marks?

Can you outline the strategy involved?

Is there any correlation between what the hints produce and what a human would do?
Bob Hanson
 
Posts: 75
Joined: 04 December 2005

Postby cardinal » Fri Jan 16, 2009 3:00 pm

sorry i'm late.

my ambition was to make it absolutely random.


so, the 'Hint' step is random, also:)
I simply solve the puzzle, and reveal one more clue randomly picked


being random, is not a logically 'next', if you try the same puzzle, you will get differents hints
cardinal
 
Posts: 9
Joined: 04 October 2008

Postby cardinal » Fri Jan 16, 2009 3:25 pm

i dont' know java scripting:(
it is open source, just download the .java source and you can use the solver engine it in your JAVA code :


#instantiate a 'sudoku' object ; you can do it only once

mysudoku=new sudoku();

repeat the following :
#call clear_clues() to clear table

mysudoku.clear_clues();

#put clues one by one

mysudoku.put_clue_friendly(row,col,value); // 1..9 1..9 1..9

#call solver

mysudoku.solv();

#get status and solution one by one


status=mysudoku.get_status();

1 = multiple 2 = single 3 = none

value=mysudoku.get_solution_friendly(row,col); // 1..9 1..9 return 1..9

Good Luck !
cardinal
 
Posts: 9
Joined: 04 October 2008

difficulty ?

Postby cardinal » Sat Jan 31, 2009 11:59 am

finally I added also mine a posibility of choosing the difficulty

simply put, a easy one is a puzzle that can be solved only with naked/hidden singles/doubles, and line box interactions (generates likeable playable puzzles)

a hard one, is the opposite of easy:) (generates miserable ugly ones:D )


still they are random, so i keep creating them indefinitely until one satisfies condition
cardinal
 
Posts: 9
Joined: 04 October 2008


Return to Software