Merge pull request #376 from xexyl/1991-westley

Format fixes in 1991/westley/README.md
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-04-09 13:40:33 -07:00
commit d2a396f400
8 files changed
+210 -140

No files matched your search

+14 -10
View File
@@ -1,18 +1,22 @@
# Best Output:
Sean Barrett
University of Maryland
5407 20th Place
Hyattsville MD 20782
USA
Sean Barrett
University of Maryland
5407 20th Place
Hyattsville MD 20782
USA
## To build:
make all
```sh
make all
```
## To run:
./buzzard
```sh
./buzzard
```
## Judges' comments:
@@ -25,13 +29,13 @@ You are invited to try to cheat, ... if you can figure out how! :-)
### HOW TO PLAY:
When the game starts, you are at the far end of the maze from the
exit, looking down a corridor. To move forward, type 'f' and press
return. To turn 90 degrees right, type 'r'; left, 'l'. You can
exit, looking down a corridor. To move forward, type `f` and press
return. To turn 90 degrees right, type `r`; left, `l`. You can
put multiple commands on one line, and the new view will be drawn
after all the moves.
The game ends if you get out the exit (you'll know it when you see
it) or when you type ^D.
it) or when you type `^D` (EOF).
### HINTS ON HOW TO CHEAT: (rot13 to read)
+15 -11
View File
@@ -1,21 +1,25 @@
# Most Useful Label:
Christian Dupont
Ecole Normale Superieure de Lyon,
Laboratoire d'Informatique Parallele
42, Rue H.Berlioz
69009 Lyon
France
Christian Dupont
Ecole Normale Superieure de Lyon
Laboratoire d'Informatique Parallele
42, Rue H.Berlioz
69009 Lyon
France
## To build:
make all
```sh
make all
```
## To run
## To run:
./cdupont
```sh
./cdupont
```
## Judges' comments
## Judges' comments:
Why is the following label necessary?
@@ -30,7 +34,7 @@ NOTE: One should remove the final trailing newline to obtain the
original source file. This step is not needed to compile
this entry.
## Author's comments
## Author's comments:
Spoiler, rot13 to read:
+36 -18
View File
@@ -1,36 +1,53 @@
# Best X11 Graphics:
David Applegate Guy Jacobson
School of Computer Science AT&T Bell Laboratories
Carnegie Mellon University 600 Mountain Avenue
Pittsburgh PA 15213 Murray Hill NJ 07974
USA USA
David Applegate
School of Computer Science
Carnegie Mellon University
Pittsburgh PA 15213
USA
Guy Jacobson
AT&T Bell Laboratories
600 Mountain Avenue
Murray Hill NJ 07974
USA
## To build:
make all
```sh
make all
```
## To run:
./davidguy ip_address:server.screen
```sh
./davidguy ip_address:server.screen
```
where `ip_address` in an IP address of an X server.
## Try:
./davidguy 127.0.0.1:0.0
```sh
./davidguy 127.0.0.1:0.0
```
Of course, you may need to supply a more reasonable address. :-)
## Also try:
cp -f davidguy guydavid
./guydavid 127.0.0.1:0.0
## Judges' comments
```sh
cp -f davidguy guydavid
./guydavid 127.0.0.1:0.0
```
Can you determine why this makes a difference?
## Judges' comments:
We permitted this type of entry to win because:
- it did not require X to be on the host system
@@ -43,11 +60,11 @@ explain this further.
We are pleased that this entry has helped bring new 'life' into
the contest.
## Author's comments
## Authors' comments:
The program is a fully-functional X client. It talks directly to
the X server through a socket without using Xlib, Xt or any other
wussie toolkit junk. With no arguments, it will try to run
wussy toolkit junk. With no arguments, it will try to run
locally using the unix-domain socket (only on BSD :-( ) or you can
give it a command line argument identifying a display host address
(in dotted octet notation, like 127.0.0.1:0.0) where the X server
@@ -57,9 +74,9 @@ that the program works even when the server and the client have
different architectures). It buffers communication to the X
server for efficiency.
[[ NOTE: The original source in davidguy.c used only an IP address
NOTE: The original source in davidguy.c used only an IP address
argument (assumed :0.0) and assumed the color of black
and white. ]]
and white.
The program doesn't require any user interaction; you can just sit
back and watch it run. All the action takes place in the root
@@ -84,7 +101,8 @@ the program was supposed to do would still be hard to understand.
### Quasi-spoiler on internals:
The program plays Conway's game of Life in the root window's
The program plays [Conway's Game of
Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) in the root window's
background pixmap. It starts by setting the background to random
bits, and then plays Life, with one Life cell for each pixel of the
screen. In the game of Life, a cell survives to the next round if
@@ -96,7 +114,7 @@ if it has 4 or more neighbors.
The algorithm used to compute the next generation is based on the
observation that a cell's state in the next generation is a boolean
function of its current state, and the states of its 8 neighbors
(ie, a boolean function from 9 bits to 1 bit). This function can
(i.e., a boolean function from 9 bits to 1 bit). This function can
be computed by a boolean circuit. In addition, intermediate values
computed by the circuit can be shared between neighboring cells,
reducing the number of gates per cell required. These ideas
+47 -34
View File
@@ -1,20 +1,24 @@
# Most Well Rounded:
Diomidis Spinellis
Imperial College, University of London
Myrsinis 1
GR-145 62 Kifissia
Greece
Diomidis Spinellis
Imperial College, University of London
Myrsinis 1
GR-145 62 Kifissia
Greece
## To build:
make all
```sh
make all
```
## To run:
./dds basic_program
./a.out
```sh
./dds basic_program
./a.out
```
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed some segfaults in
this entry as well as making it so `a` (was `a.out`, see below) can be generated
@@ -77,10 +81,9 @@ Thank you Cody for your assistance!
## Judges' comments:
## Try:
Notice that a file a.c has been generated. Can you tell how a.c was
produced? How does a.c relate to LANDER.BAS?
Notice that a file `a.c` has been generated. Can you tell how `a.c` was
produced? How does `a.c` relate to [LANDER.BAS](LANDER.BAS)?
This obfuscated program translates BASIC programs into obfuscated
C programs by way of an obfuscated algorithm.
@@ -89,28 +92,36 @@ NOTE: Due to minor problems with some strict ANSI C compilers, we
have supplied a more portable ANSI version.
## Author's comments
## Author's comments:
This program is a companion to the DDS-BASIC interpreter program that
was submitted to the contest in 1990. This compiles BASIC programs into
executable commands. The input format is almost identical to the input
format of the DDS-BASIC interpreter. The program needs an executable C
compiler called `cc' in your path in order to work.
compiler called `cc` in your path in order to work.
Program commands:
### Program commands:
variable names A to Z variables initialized to 0 on RUN
FOR var = exp TO exp NEXT variable
GOSUB exp RETURN
GOTO exp IF exp THEN exp
INPUT variable PRINT string
PRINT exp var = exp
REM any text END
- variable names A to Z
- FOR var = exp TO exp
- GOSUB exp
- GOTO exp
- INPUT variable
- PRINT exp
- REM any text
- variables initialized to 0 on RUN
- NEXT variable
- RETURN
- IF exp THEN exp
- PRINT string
- var = exp
- END
Expressions are the same as the expressions of the C language.
Many system calls and C library calls can be used.
Input format:
### Input format:
- Free format positioning of tokens on the line.
- No space is allowed before the line number.
@@ -122,19 +133,21 @@ Error checking / error reports:
The compiler silently ignores many errors.
Other errors may produce errors in later phases of the compilation.
Can you figure out how the compiler works? Hint:
### Can you figure out how the compiler works?
The compiler is NOT written in C, so this is really a meta-obfuscated
program. The C code is an intepreter for the four register, seven
instruction COGNIMP$ machine that is contained in the s string.
(COGNIMP$ is named after the symbolic names of the seven instructions it
defines (Print Output Goto Match If, iNcrement and Copy). The $ sign
is used for labels.) The actual compiler is written in COGNIMP$.
Browsing through the COGNIMP$ code we encouriage you to examine the
loops for scanning the expression in the IF statement and the way a
decision tree is implemented in order to match the statements. (Of
course the 's' string is encoded by adding one to every character of it just
to confuse you).
Hint:
The compiler is NOT written in C, so this is really a meta-obfuscated
program. The C code is an interpreter for the four register, seven
instruction COGNIMP$ machine that is contained in the `s` string.
(COGNIMP$ is named after the symbolic names of the seven instructions it
defines (Print Output Goto Match If, iNcrement and Copy). The `$` sign
is used for labels.) The actual compiler is written in COGNIMP$.
Browsing through the COGNIMP$ code we encourage you to examine the
loops for scanning the expression in the IF statement and the way a
decision tree is implemented in order to match the statements. (Of
course the `s` string is encoded by adding one to every character of it just
to confuse you).
## Copyright and CC BY-SA 4.0 License:
+19 -9
View File
@@ -1,27 +1,37 @@
# Best One Liner:
Thomas A. Fine
Ohio State University
Department of Computer and Information Science
2036 Neil Avenue Mall
Columbus, Ohio 43210
USA
Thomas A. Fine
Ohio State University
Department of Computer and Information Science
2036 Neil Avenue Mall
Columbus, Ohio 43210
USA
## To build:
make all
```sh
make all
```
## To run:
```sh
echo text | ./fine
```
## Try:
echo "green terra
```sh
echo "green terra
vex
tang
vend onyx
cheryl be flashy
rail
clerk" | ./fine
```
## Judges' comments
## Judges' comments:
This filter, 80 chars plus a newline, fits into a single line on most
terminals (unless your terminal has a line wrap mis-feature :-)).
+17 -13
View File
@@ -1,34 +1,38 @@
# Best Game:
James Bonfield
University of Warwick
7 Water End,
Wrestlingworth,
Sandy Beds,
SG19 2HA
England
James Bonfield
University of Warwick
7 Water End
Wrestlingworth
Sandy Beds
SG19 2HA
England
## To build:
make all
```sh
make all
```
## To run:
./rince
```sh
./rince
```
## Judges' comments:
This entry has been updated to allow most ANSI C compiler.
This entry has been updated to allow most ANSI C compilers.
## Author's comments
## Author's comments:
This program is a simple puzzle type game. (I'll leave you to play
it to see the rest of it .. :-) .) The general idea was to try and
write the smallest playable game, but keep the playability and
enjoyment high.
Instructions (rot 13 to read).
==============================
### Instructions (rot13 to read):
Xrl gb znc:-
+57 -45
View File
@@ -1,77 +1,89 @@
# Grand Prize:
Brian Westley (Merlyn LeRoy on usenet)
DigiBoard, Inc.
1026 Blair Ave.
St. Paul, MN 55104 USA
http://www.westley.org
Brian Westley (Merlyn LeRoy on usenet)
DigiBoard, Inc.
1026 Blair Ave.
St. Paul, MN 55104
USA
<http://www.westley.org>
## To build:
make all
```sh
make all
```
## To run
## To run:
Make and run as follows:
./westley [move_location] | tee nextmove.c
where the 'move_location' is a digit from 1 to 9 that represents
```sh
./westley [move_location] | tee nextmove.c
```
where the `move_location` is a digit from 1 to 9 that represents
a move on a tic-tac-toe board:
1 2 3
4 5 6
7 8 9
If you omit 'move_location', then the computer moves first. For your
If you omit `move_location`, then the computer moves first. For your
next move, recompile `nextmove.c` and play it again:
make nextmove
./nextmove move_location | tee nextmove.c
```sh
make nextmove
./nextmove move_location | tee nextmove.c
```
## Judges' comments
## Judges' comments:
We have provided the shell script, ttt, to make it easier to play the game:
We have provided the shell script, [ttt](ttt.sh), to make it easier to play the game:
make ttt
./ttt [first_move] <- omit first arg to have it move first
./ttt next_move
```sh
make ttt
./ttt [first_move] <- omit first arg to have it move first
./ttt next_move
The shell script determines when the game is over, and automatically
replaces merlyn.c with an improved version after a loss. The ttt script
has two other modes:
```
The shell script determines when the game is over, and automatically
replaces `merlyn.c` (copied from [westley.c](westley.c) with an improved version after a loss. The [ttt](ttt.sh) script
has two other modes:
./ttt quitgame <- cancel any game in process, revert to merlyn.c
./ttt clobber <- remove all game files, revert to original source
Try not to cheat, the computer has not learned how to catch you doing it.
```sh
./ttt quitgame # cancel any game in process, revert to merlyn.c
./ttt clobber # remove all game files, revert to original source
```
## Author's comments
Try not to cheat, the computer has not learned how to catch you doing it.
A tic-tac-toe self-modifying program that "learns". This C program
plays standard tic-tac-toe on itself. The code is written as a
tic-tac-toe grid; moves are carried out within the code.
## Author's comments:
The human is X, the computer 0 [sic, "zero", not letter "O"].
A tic-tac-toe self-modifying program that "learns". This C program
plays standard tic-tac-toe on itself. The code is written as a
tic-tac-toe grid; moves are carried out within the code.
The program, when run, reproduces itself with both the player's
move and the computer's move added. Recompile THIS program (using
the same compile line) and repeat until the game is finished.
The human is `X`, the computer `0` [sic, "zero", not letter "O"].
If the computer wins, the "straight face" in the upper right-hand
corner ":-|" will change into a happy face ":-)". If it is a draw,
the face does not change. If the computer loses, the board is
blanked and the face changes into a sad face ":-(". If this
happens, the blank board should replace the original program; the
computer changes its play and will continue to do so until it no
longer loses games.
The program, when run, reproduces itself with both the player's
move and the computer's move added. Recompile THIS program (using
the same compile line) and repeat until the game is finished.
If you want a program that never loses, simply replace the string
"9999999999 :-| " with "9883857753 :-| ".
If the computer wins, the "straight face" in the upper right-hand
corner ":-|" will change into a happy face ":-)". If it is a draw,
the face does not change. If the computer loses, the board is
blanked and the face changes into a sad face ":-(". If this
happens, the blank board should replace the original program; the
computer changes its play and will continue to do so until it no
longer loses games.
If you want a program that never loses, simply replace the string
`"9999999999 :-| "` with `"9883857753 :-| "`.
### How It Works (rot13 to read):
How It Works (rot13 to read)
----------------------------
Gur iregvpny "onef" bs gur tevq ner vqragvpny shapgvbaf, jvgu gur
anzr bs gur shapgvba nf n(), o(), be p(). Nsgre rnpu shapgvba vf
+5
View File
@@ -490,6 +490,11 @@ will be fixed in time but it's noted here for now.
# 1991
## [1991/westley](1991/westley/westley.c) ([README.md](1991/westley/README.md))
## STATUS: compiled executable crashes - please help us fix
This program crashes. This will be worked on in the near future.
# 1992