mirror of
https://github.com/PDP-10/its.git
synced 2026-01-14 07:40:05 +00:00
84 lines
4.2 KiB
Plaintext
84 lines
4.2 KiB
Plaintext
Rubik (Hungarian) Cube modelling/solving system --
|
|
-Bernard Greenberg 21 October 1980
|
|
|
|
This system consists of programs that know how to model, manipulate,
|
|
and "solve" (return to 6-faces-solid state) the 3x3x3 colored-cube problem
|
|
invented by Rubik, the Hungarian architect.
|
|
|
|
The Cube consists of a 2-inch cube divided into (apparently) 27 smaller
|
|
cubes. Initially, each face of the large cube is of the same color. Each
|
|
face of the (large) cube is thus divided into nine squares. Each face of the
|
|
(large) cube can be rotated fully, 360 degrees, dynamically changing three of
|
|
the squares of each of its (four) neighboring faces as it rotates. Thus,
|
|
the colors of the squares on the faces are permuted by rotating
|
|
different faces of the (large) cube successively. The goal of the problem
|
|
is to return to cube to the state where each face is of a solid color,
|
|
by rotating faces until this is true. The problem is extremely difficult
|
|
(solutions in less than 72 hours are unheard of), as turning any face
|
|
destroys any work accomplished in almost any other face in achieving the goal.
|
|
|
|
The system basically displays the 6 faces of the cube, allows you to
|
|
"select" a face and rotate it, (any number of times/faces), randomize the
|
|
cube by generating turns from a random number generator, and features a
|
|
solution algorithm of my own devising. The system allows saving and
|
|
restoring of cube images.
|
|
|
|
The systems exists in three implementations, Multics, ITS, and the
|
|
Lisp Machine (LISPM). All three implementations basically do the
|
|
same thing, and accept the same commands (although the LISPM and Multics
|
|
version have a few extra commands, and the LISPM actually draws cubes,
|
|
in color on Color LISPM's).
|
|
|
|
On Multics, the implementation is as an Emacs Mode. Type ESC-X
|
|
loadfile>udd>m>bsg>cube-mode CR. To start it up, type ESC-X hack-cube
|
|
CR.To find out the repertoire of commands, do an ESC-X describe hack-cube
|
|
CR, and an apropos of "cube" after having done a hack-cube, and ESC-?
|
|
individual commands.
|
|
|
|
On ITS, invoke :CUBE on AI, MC, or ML. The repertoire of commands
|
|
will be displayed. Commands are single character, and acted upon
|
|
immediately. Only display terminals are supported.
|
|
|
|
On a Lisp Machine, a cube is actually portrayed and updated
|
|
on the screen, and in color if you have it. To load the appropriate files,
|
|
do (load "bsg;cubpkg"). To run it, then do "(cube)". The first
|
|
time you do so, it will take a minute or so.
|
|
|
|
The source for this system is kept as follows. On MIT-Multics, the
|
|
segments are in >udd>m>bsg>cbd. On System M, they are in
|
|
>udd>m>bsg>cbd>cube.archive. On MIT-AI, they are in the BSG dir. The
|
|
LISPM system is also on AI:BSG.
|
|
|
|
The following are the source modules. Note that some are missing or
|
|
non-implemented in some implementations.
|
|
|
|
This group of modules is IDENTICAL across implementations:
|
|
|
|
Multics ITS LISPM Description
|
|
|
|
cube.lisp CUBE > CUBE > Cube representation/manip.
|
|
cube-utils.lisp CUTILS > CUTILS > Utilities for solver
|
|
solve-cube.lisp CSOLVE > CSOLVE > Solution algorithm
|
|
cube-dcls.incl.lisp CUBE DCLS CBDCLS > Macros for above two pgms.
|
|
cube-solve-dcls.incl.lisp CSOLVE DCLS CSDCLS > Macros for solver.
|
|
(not implemented yet) CINPUT > -not-yet- Cube input-file reader
|
|
(not installed) CXFRM > CXFRM > Pre-stored transforms.
|
|
-not-yet- CUBE TEMPLT CUBE TEMPLT template input file
|
|
once-only.incl.lisp OONL > OONL > A hairy lisp macro needed.
|
|
|
|
These next modules are completely different for each system. They implement
|
|
the command interface:
|
|
|
|
cube-mode.lisp Emacs mode for Multics impl
|
|
CDRIV > Video Lisp driver for ITS
|
|
QQC > Driver for Lispm, window
|
|
system hackery.
|
|
|
|
The following modules are specific to the Lisp Machine implementation:
|
|
|
|
CUBPKG > Package definition for cube system.
|
|
CUBRDF > Redefinitions to patch around Lisp Machine bugs.
|
|
QCOLOR > Cube color/stipple projection/display.
|
|
|
|
Dave Christman (DPC) worked with me on QCOLOR/QQC.
|