mirror of
https://github.com/PDP-10/its.git
synced 2026-05-05 15:44:10 +00:00
CUBE, Rubik's cube.
Files provided by the author, Bernard Greenberg.
This commit is contained in:
83
doc/bsg/cube.info
Normal file
83
doc/bsg/cube.info
Normal file
@@ -0,0 +1,83 @@
|
||||
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.
|
||||
81
doc/bsg/cube.templt
Normal file
81
doc/bsg/cube.templt
Normal file
@@ -0,0 +1,81 @@
|
||||
(INTRODUCTION
|
||||
(|A shorter version of this file without instructions is AI:BSG;CUBE BFTPLT|)
|
||||
|This file is a template for inputting cube configurations to the
|
||||
cube program. It is Lisp-readable. To use it, COPY it and follow
|
||||
instructions. Consider your cube unwrapped as the floor-plan
|
||||
of a Gothic Cathedral:
|
||||
|
||||
U U U
|
||||
U U U
|
||||
U U U
|
||||
|
||||
L L L F F F R R R B B B
|
||||
L L L F F F R R R B B B
|
||||
L L L F F F R R R B B B
|
||||
|
||||
D D D
|
||||
D D D
|
||||
D D D
|
||||
|
||||
(The transept U and D are the TOP and BOTTOM, the nave L F R B
|
||||
is the Left Front Right and Back (U/D notation for top/bottom
|
||||
due to Singmaster, to disambiguate Back/Bottom in English.))
|
||||
|
||||
Below I have put the colors for my personal cube in its rest state.
|
||||
Edit your COPY of this file so that it corresponds to your cube. The
|
||||
orientations of the sides in this file are as in the plan above. You
|
||||
may use abbreviations for the colors: R = red, O = orange, etc. B is
|
||||
assumed to be blue, if you have black you must say it. You may edit
|
||||
out this leading comment from your files, but the other comments must
|
||||
stay.|)
|
||||
|
||||
(TOP |of your cube. The top row here adjoins the back,
|
||||
the bottom adjoins the front, the left and right sides
|
||||
adjoin the left and right of the cube, respectively|)
|
||||
|
||||
WHITE WHITE WHITE
|
||||
WHITE WHITE WHITE
|
||||
WHITE WHITE WHITE
|
||||
|
||||
(LHS |(Left hand side) of your cube. The top row here adjoins the
|
||||
top of your cube, and the bottom row adjoins the bottom.
|
||||
The left side of this face adjoins the back, the right the front.|)
|
||||
|
||||
BLUE BLUE BLUE
|
||||
BLUE BLUE BLUE
|
||||
BLUE BLUE BLUE
|
||||
|
||||
(FRONT |of your cube. The top row here is the top, the bottom the
|
||||
bottom, the left the left, and the right the right.|)
|
||||
|
||||
RED RED RED
|
||||
RED RED RED
|
||||
RED RED RED
|
||||
|
||||
(RHS |(Right hand side) of your cube. The top row here adjoins
|
||||
the top of your cube, the bottom row the bottom. The
|
||||
left and right sides adjoin the front and back, respectively.|)
|
||||
|
||||
GREEN GREEN GREEN
|
||||
GREEN GREEN GREEN
|
||||
GREEN GREEN GREEN
|
||||
|
||||
(BACK |of your cube. The top row here adjoins the top of your cube,
|
||||
and the bottom row the bottom. The left and right edges
|
||||
of this entry adjoin what are normally the right and left
|
||||
hand sides of the cube, since this is the back.|)
|
||||
|
||||
ORANGE ORANGE ORANGE
|
||||
ORANGE ORANGE ORANGE
|
||||
ORANGE ORANGE ORANGE
|
||||
|
||||
(BOTTOM |of your cube. The top row here adjoins the front of your
|
||||
cube. The bottom row adjoins the back. The left and right
|
||||
adjoin the normal left and right hand facesof the cube.|)
|
||||
|
||||
YELLOW YELLOW YELLOW
|
||||
YELLOW YELLOW YELLOW
|
||||
YELLOW YELLOW YELLOW
|
||||
|
||||
(END |of cube input template. Read this COPIED file in via the
|
||||
^F command of :cube.|)
|
||||
Reference in New Issue
Block a user