Using PseudoQ
Running PseudoQ
PseudoQ is packaged as an executable jar, and all its dependencies are
specified in the manifest's classpath. This means that, so long as the various
library jars are in the same directory, you can run PseudoQ with the command
java -jar PseudoQ.jar options
or
javaw -jar PseudoQ.jar options
if you wish to run it detached from the command line. If the other jars are
not found in the same directory, you will need to add the appropriate classpath
option for the Java runtime.
Switching on verbose logging
PseudoQ uses Log4J
to do its logging. The log4j.properties configuration
file included in the jar only outputs error messages. To switch on more
detailed debugging messages, use
java -Dlog4j.configuration=alternative.configuration -jar PseudoQ.jar options
to run the application. A configuration that switches on all the debug trace
messages is also included in the jar, and can be used with
java -Dlog4j.configuration=dev-log4j.properties -jar PseudoQ.jar options
Using the GUI
Starting PseudoQ with
java -jar PseudoQ.jar --gui
will open up a "launcher" window (see right).
From here, you can either click the "Load" button to open a saved
puzzle file, or "Generate/Design" to create a new puzzle, either by
entering the digits yourself into a blank grid or generated randomly by the
program.
Note: At present the automatic generation may produce puzzles that PseudoQ
is unable to solve. They should always have at least one valid solution,
however.
The puzzle window (see left) contains the grid where the digits are entered.
Digits are placed by first clicking on a cell in the grid, then clicking one of
the buttons on the right of the window. You can remove the value from a cell by
clicking the topmost "-" button. The currently selected cell is
highlighted by a coloured outline.
The window has two modes of operation: Design, in which you can set up the initial "given" cells in the grid; and Play, in which you can try to solve the puzzle. You can switch between the two modes by clicking on the corresponding radio button at the top of the window. Switching into design mode will clear any played values from the grid.
Design
In design mode you can change the value of any cell in the grid. You can check whether the current grid is solveable (so far as PseudoQ is able) by clicking the "Solve" button. If a solution is found, it will be displayed. Clear the "Show solution" checkbox to remove this and return to editing the grid. If you wish to start over, pressing the "Reset" button will completely clear the grid.
Play
In play mode you can only change the values in cells that were not initially filled. To help tell them apart, the two types of cell are diaplayed in a different colour. If you get stuck, you can click the "Hint" button to have the program attempt to find another cell whose value can be deduced. Alternatlvely you can click "Solve" to have the program attempt to solve the rest of the puzzle. Since PseudoQ works from the current state of the grid, rather than the initial "givens only" position, it may be unable to find the solution if you have filled in a cell incorrectly (e.g. if you have guessed a value or made an incorrect deduction). Or, of course, it may be that puzzle is too difficult to be solved using the methods that have been coded into the program. If you come across a published puzzle which PseudoQ can't solve but you know to be solveable, please let me know the details (either directly or via the mailing list) so that I can try to improve PseudoQ to handle it. Clicking the "Reset" button will remove the played values from the grid, leaving just the given ones.
Generate
Clicking the "Generate/Design" button on the launcher window (or selecting New from the File menu) will start a wizard to create a new puzzle.
At the first step,
select the type of puzzle you wish to create from the dropdown list.
At the second step,
select "Design manually" to start with an empty grid, or
"Generate automatically" if you want PseudoQ to create a puzzle for
you. The puzzle creation needs more work The generated puzzles will all
have at least one solution, although PseudoQ may not be able to solve them
itself. The other options (Placement pattern and Difficulty) will in some
future version influence the puzzle that is generated,
but at the moment have no effect.
Command line options
Note: At present the command line options have not been as thoroughly tested as other parts of the program, and may not all work exactly as described.
The following command line options are available:
- --gui or -g
- Open the "launcher" window
- --play or -p
- Load and play a puzzle. Must have a --file option, to specify the puzzle to play. Opens the GUI puzzle window with the specified puzzle pre-loaded.
- --solve or -s
- Load and solve a puzzle. Must have a --file option, to specify the puzzle to solve. Prints the solution to the standard output stream.
- --create or -c
- Automatically generate a random puzzle. May have a --type option specifying the puzzle type, otherwise a standard type puzzle is created. If a --file option is used, the generated puzzle is written to that file; if --gui is used, the generated puzzle is opened in the GUI puzzle window; otherwise, the puzzle is printed to the standard output stream.
- --file or -f, followed by a filename
- Specifies a file to use with the --play, --solve or --create options.
- --type or -t, followed by a puzzle type
- Used with the --create option, specifies the puzzle type to be created. The type should be one of "TINY", "MINI", "MINI_X", "SMALL_X", "STANDARD", "SUPER", "LARGE"; or "STANDARD_SAMURAI".