#!/usr/bin/perl -w use strict; use Games::LMSolve::Registry; my $r = Games::LMSolve::Registry->new('default_variant' => "minotaur"); $r->main(); __END__ =head1 NAME lm-solve - A Computerized Solver for Logic Mazes =head1 SYNOPSIS B [options] I =head1 DESCRIPTION This program is a front end for the LM-Solve Perl modules that can be used to solve any of the number of Logic Mazes present on the Logic Mazes site (http://www.logicmazes.com/) and similar sites. To use this program you should create a text file describing the layout of the game and your current position (most probably the initial one). Then invoke B with its path as input. Alternatively, by specifiying I<-> as the filename, then B will read the layout from the standard input. One can find an archive containing some written-down layouts for some of the puzzles on the web on the LM-Solve homepage. The format of the layouts for the various puzzle types is described below. =head1 OPTIONS =over 8 =item B<--help> B<-h> B<-?> Display a help message on the screen. =item B<--man> Invoke the UNIX B command to display the man-page of this program. =item B<-g> I | B<--game> I Specify the I to use for the game. Currently available variants are: B - Alice Mazes B - Theseus and the Minotaur Mazes B - Number Mazes B - Planks in the Swamp Puzzles B - Tilt Mazes with one goal B - Tilt Mazes with multiple goals B - A Red-Blue Tilt Puzzle =item B<--rle> B<--norle> This options toggle run-length encoding of the moves displayed on and off. What it means is that several identical consecutive moves will be displayed as "B * B". The default is B<--rle>. =item B<--output-states> B<--nooutput-states> B<--output-states> will precede each line with the state of the game up to the move displayed on it. The default is B<--nooutput-states> =item B<--method> I Specifies the scan to use for solving the game: B - Breadth-First Search. Finds minimal solutions, but possibly slower than other scans. B - Depth-First Search. =item B<--rtd> B<--nortd> B<--rtd> stands for "Run-Time Display". This option will print the states of the scan that were arrived to, as the scan encounters them. The default is B<--nortd>. =back =head1 Generic Board Format The format of the board is that of a file containing keys and values on each line, in the format "key=value". A value can be an integer (e.g: "x=6"), an (x,y) integral pair (e.g: "dims=(3,6)"), an array of pairs (e.g: "goals="[(5,6), (3,8), (0, 3)]"), an array of start and end pairs (e.g: "Planks = [ ((0,2) -> (3,2)) , ((6,5) -> (7,5)) ]") or a layout specification. The latter begins with "<: http://vipe.technion.ac.il/~shlomif/lm-solve/ B: http://www.logicmazes.com/ B: http://www.gjnem.demon.co.uk/ =head1 AUTHOR Shlomi Fish =cut