SGTโ€BLACKBOX(6)

๐ŸŒธ NAME ๐ŸŒธ

okay so bestie, welcome to sgt-blackbox(6) โ€” it lives in the Games section of the manual, and it is, and I cannot stress this enough, a ball-finding puzzle. ๐Ÿ’… that's the whole vibe. lowercase name, big brain energy.


โœจ SYNOPSIS โœจ

here's how you summon it, copy it exact bestie:

sgt-blackbox [--generate n] [--print wxh [--with-solutions] [--scale n]
[--colour]] [game-parameters|game-ID|random-seed]

sgt-blackbox --version

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so. there are a bunch of balls hidden inside a rectangular arena. yes, balls. and your job โ€” your main character mission โ€” is to figure out exactly where every single one of them is hiding. ๐Ÿ™ˆ how? you do not peek. you fire lasers from the edges of the arena and you watch what the beams do. that's it. that's the game. it's giving detective. it's giving physics girlie. we love her. ๐Ÿ”ฅ

okay so a beam shoots straight out from wherever it started until it hits the opposite side of the arena, at which point it pops back out. easy, right? โœจunlessโœจ a ball messes with it, in one of these ways:

  • a beam that hits a ball head-on gets absorbed and will never re-emerge. and yes, that counts beams that meet a ball on the very first rank of the arena. rip beam. ๐Ÿ’€
  • a beam with a ball in its front-left square and no ball ahead of it gets deflected 90 degrees to the right. slay, turn.
  • a beam with a ball in its front-right square and no ball ahead of it gets similarly deflected to the left. symmetrical queen. ๐Ÿ’–
  • a beam that would re-emerge from its entry location is considered to be โ€˜reflectedโ€™.
  • a beam which would get deflected before entering the arena by a ball to the front-left or front-right of its entry point is also considered to be โ€˜reflectedโ€™.

and here's how those vibes show up on screen: reflected beams show up as a โ€˜Rโ€™; beams that smack a ball head-on show up as an โ€˜Hโ€™. ๐ŸŒˆ otherwise you just get a number at the firing point and at the spot where the beam emerges โ€” and that number is unique to that shot. iykyk. ๐Ÿ”ข

you can place guesses about where the balls are, based on all those entry and exit patterns, and once you've placed enough balls a button shows up that lets you get your guesses checked. โœ…

here's a lil diagram showing how ball positions create each of the beam behaviours up above:

 1RHR----
|..O.O...|
2........3
|........|
|........|
3........|
|......O.|
H........|
|.....O..|
 12-RR---

and as you can see, a beam can catch multiple reflections before it re-emerges (look at turn 3, bestie ๐Ÿ‘€). similarly, a beam may be reflected (possibly more than once!) before it takes a hit โ€” that's the โ€˜Hโ€™ on the left side of the example right there.

ok now a warning, and it's a real one: any layout with more than 4 balls may have a non-unique solution. ๐Ÿ˜ญ

the next diagram shows exactly what that means โ€” if you know the board has 5 balls, it is impossible to determine where that fifth ball is. the possible positions are marked with an x:

 --------
|........|
|........|
|..O..O..|
|...xx...|
|...xx...|
|..O..O..|
|........|
|........|
 --------

so for that reason, when you have your guesses checked, the game checks that your solution produces the same results as the computer's โ€” not that your solution is identical to the computer's. ๐Ÿซถ so in the example up there, you could stick that fifth ball at any of the locations marked with an x and you would still win. periodt. ๐Ÿ‘‘

fun lil history moment (we love a history moment): Acornsoft published versions of Black Box for the Acorn Atom and the BBC Microcomputer in the early 1980s. ๐Ÿ•ฐ๏ธ and the puzzle was contributed to this collection by James Harvey. ty king ๐Ÿ‘‘


๐ŸŽ€ Black Box controls ๐ŸŽ€

to fire a laser beam, left-click in a square around the edge of the arena. the results show up immediately, no waiting around, we are not a loading screen. โšก clicking or holding the left button on one of those squares will highlight the current go โ€” or a previous go โ€” to confirm the exit point for that laser, if applicable. โœจ

to guess where a ball is, left-click within the arena and a black circle appears marking your guess. click it again to remove the guessed ball. ๐Ÿ–ค

locations in the arena may be locked against modification by right-clicking. whole rows and columns can be locked the same way โ€” right-click in the laser square above/below that column, or to the left/right of that row. ๐Ÿ”’

you can also cruise around the grid with the cursor keys. press Enter to fire a laser or drop a new ball-location guess, and press Space to lock a cell, row, or column. ๐Ÿ’ซ

once you've guessed an appropriate number of balls, a button pops up at the top-left corner of the grid; click that (mouse or cursor, either one) and it'll check your guesses. โœ…

if you hit that โ€˜checkโ€™ button and your guesses are not correct, the game shows you the minimum information necessary to prove it to you, so you can try again. ๐Ÿซถ specifically: if your ball positions aren't consistent with the beam paths you already know about, one beam path will be circled to show that it proves you wrong. and if your positions match all the existing beam paths but are still wrong, one new beam path will be revealed (written in red) which isn't consistent with your current guesses. ๐Ÿ‘€

if you decide to fully give up โ€” no shame, it happens โ€” you can select Solve to reveal the actual ball positions. at that point:

  • correctly-placed balls show as filled black circles ๐Ÿ–ค
  • incorrectly-placed balls show as filled black circles with red crosses โŒ
  • missing balls show as filled red circles ๐Ÿ”ด

plus, a red circle marks any laser you'd already fired which isn't consistent with your ball layout (just like when you press the โ€˜checkโ€™ button), and red text marks any laser you could have fired in order to distinguish your ball layout from the correct one. ๐Ÿ’…

(all the actions described below are also available.)


๐ŸŒˆ Black Box parameters ๐ŸŒˆ

these parameters are available from the โ€˜Custom...โ€™ option on the โ€˜Typeโ€™ menu.

โญ Width, Height

size of grid in squares. there are 2 ร— Width ร— Height lasers per grid โ€” two per row and two per column. ๐Ÿ“

โญ No. of balls

number of balls to place in the grid. this can be a single number, or a range (separated with a hyphen, like โ€˜2-6โ€™), and it determines the number of balls to place on the grid. the โ€˜revealโ€™ button is only enabled if you've guessed an appropriate number of balls โ€” but a guess using a different number to the original solution is still acceptable, if all the beam inputs and outputs match. ๐ŸŽฏ


๐Ÿ”ฅ Common actions ๐Ÿ”ฅ

these actions are all available from the โ€˜Gameโ€™ menu and via keyboard shortcuts, in addition to any game-specific actions. ๐ŸŽฎ

(on Mac OS X, to conform with local user interface standards, these actions are situated on the โ€˜Fileโ€™ and โ€˜Editโ€™ menus instead. ๐ŸŽ)

๐Ÿ’– New game (โ€˜Nโ€™, Ctrl+โ€˜Nโ€™)

starts a new game, with a random initial state. fresh start, new me. โœจ

๐Ÿ’– Restart game

resets the current game to its initial state. (and yes โ€” this can be undone.) ๐Ÿ”„

๐Ÿ’– Load

loads a saved game from a file on disk. ๐Ÿ“‚

๐Ÿ’– Save

saves the current state of your game to a file on disk. ๐Ÿ’พ

the Load and Save operations preserve your entire game history โ€” so you can save, reload, and still Undo and Redo things you had done before saving. no cap. ๐Ÿซถ

๐Ÿ’– Print

where supported (currently only on Windows), brings up a dialog allowing you to print an arbitrary number of puzzles randomly generated from the current parameters, optionally including the current puzzle. ๐Ÿ–จ๏ธ (only for puzzles which make sense to print, of course โ€” it's hard to think of a sensible printable representation of Fifteen! ๐Ÿ˜ญ)

๐Ÿ’– Undo (โ€˜Uโ€™, Ctrl+โ€˜Zโ€™, Ctrl+โ€˜_โ€™, โ€˜*โ€™)

undoes a single move. (you can undo moves all the way back to the start of the session. yes really. ๐Ÿ•ฐ๏ธ)

๐Ÿ’– Redo (โ€˜Rโ€™, Ctrl+โ€˜Rโ€™, โ€˜#โ€™)

redoes a previously undone move. โฉ

๐Ÿ’– Copy

copies the current state of your game to the clipboard in text format, so you can paste it into (say) an e-mail client or a web message board if you're discussing the game with someone else. (not all games support this feature.) ๐Ÿ“‹

๐Ÿ’– Solve

transforms the puzzle instantly into its solved state. ๐Ÿช„ for some games (Cube) this feature isn't supported at all because it's of no particular use. for other games (such as Pattern), the solved state can be used to give you information, if you can't see how a solution can exist at all, or you want to know where you made a mistake. for still other games (such as Sixteen), automatic solution tells you nothing about how to get to the solution, but it does provide a useful way to get there quickly so that you can experiment with set-piece moves and transformations. ๐Ÿง 

some games (such as Solo) are capable of solving a game ID you've typed in from elsewhere. other games (such as Rectangles) cannot solve a game ID they didn't invent themself โ€” but when they did invent the game ID, they know what the solution is already. still other games (Pattern) can solve some external game IDs, but only if they aren't too difficult. ๐Ÿ™ƒ

the โ€˜Solveโ€™ command adds the solved state to the end of the undo chain for the puzzle. in other words, if you want to go back to solving it yourself after seeing the answer, you can just press Undo. ๐Ÿ’…

๐Ÿ’– Quit (โ€˜Qโ€™, Ctrl+โ€˜Qโ€™)

closes the application entirely. bye bestie ๐Ÿ‘‹

๐Ÿ’– Preferences

where supported, brings up a dialog allowing you to configure personal preferences about a particular game. some of these preferences will be specific to a particular game; others will be common to all games. โš™๏ธ

one option common to all games lets you turn off the one-key shortcuts โ€” like โ€˜Nโ€™ for new game or โ€˜Qโ€™ for quit โ€” so there's less chance of hitting them by accident. ๐Ÿ™ˆ you can still access the same shortcuts with the Ctrl key.


ok bestie that's part one, there's more coming so don't go anywhere ๐Ÿ’–

๐Ÿ’– Specifying games with the game ID ๐Ÿ’–

okay bestie so here's the tea โ˜• โ€” there are literally two ways to save a game specification out of a puzzle so you can recreate it later, or recreate it in somebody else's copy of the same puzzle. iconic, right? ๐Ÿซถ

The โ€˜Specificโ€™ and โ€˜Random Seedโ€™ options from the โ€˜Gameโ€™ menu (or the โ€˜Fileโ€™ menu, on Mac OS X) each show you a piece of text (a โ€˜game IDโ€™) which is enough โ€” like, sufficient โ€” to reconstruct precisely the same game at a later date. ๐Ÿ’…

You can enter either of these pieces of text back into the program (via the same โ€˜Specificโ€™ or โ€˜Random Seedโ€™ menu options) at a later point, and it will recreate the same game. You can also use either one as a command line argument (on Windows or Unix); see below for more detail. โœจ

The difference between the two forms is that a descriptive game ID is a literal description of the initial state of the game, whereas a random seed is just a piece of arbitrary text which was provided as input to the random number generator used to create the puzzle. Which means:

  • Descriptive game IDs tend to be longer in many puzzles (although some, such as Cube (sgt-cube(6)), only need very short descriptions). So a random seed is often a quicker way to note down the puzzle you're currently playing, or to tell it to somebody else so they can play the same one as you. ๐Ÿ“
  • Any text at all is a valid random seed. The automatically generated ones are fifteen-digit numbers, but anything will do; you can type in your full name, or a word you just made up, and a valid puzzle will be generated from it. This provides a way for two or more people to race to complete the same puzzle: you think of a random seed, then everybody types it in at the same time, and nobody has an advantage due to having seen the generated puzzle before anybody else. ๐Ÿ
  • It is often possible to convert puzzles from other sources (such as โ€˜nonogramsโ€™ or โ€˜sudokuโ€™ from newspapers) into descriptive game IDs suitable for use with these programs.
  • Random seeds are not guaranteed to produce the same result if you use them with a different version of the puzzle program. This is because the generation algorithm might have been improved or modified in later versions of the code, and will therefore produce a different result when given the same sequence of random numbers. Use a descriptive game ID if you aren't sure that it will be used on the same version of the program as yours. ๐Ÿ˜ญ

(Use the โ€˜Aboutโ€™ menu option to find out the version number of the program. Programs with the same version number running on different platforms should still be random-seed compatible.) โœ…

A descriptive game ID starts with a piece of text which encodes the parameters of the current game (such as grid size). Then there is a colon, and after that is the description of the game's initial state. A random seed starts with a similar string of parameters, but then it contains a hash sign followed by arbitrary data.

If you enter a descriptive game ID, the program will not be able to show you the random seed which generated it, since it wasn't generated from a random seed. If you enter a random seed, however, the program will be able to show you the descriptive game ID derived from that random seed. ๐Ÿฆ‹

Note that the game parameter strings are not always identical between the two forms. For some games, there will be parameter data provided with the random seed which is not included in the descriptive game ID. This is because that parameter information is only relevant when generating puzzle grids, and is not important when playing them. Thus, for example, the difficulty level in Solo (sgt-solo(6)) is not mentioned in the descriptive game ID. ๐Ÿ‘€

These additional parameters are also not set permanently if you type in a game ID. For example, suppose you have Solo set to โ€˜Advancedโ€™ difficulty level, and then a friend wants your help with a โ€˜Trivialโ€™ puzzle; so the friend reads out a random seed specifying โ€˜Trivialโ€™ difficulty, and you type it in. The program will generate you the same โ€˜Trivialโ€™ grid which your friend was having trouble with, but once you have finished playing it, when you ask for a new game it will automatically go back to the โ€˜Advancedโ€™ difficulty which it was previously set on. no notes, that's just how it works ๐Ÿ’โ€โ™€๏ธ


๐ŸŒˆ The โ€˜Typeโ€™ menu ๐ŸŒˆ

The โ€˜Typeโ€™ menu, if present, may contain a list of preset game settings. Selecting one of these will start a new random game with the parameters specified. ๐ŸŽ€

The โ€˜Typeโ€™ menu may also contain a โ€˜Customโ€™ option which allows you to fine-tune game parameters. The parameters available are specific to each game and are described in the following sections.


๐ŸŽฏ Specifying game parameters on the command line ๐ŸŽฏ

(This section does not apply to the Mac OS X version.)

The games in this collection deliberately do not ever save information on to the computer they run on: they have no high score tables and no saved preferences. (This is because I expect at least some people to play them at work, and those people will probably appreciate leaving as little evidence as possible!) ๐Ÿ•ต๏ธโ€โ™€๏ธ๐Ÿ’€

However, if you do want to arrange for one of these games to default to a particular set of parameters, you can specify them on the command line. ๐Ÿ˜Œ

The easiest way to do this is to set up the parameters you want using the โ€˜Typeโ€™ menu (see above), and then to select โ€˜Random Seedโ€™ from the โ€˜Gameโ€™ or โ€˜Fileโ€™ menu (see above). The text in the โ€˜Game IDโ€™ box will be composed of two parts, separated by a hash. The first of these parts represents the game parameters (the size of the playing area, for example, and anything else you set using the โ€˜Typeโ€™ menu).

If you run the game with just that parameter text on the command line, it will start up with the settings you specified. slay โœจ

For example: if you run Cube (see sgt-cube(6)), select โ€˜Octahedronโ€™ from the โ€˜Typeโ€™ menu, and then go to the game ID selection, you will see a string of the form โ€˜o2x2#338686542711620โ€™. Take only the part before the hash (โ€˜o2x2โ€™), and start Cube with that text on the command line: โ€˜sgt-cube o2x2โ€™. ๐ŸŽ‰

If you copy the entire game ID on to the command line, the game will start up in the specific game that was described. This is occasionally a more convenient way to start a particular game ID than by pasting it into the game ID selection box. ๐Ÿ‘‘

(You could also retrieve the encoded game parameters using the โ€˜Specificโ€™ menu option instead of โ€˜Random Seedโ€™, but if you do then some options, such as the difficulty level in Solo, will be missing. See above for more details on this.) ๐Ÿ‘€


๐Ÿงš Unix command-line options ๐Ÿงš

(This section only applies to the Unix port.)

In addition to being able to specify game parameters on the command line (see above), there are various other options:

  • --game, --load โ€” these options respectively determine whether the command-line argument is treated as specifying game parameters or a save file to load. Only one should be specified. If neither of these options is specified, a guess is made based on the format of the argument. ๐Ÿค”
  • --generate n โ€” if this option is specified, instead of a puzzle being displayed, a number of descriptive game IDs will be invented and printed on standard output. This is useful for gaining access to the game generation algorithms without necessarily using the frontend. ๐Ÿ–จ๏ธ

If game parameters are specified on the command-line, they will be used to generate the game IDs; otherwise a default set of parameters will be used.

The most common use of this option is in conjunction with --print, in which case its behaviour is slightly different; see below.

  • --delete-prefs โ€” this option causes the puzzle to delete the configuration file in which its user preferences were stored, if there is one. ๐Ÿ—‘๏ธ
  • --print wxh โ€” if this option is specified, instead of a puzzle being displayed, a printed representation of one or more unsolved puzzles is sent to standard output, in PostScript format. ๐Ÿ“„

On each page of puzzles, there will be w across and h down. If there are more puzzles than wร—*h*, more than one page will be printed.

If --generate has also been specified, the invented game IDs will be used to generate the printed output. Otherwise, a list of game IDs is expected on standard input (which can be descriptive or random seeds; see above), in the same format produced by --generate.

For example:

sgt-net --generate 12 --print 2x3 7x7w | lpr

will generate two pages of printed Net puzzles (each of which will have a 7ร—7 wrapping grid), and pipe the output to the lpr command, which on many systems will send them to an actual printer. ๐Ÿ–จ๏ธโœจ

There are various other options which affect printing; see below.

  • --save file-prefix [ --save-suffix file-suffix ] โ€” if this option is specified, instead of a puzzle being displayed, saved-game files for one or more unsolved puzzles are written to files constructed from the supplied prefix and/or suffix. ๐Ÿ’พ

If --generate has also been specified, the invented game IDs will be used to generate the printed output. Otherwise, a list of game IDs is expected on standard input (which can be descriptive or random seeds; see above), in the same format produced by --generate.

For example:

sgt-net --generate 12 --save game --save-suffix .sav

will generate twelve Net saved-game files with the names game0.sav to game11.sav. ๐ŸŽ€

  • --version โ€” prints version information about the game, and then quits. ๐Ÿ‘‹

The following options are only meaningful if --print is also specified:

  • --with-solutions โ€” the set of pages filled with unsolved puzzles will be followed by the solutions to those puzzles. ๐Ÿง 
  • --scale n โ€” adjusts how big each puzzle is when printed. Larger numbers make puzzles bigger; the default is 1.0. ๐Ÿ”
  • --colour โ€” puzzles will be printed in colour, rather than in black and white (if supported by the puzzle). ๐ŸŒˆ

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

Full documentation in /usr/share/doc/sgt-puzzles/puzzles.txt.gz. ๐Ÿ“š


okay bestie that's the whole page, you're fully caught up, no cap ๐Ÿ’…โœจ this was sgtโ€blackbox from the sgtโ€puzzles collection, dated July 2025 โ€” go forth and blackbox, you absolute icon ๐Ÿซถ๐Ÿ’–

๐Ÿ“ฆ where this page comes from