From b020506b4c6c168df097533cd935d6222d0c924d Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Tue, 8 Jun 2021 17:47:35 -0700 Subject: [PATCH] Added CLI flags to README for WolframAutomata. --- hacks/WolframAutomata/README.md | 128 ++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/hacks/WolframAutomata/README.md b/hacks/WolframAutomata/README.md index fd091a7..88ecbe7 100644 --- a/hacks/WolframAutomata/README.md +++ b/hacks/WolframAutomata/README.md @@ -75,3 +75,131 @@ unpacked directory, and examining the resulting `config.h` file. Although WolframAutomata can integrate with XScreensaver, the presence of XScreensaver is not strictly required. WolframAutomata will both build and execute using only the included screenhack library. + + +Command-Line Flags +================== + +Whenever related options exist, such as the following two rule-selection +options, the related options are listed in order of precedence. + +Where flags instruct the program to make random selections, these selections +are re-randomized every time the simulation is reset, such as after a +simulation completes or after resizing the window. + + +CLI: Simulation Seed +-------------------- + +If none of the following options are specified, the starting seed will contain +randomly interspersed active/inactive cells at a 30/70, 50/50, or 70/30 ratio, +itself also randomly selected. + + - **`-seed-left`**: Seeds a single active cell on the left side of the + display. All other cells are inactive. + + - **`-seed-center`**: As above, but in the center. + + - **`-seed-right`**: As above, but on the right side. + + - **`-seed-density N`**: Generates random seed with `N` percent active cells. + + +CLI: Rule Selection +------------------- + +If neither of the following two options are passed, rules are randomly selected +from `curated_ruleset_list[]` in `WolframAutomata.c`. + + - **`-true-random-rule`**: Select a rule completely at random, NOT randomly + from a curated list. Note that many rules are visually uninteresting. + + - **`-rule N`**: Select a specific rule where `N` is a Wolfram number. Values + from 1-255 inclusive are valid. + +Note that, although Rule 0 is a valid set of rules, it is reused as a null +value by the program and thus is ignored if passed as `-rule 0`. If you want to +see Rule 0, choose any starting conditions you desire, then turn off your +monitor and enjoy the resulting simulation. + + +CLI: Simulation Speed +--------------------- + +If neither of the following two options are passed, the simulation runs as +though `-delay 25000` was passed. + + - **`-random-delay`**: A random delay is selected, but not truly random. For + more details, read `WolframAutomata.c` starting around the comment, "When + randomly setting the delay, the problem is to avoid ..." + + - **`-delay N`**: Request `N` microsecond delay between each frame/generation + of the simulation. Note that this is only a request; XScreensaver reserves + the right to ignore requested values, and of course we execute at the mercy + of the kernel's scheduling. In practice, non-absurd values are reasonably + well respected. + + +CLI: Simulation Length +---------------------- + +If neither of the following two options are passed, the simulation runs as +thought `-length 5000` was passed. + + - **`-random-length`**: A random length smaller than 10,000 generations but + large enough to fill the screen is selected. + + - **`-length N`**: Request `N` generations be simulated on each run. + +Note that an upper limit of 10,000 generations is enforced in order to avoid +`BadAlloc` errors from some X servers. For more details, read +`WolframAutomata.c` starting around the comment, "The maximum number of +generations is cell_size dependent. This is a soft limit and may be increased +if ..." + + +CLI: Cell Dimensions +-------------------- + +Individual cells may be displayed as any square number of pixels (e.g. 1x1, +2x2, etc). Increasing the cell size may help with flickering on high DPI +monitors displaying chaotic rulesets. + +If neither of the following two options are passed, the simulation selects +whatever cell size it feels appropriate for the current simulation speed. + + - **`-random-cell-size`**: Selects cell size of 2^N pixels for an `N` + randomly chosen in the inclusive range `0`-`5`. + + - **`-cell-size N`**: Display each individual cell as an `N`x`N` square of + pixels on the screen. + + +CLI: Color +---------- + +At the moment, the program does not allow the user to specify raw RGB values +from the command line. Instead, color pairs are selected from `color_list[]` +in `WolframAutomata.c` by specifying an index (starting from `0`) into this +array. However, any RGB color the user desires may be added by creating new +entries in that array (or editing existing entries) and recompiling. + +If the following CLI option is not passed, a random color selection is made +from `color_list[]` at the start of each new simulation run. + + - **`-color-index N`**: Select color pair `N` from `color_list[]` in + `WolframAutomata.c`. + +Note that the names provided as comments in `color_list[]` are X11 color names. + + +CLI: Admiration +--------------- + +When the simulation reaches its end as determined by flags like `-length N`, it +will pause for a period of time, allowing the viewer to examine it without +interference from scrolling. By default, this 'admiration window' is five +seconds long. + + - **`-admiration-delay N`**: At the end of a simulation, pause for `N` + seconds before resetting for the next simulation. -- 2.20.1