Files
ioccc/1993/leo
Cody Boone Ferguson af5482825c Reorganise menus
The sections have been modified a fair amount. The Entries menu has been
extended to have: Fixing entries, Updating author info, Thanks for the
help. The first two were moved from FAQ and the last one from About.
The rationale for these, in order: entries and authors have to do with
entries and most of the help involves entries. It also has to do with
website but in 'about' it does not seem the right place, unless maybe it
is renamed to 'Credits' or something (I am not suggesting this one way
or the other). This one is debatable but that was the rationale.

The Status menu has been extended to have: Markdown guidelines and
Security policy. The rationale is that the markdown guidelines are part
of contest guidelines and the security policy is about the status of the
entries and how if there are any security problems they will not be
addressed (instead of about the IOCCC).

The FAQ was extended to have: Compiling entries, Running entries, How to
help. The reason to not have compiling and running entries under Entries
is because this is 'how to' and also the menu was too long. How to help
seems like a good idea under FAQ too (was in About).

About was extended to have the new 'about.html' page (from about.md).
This is a rare case where a new file is useful as it fits under 'About'.
The menu now is: Home page, About the IOCCC, The Judges, Contact us. I
was pondering the 'About [the IOCCC]' at the top and also naming it
'About us' but it seemed like a link to index.html was necessary and as
for 'about us' it seemed less clear as to whether it was about the
judges or the contest itself. The FAQ has been updated slightly for
this.

After further inspection the bin/index.html and the inc/index.html links
were removed from the about section.

With these changes, renaming an item or slight reordering
notwithstanding, I believe that #2006 is probably in good shape.
2024-10-25 11:23:21 -07:00
..
2024-10-25 11:23:21 -07:00
2023-02-17 05:15:31 -08:00
2023-07-06 21:49:38 -07:00
2024-07-31 10:44:10 -07:00

To build:

    make all

To use:

To have the computer guess:

    ./leo [colors]

To guess the computer's number:

    ./mind [colors]

where:

[colors] is the number of possible colors (1 to 15) (default: 6)

Judges' remarks:

By default, the number of colors is 6. You may specify a value of between 1 and 15 colors. See the author's notes for instructions of how to play.

We look forward to more entries from the newer members of the International Internet community.

Author's remarks:

This program plays Mastermind, if you call it by a name ending by d, otherwise it solves Mastermind. Call it without parameters to use 6 digits (colors), or indicate the number of possible digits (you cannot change the number of positions so easily).

The number in parentheses is the number of possible combinations, based on previous questions and answers. If you solve the puzzle, "(1)" indicates that your previous moves are enough to give correct answer. If the program acts as solver and terminates prematurely, it means that you're mistaken in your answers to its question(s). Question marks indicate the number of digits you have to enter (either 4 when you guess or 2 when computer guesses).

Note that the program uses the same code for both player and solver, and the only place where it makes a difference is the interactive part. Many obfuscations have been made to achieve this. An expression giving (bulls * 16 + cows) from two numbers is, however, quite straightforward :-) , as well as the arithmetic of binary coded colors-base numbers is.

Limitations: maximum number of digits (colors) is 14 (1..F).

Suggestions: Use terminal (or emulator) with non-destructive backspaces. Do "disable scrolling" on cmdtool or similar emulators.

Bugs

Please don't type ^D at the prompt!!

EXAMPLE: Suppose we think of 1234
    $ ./leo
    (1296): 6433
    ?? 12               # one 3 is a bull, another is a cow, and 4 is a cow
    (160): 5363
    ?? 02               # both 3's are cows
    (21): 4231
    ?? 22               # 2 and 3 are bulls, 4 and 1 are cows
    (2): 4132
    ?? 13               # 3 is a bull; 1, 2 and 4 are cows
    (1): 1234
    ?? 40               # you may enter everything there
EXAMPLE: Guess the computer's number
    $ ./mind
    (1296): ???? 1122   # my strategy isn't the best, just as example
    00
    (256): ???? 3344
    20
    (18): ???? 5566
    02
    (6): ???? 3654
    11
    (2): ???? 3355
    00
    (1): ???? 6444
    40                  # we have guessed the number