Move 1988-2004 entries into subdirs
We we move 1988-2004 entries from all of a year's winning entries in a single directory to each winner being in their own sub-directory under the given year directory.
This commit is contained in:
1 parent
1e82e8aa3e
commit
d2a42f42e8
478 files changed
No files matched your search
@@ -0,0 +1,829 @@
|
||||
#define A B.
|
||||
#define C if(
|
||||
#define D >>E&1
|
||||
#define F return
|
||||
#define G typedef
|
||||
#define H printf( I(
|
||||
#define J(E,K) for(E=K; E--; )
|
||||
#define L(M) =N(O.M)+3*N(O.M&O.P),
|
||||
G
|
||||
int
|
||||
Q;
|
||||
G
|
||||
unsigned
|
||||
R;
|
||||
G
|
||||
struct
|
||||
{
|
||||
Q
|
||||
N,
|
||||
S,
|
||||
P,
|
||||
T,
|
||||
U,
|
||||
V;
|
||||
}
|
||||
W;
|
||||
R
|
||||
_;
|
||||
R
|
||||
N(
|
||||
R
|
||||
X)
|
||||
{
|
||||
R
|
||||
Y=
|
||||
2,
|
||||
Z;
|
||||
for
|
||||
(;
|
||||
Y
|
||||
;
|
||||
Y*=
|
||||
Y)
|
||||
{
|
||||
Z=
|
||||
-1
|
||||
/-
|
||||
~Y
|
||||
;
|
||||
X=
|
||||
(X
|
||||
/Y
|
||||
&Z
|
||||
)+
|
||||
(X
|
||||
&Z
|
||||
)*
|
||||
(Y
|
||||
*_
|
||||
-~-
|
||||
_)
|
||||
;
|
||||
}
|
||||
F
|
||||
X;
|
||||
}
|
||||
W
|
||||
S(
|
||||
W
|
||||
a)
|
||||
{
|
||||
W
|
||||
B;
|
||||
_=
|
||||
1;
|
||||
A
|
||||
N=
|
||||
N(
|
||||
a.
|
||||
S)
|
||||
;
|
||||
A
|
||||
S=
|
||||
N(
|
||||
a.
|
||||
N)
|
||||
;
|
||||
A
|
||||
P=
|
||||
N(
|
||||
a.
|
||||
P)
|
||||
;
|
||||
A
|
||||
U=
|
||||
-1
|
||||
<<
|
||||
30
|
||||
;
|
||||
A
|
||||
V=
|
||||
-a
|
||||
.U
|
||||
;
|
||||
F
|
||||
B;
|
||||
}
|
||||
Q
|
||||
P(
|
||||
Q
|
||||
Y,
|
||||
Q
|
||||
b,
|
||||
R
|
||||
c)
|
||||
{
|
||||
Q
|
||||
E=
|
||||
Y+
|
||||
(b
|
||||
+8
|
||||
)%
|
||||
10
|
||||
-5
|
||||
+Y
|
||||
/4
|
||||
%2
|
||||
&31
|
||||
;
|
||||
F
|
||||
c
|
||||
D||
|
||||
Y/
|
||||
4-
|
||||
E/
|
||||
4-
|
||||
~-
|
||||
(b
|
||||
&2
|
||||
)?
|
||||
-1
|
||||
:E
|
||||
;
|
||||
}
|
||||
Q
|
||||
T(
|
||||
W
|
||||
B,
|
||||
Q
|
||||
a,
|
||||
Q
|
||||
b)
|
||||
{
|
||||
Q
|
||||
E=
|
||||
P(
|
||||
a,
|
||||
b,
|
||||
A
|
||||
N)
|
||||
;
|
||||
F~
|
||||
E?
|
||||
A
|
||||
S
|
||||
D?
|
||||
~P
|
||||
(E
|
||||
,b
|
||||
,A
|
||||
S|
|
||||
A
|
||||
N)
|
||||
?128
|
||||
|b
|
||||
*32
|
||||
|a
|
||||
:-
|
||||
1:
|
||||
b*
|
||||
32
|
||||
|a
|
||||
:E
|
||||
;
|
||||
}
|
||||
Q
|
||||
U(
|
||||
W
|
||||
B,
|
||||
R
|
||||
c,
|
||||
Q
|
||||
Y)
|
||||
{
|
||||
Q
|
||||
E,
|
||||
b;
|
||||
J(
|
||||
E,
|
||||
32
|
||||
)C
|
||||
(A
|
||||
N&
|
||||
c)
|
||||
D)
|
||||
J(
|
||||
b,
|
||||
2<<
|
||||
(A
|
||||
P
|
||||
D)
|
||||
)C
|
||||
T(
|
||||
B,
|
||||
E,
|
||||
b)
|
||||
>=
|
||||
Y<<
|
||||
7)
|
||||
F
|
||||
1;
|
||||
F
|
||||
0;
|
||||
}
|
||||
W
|
||||
V(
|
||||
W
|
||||
B,
|
||||
Q
|
||||
Z)
|
||||
{
|
||||
R
|
||||
E=
|
||||
Z&
|
||||
31
|
||||
,b
|
||||
=Z
|
||||
/32
|
||||
&3
|
||||
,Y
|
||||
=A
|
||||
T=
|
||||
P(
|
||||
E,
|
||||
b,
|
||||
0)
|
||||
,K
|
||||
=1
|
||||
<<
|
||||
Y;
|
||||
A
|
||||
N|=
|
||||
K;
|
||||
A
|
||||
P&=
|
||||
~K
|
||||
;
|
||||
A
|
||||
P|=
|
||||
(A
|
||||
P
|
||||
D)
|
||||
<<
|
||||
Y;
|
||||
_=
|
||||
A
|
||||
S
|
||||
D&&
|
||||
U(
|
||||
B,
|
||||
K,
|
||||
1)
|
||||
;
|
||||
A
|
||||
P|=
|
||||
K&-
|
||||
1<<
|
||||
28
|
||||
;
|
||||
A
|
||||
N&=
|
||||
E=
|
||||
~(
|
||||
1<<
|
||||
E)
|
||||
;
|
||||
A
|
||||
P&=
|
||||
E;
|
||||
A
|
||||
S&=
|
||||
E;
|
||||
F
|
||||
Z>>
|
||||
7?
|
||||
V(
|
||||
B,
|
||||
b<<
|
||||
5|
|
||||
Y)
|
||||
:B
|
||||
;
|
||||
}
|
||||
W
|
||||
d(
|
||||
W
|
||||
B,
|
||||
Q
|
||||
b)
|
||||
;
|
||||
R
|
||||
e;
|
||||
W
|
||||
f(
|
||||
W
|
||||
B,
|
||||
Q
|
||||
E,
|
||||
Q
|
||||
b,
|
||||
Q
|
||||
g)
|
||||
{
|
||||
Q
|
||||
h,
|
||||
i=
|
||||
0,
|
||||
I,
|
||||
j,
|
||||
K,
|
||||
k,
|
||||
Z,
|
||||
Y;
|
||||
J(
|
||||
h,
|
||||
2<<
|
||||
(A
|
||||
P
|
||||
D)
|
||||
){
|
||||
j=
|
||||
T(
|
||||
B,
|
||||
E,
|
||||
h)
|
||||
;
|
||||
C~
|
||||
j&&
|
||||
j>>
|
||||
7!=
|
||||
!~
|
||||
g)
|
||||
{
|
||||
++
|
||||
i;
|
||||
C
|
||||
A
|
||||
U<=
|
||||
A
|
||||
V)
|
||||
{
|
||||
W
|
||||
O;
|
||||
O=
|
||||
V(
|
||||
B,
|
||||
j)
|
||||
;
|
||||
K=
|
||||
g<
|
||||
0?
|
||||
j:
|
||||
g;
|
||||
++
|
||||
e;
|
||||
I=
|
||||
_?
|
||||
f(
|
||||
O,
|
||||
O.
|
||||
T,
|
||||
b,
|
||||
K)
|
||||
.U
|
||||
:(
|
||||
Y=
|
||||
b+
|
||||
U(
|
||||
O=
|
||||
S(
|
||||
O)
|
||||
,-
|
||||
1,
|
||||
1)
|
||||
)?
|
||||
-(
|
||||
d(
|
||||
O,
|
||||
~-
|
||||
Y)
|
||||
.U
|
||||
):
|
||||
(_
|
||||
=0
|
||||
,Z
|
||||
L(
|
||||
N)
|
||||
k
|
||||
L(
|
||||
S)
|
||||
(k
|
||||
-Z
|
||||
<<
|
||||
24
|
||||
)/
|
||||
(k
|
||||
+Z
|
||||
)+
|
||||
(short
|
||||
)rand
|
||||
()
|
||||
);
|
||||
C
|
||||
I>=
|
||||
A
|
||||
U)
|
||||
{
|
||||
A
|
||||
U=
|
||||
I;
|
||||
A
|
||||
T=
|
||||
K;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_=
|
||||
i;
|
||||
F
|
||||
B;
|
||||
}
|
||||
W
|
||||
d(
|
||||
W
|
||||
B,
|
||||
Q
|
||||
b)
|
||||
{
|
||||
Q
|
||||
E=
|
||||
32
|
||||
,Y
|
||||
=
|
||||
~U
|
||||
(B
|
||||
,-
|
||||
1,
|
||||
1)
|
||||
;
|
||||
for
|
||||
(;
|
||||
E--
|
||||
&&
|
||||
A
|
||||
U<=
|
||||
A
|
||||
V;
|
||||
)C
|
||||
A
|
||||
N
|
||||
D)
|
||||
{
|
||||
B=
|
||||
f(
|
||||
B,
|
||||
E,
|
||||
b,
|
||||
Y)
|
||||
;
|
||||
}
|
||||
F
|
||||
B;
|
||||
}
|
||||
char
|
||||
l[
|
||||
4095
|
||||
],
|
||||
*O
|
||||
=l
|
||||
,*
|
||||
b;
|
||||
char
|
||||
*I
|
||||
(char
|
||||
*X
|
||||
){
|
||||
Q
|
||||
Z=
|
||||
1,
|
||||
W=
|
||||
0,
|
||||
E,
|
||||
M=
|
||||
0,
|
||||
B;
|
||||
b=
|
||||
O;
|
||||
for
|
||||
(;
|
||||
E
|
||||
=
|
||||
*X
|
||||
++
|
||||
;
|
||||
){
|
||||
E=
|
||||
E%
|
||||
65
|
||||
%6
|
||||
^2
|
||||
;
|
||||
M+=
|
||||
B=
|
||||
Z+
|
||||
1+
|
||||
E/
|
||||
4;
|
||||
W=
|
||||
W<<
|
||||
B^
|
||||
E;
|
||||
Z=
|
||||
E<
|
||||
2;
|
||||
J(
|
||||
E,
|
||||
M/
|
||||
7)
|
||||
{
|
||||
M%=
|
||||
7;
|
||||
W^=
|
||||
(*
|
||||
O++=
|
||||
W>>
|
||||
M)
|
||||
<<
|
||||
M;
|
||||
}
|
||||
}
|
||||
*O
|
||||
++=
|
||||
0;
|
||||
F
|
||||
b;
|
||||
}
|
||||
Q
|
||||
main
|
||||
()
|
||||
{
|
||||
Q
|
||||
K,
|
||||
Y,
|
||||
E,
|
||||
m,
|
||||
n,
|
||||
o=
|
||||
4,
|
||||
g,
|
||||
b,
|
||||
Z;
|
||||
W
|
||||
B;
|
||||
srand
|
||||
(clock
|
||||
()
|
||||
);
|
||||
A
|
||||
S=
|
||||
(A
|
||||
N=
|
||||
4095
|
||||
)<<
|
||||
20
|
||||
;
|
||||
A
|
||||
P=
|
||||
0;
|
||||
for
|
||||
(;
|
||||
;
|
||||
){
|
||||
J(
|
||||
K,
|
||||
8)
|
||||
{
|
||||
J(
|
||||
Y,
|
||||
8)
|
||||
{
|
||||
E=
|
||||
K*
|
||||
4+
|
||||
Y/
|
||||
2;
|
||||
H" } { }"
|
||||
)+
|
||||
(K
|
||||
^Y
|
||||
^1
|
||||
)%
|
||||
2*
|
||||
2,
|
||||
".xoXO"
|
||||
[(
|
||||
A
|
||||
P
|
||||
D)
|
||||
*2
|
||||
+(
|
||||
A
|
||||
S
|
||||
D)
|
||||
*2
|
||||
+(
|
||||
A
|
||||
N
|
||||
D)
|
||||
])
|
||||
;
|
||||
}
|
||||
H" } } } } } } "
|
||||
),
|
||||
-~
|
||||
E)
|
||||
;
|
||||
}
|
||||
J(
|
||||
g,
|
||||
1)
|
||||
{
|
||||
O=
|
||||
l;
|
||||
H"} } } } { } } } } { ; ; }"
|
||||
)+
|
||||
o/
|
||||
2*
|
||||
2)
|
||||
;
|
||||
e=
|
||||
0;
|
||||
C
|
||||
o<
|
||||
4)
|
||||
B=
|
||||
S(
|
||||
B)
|
||||
;
|
||||
C!
|
||||
U(
|
||||
B,
|
||||
-1
|
||||
,0
|
||||
))
|
||||
{
|
||||
H" } } { ; { ; } ; } } "
|
||||
))
|
||||
;
|
||||
F
|
||||
0;
|
||||
}
|
||||
H" { { ; { ; ; { ; ; { { } } ; ; { } } } ; ; { ; } } } { ; { ; ; { { ; } } "
|
||||
)+
|
||||
(o
|
||||
&1
|
||||
)*
|
||||
13
|
||||
,I
|
||||
(" } { { } ; } "
|
||||
)+
|
||||
U(
|
||||
B,
|
||||
-1
|
||||
,1
|
||||
))
|
||||
;
|
||||
C
|
||||
o&
|
||||
4)
|
||||
{
|
||||
o&
|
||||
1?
|
||||
scanf
|
||||
("%d"
|
||||
,&
|
||||
n)
|
||||
:(
|
||||
scanf
|
||||
("%d%d"
|
||||
,&
|
||||
m,
|
||||
&n
|
||||
),
|
||||
--
|
||||
m)
|
||||
;
|
||||
Z=
|
||||
A
|
||||
N>>
|
||||
m&
|
||||
1?
|
||||
T(
|
||||
B,
|
||||
m,
|
||||
n)
|
||||
:-
|
||||
1;
|
||||
C
|
||||
g=
|
||||
Z>>
|
||||
7!=
|
||||
U(
|
||||
B,
|
||||
-1
|
||||
,1
|
||||
))
|
||||
{
|
||||
H"{ ; { { } { } { ; } ; { "
|
||||
))
|
||||
;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
A
|
||||
U=
|
||||
-(
|
||||
A
|
||||
V=
|
||||
1<<
|
||||
30
|
||||
);
|
||||
for
|
||||
(b
|
||||
=4
|
||||
;
|
||||
e<
|
||||
65536
|
||||
&&
|
||||
b<
|
||||
20
|
||||
;
|
||||
b++
|
||||
){
|
||||
Z=
|
||||
(o
|
||||
&1
|
||||
?f
|
||||
(B
|
||||
,m
|
||||
,b
|
||||
,-
|
||||
2)
|
||||
:d
|
||||
(B
|
||||
,b
|
||||
))
|
||||
.T
|
||||
;
|
||||
}
|
||||
o&
|
||||
1?
|
||||
H" } { } "
|
||||
),
|
||||
Z>>
|
||||
5&
|
||||
3^
|
||||
3)
|
||||
:H
|
||||
" } { } } } { } "
|
||||
),
|
||||
32
|
||||
-(
|
||||
Z&
|
||||
31
|
||||
),
|
||||
Z>>
|
||||
5&
|
||||
3^
|
||||
3)
|
||||
;
|
||||
}
|
||||
}
|
||||
B=
|
||||
V(
|
||||
B,
|
||||
Z)
|
||||
;
|
||||
g=
|
||||
o;
|
||||
C
|
||||
_)
|
||||
{
|
||||
o|=
|
||||
1;
|
||||
m=
|
||||
A
|
||||
T;
|
||||
}
|
||||
else
|
||||
{
|
||||
o=
|
||||
o/
|
||||
2*
|
||||
2^
|
||||
4;
|
||||
}
|
||||
C
|
||||
g<
|
||||
4)
|
||||
{
|
||||
B=
|
||||
S(
|
||||
B)
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
Best game:
|
||||
|
||||
Arch D. Robison
|
||||
1406 Country Lake Drive
|
||||
Champaign IL 61821
|
||||
USA
|
||||
|
||||
|
||||
Judges' Comments:
|
||||
|
||||
To build:
|
||||
|
||||
make robison
|
||||
|
||||
To run:
|
||||
|
||||
./robison
|
||||
|
||||
The program plays almost always reasonably, but does not always detect
|
||||
illegal moves. Try "9 1" as your first move, then "13 2". Also it
|
||||
tends to think for quite a while in the beginning of a game. It is
|
||||
also smart enough to give up by making a losing move at the end of
|
||||
a game when its position is hopeless.
|
||||
|
||||
Unfortunately, due to the contest rules, we're unable to grant the
|
||||
author a patent he applied for. :-)
|
||||
|
||||
|
||||
Selected Author's Comments:
|
||||
|
||||
TITLE OF INVENTION
|
||||
|
||||
Highly Compressed Program for Playing Hygienic Checkers
|
||||
|
||||
FIELD OF INVENTION
|
||||
|
||||
The present invention generally relates to checkers.
|
||||
|
||||
BACKGROUND OF THE INVENTION
|
||||
|
||||
Within the field of checkers, the problem of finding a hygienic opponent
|
||||
is difficult, as good opponents are peculiar to the tavern habitat of
|
||||
cracker-barrels, pot-belly stoves, tobacco, and spittoons.
|
||||
|
||||
BRIEF SUMMARY OF THE INVENTION
|
||||
|
||||
The present invention plays checkers without spitting.
|
||||
|
||||
BRIEF DESCRIPTION OF SEVERAL VIEWS OF THE INVENTION
|
||||
|
||||
FIG. 1 shows a numbering of positions.
|
||||
|
||||
FIG. 2 shows a numbering of directions.
|
||||
|
||||
FIG. 3 shows a sample board.
|
||||
|
||||
FIG. 4 shows a method in accordance with the present invention.
|
||||
|
||||
DETAILED DESCRIPTION OF THE INVENTION
|
||||
|
||||
Operator plays Black (x); the program plays White (o). Said Black goes
|
||||
first. On operators turn, said program requests a position and direction.
|
||||
FIG. 1 shows the numbering of the squares. FIG. 2 shows the numbering of
|
||||
directions. As per standard rules, if one or more jumps are possible, one
|
||||
of the jumps must be taken in preference to other moves. Said operator
|
||||
enters the numbers for the position and direction. If after jumping over a
|
||||
piece, another jump is possible, and said piece did not become a king after
|
||||
said jump, standard rules require that another jump be taken. In said case,
|
||||
said program requests a direction only in which to continue jumping from the
|
||||
present position. Kings are denoted by upper case. FIG 3. shows a sample
|
||||
board. There is a black king (X) on square 30 and a red king (O) on square
|
||||
2. The numbers on the right are the numbers of the rightmost square in each
|
||||
row.
|
||||
|
||||
A player loses if they cannot make a legal move. Said loss is trivially
|
||||
true if player loses all of his/her pieces. The present invention announces
|
||||
said loser.
|
||||
|
||||
FIG. 4 shows a C program in accordance with the present invention. Control
|
||||
flow is straightforward: control enters routine ``main'', executes a
|
||||
plurality of statements, and exits via return statement. FIG. 4 presumes
|
||||
that type int is 32 bits and short is 16 bits, which are essential to the
|
||||
preferred embodiment of the invention. FIG. 4 also presumes that the host
|
||||
computer uses ASCII encoding for characters. It should be obvious that
|
||||
practitioners skilled in the art of C programming can remove said
|
||||
limitations.
|
||||
|
||||
The disclosure here describes a particular embodiment of the present
|
||||
invention, and other embodiments within the spirit of this disclosure
|
||||
are possible, as well as consumption of spirits while playing.
|
||||
|
||||
CLAIMS
|
||||
|
||||
I claim, by letters patently absurd:
|
||||
|
||||
1. A method for playing checkers on a computer-based system, where said
|
||||
method's source code fits into 1536 countable bytes of source code,
|
||||
where a byte is countable if
|
||||
|
||||
(a) it is not whitespace and
|
||||
(b) it is not a {, }, or ; immediately followed by whitespace.
|
||||
|
||||
2. The method of claim 1, further comprising a method of alpha-beta pruning
|
||||
that exploits the zero-sum nature of the game to unify alpha
|
||||
and beta cuts.
|
||||
|
||||
3. The method of claim 1, further comprising the step of formatting the
|
||||
source code with short lines, in order to impress manager with
|
||||
high productivity, when measured in lines of code.
|
||||
|
||||
4. The method of claim 3, further comprising the step for telling
|
||||
skeptical manager that this is the well-known technique of
|
||||
"linear programming".
|
||||
|
||||
5. The method of claim 1, where ~- and -~ replace the obvious arithmetic
|
||||
operations.
|
||||
|
||||
6. The method of claim 1, further comprising a method where
|
||||
|
||||
(a) strings are encrypted in a manner suitable as C strings, and
|
||||
(b) 7-bit ASCII characters with uniform distribution are maximally
|
||||
packed subject to the restriction that
|
||||
(c) each byte is not countable.
|
||||
|
||||
7. A method for a computer-based system that uses a single shared code
|
||||
sequence to either sum a plurality of bits in an N-bit word or reverses
|
||||
them, in lg(N) time, depending upon a parameter.
|
||||
|
||||
DRAWINGS
|
||||
|
||||
FIG 1.
|
||||
|
||||
+--+--+--+--+--+--+--+--+
|
||||
|32| |31| |30| |29| |
|
||||
+--+--+--+--+--+--+--+--+
|
||||
| |28| |27| |26| |25|
|
||||
+--+--+--+--+--+--+--+--+
|
||||
|24| |23| |22| |21| |
|
||||
+--+--+--+--+--+--+--+--+
|
||||
| |20| |19| |18| |17|
|
||||
+--+--+--+--+--+--+--+--+
|
||||
|16| |15| |14| |13| |
|
||||
+--+--+--+--+--+--+--+--+
|
||||
| |12| |11| |10| | 9|
|
||||
+--+--+--+--+--+--+--+--+
|
||||
| 8| | 7| | 6| | 5| |
|
||||
+--+--+--+--+--+--+--+--+
|
||||
| | 4| | 3| | 2| | 1|
|
||||
+--+--+--+--+--+--+--+--+
|
||||
|
||||
FIG. 2.
|
||||
|
||||
1 0
|
||||
\ /
|
||||
.
|
||||
/ \
|
||||
3 2
|
||||
|
||||
FIG. 3.
|
||||
|
||||
o o X . 29
|
||||
o . . . 25
|
||||
o . . o 21
|
||||
. o . o 17
|
||||
x . . . 13
|
||||
. . x . 9
|
||||
x x . . 5
|
||||
x x O x 1
|
||||
|
||||
FIG. 4
|
||||
|
||||
[See attached listing.]
|
||||
Reference in new issue
Block a user