http://www.ioccc.org/whowon2005.html
http://www.mailcom.com/ioccc/toledo/hint.htm
But this post is because I have discovered (a
surprise for me) that it is also the world
smallest chess program written in C language.
It has a size of 3004 bytes, or 2261 bytes simply
deleting all the spacing that makes the knight
figure, cutting down the evaluation function would
make it smaller but that deteriorates the computer
gameplay.
By the way, if someone doesn't play chess, here is
a simple modification to make the computer play
versus itself, change 1<L&e to 1
And it works!
Incredible!
Mis sinceras felicitaciones. Eso es una obra de arte.
jacob
It's not the smallest C chess program in the world.
http://home.hccnet.nl/h.g.muller/max1.html
That page says that its software doesn't even implement
the rules of chess properly .. I don't think that counts
> But where is the setjmp.h???
It's a standard header supplied with every standard C compiler. If
your compiler does not have it available, it is either a very strange
non-conforming compiler, or perhaps it is installed incorrectly.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
Well, in the 5-ply mode I won in 8 moves the first game, and it
allows repetition of the same game each time. You might like
to mix it up a bit by randomizing amonst the top few candidate
moves, if they all have similar evaluations.
The game was: 1. e4 Nc6; 2. d4 Nf6; 3. Bd3 d5; 4. e5 Nd7;
5. c3 f6; 6. Qh5+ g6; 7. Qxg6+ hg; 8. Bxg6#
However this version does.
http://home.hccnet.nl/h.g.muller/max-src2.html
and at 2000 bytes is still smaller.
-William Hughes
William Hughes ha escrito:
My program is still the world smallest chess
program, as it does all legal chess moves (the
other program cannot promote to knight, bishop
or rook).
As a bonus it includes messages for the current
score, stalemate and checkmate and a good board
display for the user's benefit.
Is very possible to cut all those "extras" and
leave a bare chess engine, getting it far below
the actual size of 2044 IOCCC characters (characters
minus spaces, and } { ; followed by space).
But I leave that as an exercise for the readers. ;)
About the random generator, is easy to add a
*NIX only srand(getpid()); at the program start.
Something tells me that playing high quality chess wasn't one of the
project's design goals...
Dave.
--
David Richerby Sadistic Cheese Watch (TM): it's like
www.chiark.greenend.org.uk/~davidr/ a precision chronometer that's made
of cheese but it wants to hurt you!
While I will admit that writing a working chess program is impressive
and your program is no exception, his program does recognize
underpromotion, it just does not play it. So the only consequence will
be suboptimal play on those rare occasions where underpromotion is
beneficial. BTW, his chess program will positively destroy yours in a
course of games.
P.S.
This is the world's smallest chess program. It plays legal chess, but
it will not fare very well in contests:
#include <stdio.h>
int main(void)
{puts("I resign.");return 0;}
--
Kenneth Sloan Kennet...@gmail.com
Computer and Information Sciences +1-205-932-2213
University of Alabama at Birmingham FAX +1-205-934-5473
Birmingham, AL 35294-1170 http://www.cis.uab.edu/sloan/
<OT>
Reminds me of one of the first programs I wrote (not in C). It would
ask you whether you want to go first. If not, its first move was
always pawn to king 4. After your first move, it would randomly print
Checkmate in [N] moves, (I resign)|(You lose).
</OT>
--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
> #include <stdio.h>
> int main(void)
> {puts("I resign.");return 0;}
There's a tic-tac-toe variation that I rather prefer:
#include <stdio.h>
int main(void) {
puts("If we both play optimally it's a draw. Good game.");
return 0;
}
--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
Surely one could add a lookup table that says how many [minimum number]
moves to a draw if the player places his first mark in a center, side,
or corner.
Let me clarify something here.
This discussion is obviously only meaningfull is there is an
unambiguous definition of the concept 'Chess Program'. Like always,
when exploring a boundary, this is not completely obvious what this
should be.
I always have found the following definition to work satisfactory:
A chess program is a program that, according to unambiguous
input/output rules defined by the programmer, is able to score
significantly (in the statistical sense) better than 50% against an
opponent that plays random legal moves.
This would exclude quirks like the one above. (Which I consider a good
thing.) Also note that the random move generator does not yet qualify
as a chess program. (In topological terms, it is on the edge, but not
in the set itself.) To be a chess program you have to do something
more, but it can be an infinitesimal amount.
According to my definition, it is not a requirement that the program
plays legal moves in every situation. Requiring so, would be tantamount
to requiring that the program contains no bugs. Since in general this
cannot be proven for a language as powerful as C, requiring such a
thing would render the definition useless. Giving off an illegal move
should simply be counted as a resignation. If a program that has a
habit of doing this does not do it so often that it no longer clearly
beats the random mover, it still is a chess program.
According to this definition, both micro-Max and Toledo are chess
programs by a large margin. Micro-Max is smaller. And stronger :D,
despite the fact that (unlike what was stated above) it does neither
do, nor accept minor promotions. If the opponent does a minor promotion
that makes a difference (i.e. the piece is not immediately captured)
the response of micro-Max should be considered a resignation. This has
negligible impact on its performance.
I don't know if micro-Max is actually the world's smallest chess
program, but I am not aware of any program that is smaller.
<h.g.m...@hccnet.nl> wrote in message
news:1165849895.9...@l12g2000cwl.googlegroups.com...
IIRC, the ZX-81 chess program didn't allow en passant and/or castling
and/or underpromotion, so can't really be called `legal chess'.
Dave.
--
David Richerby Mentholated Chair (TM): it's like a
www.chiark.greenend.org.uk/~davidr/ chair but it's invigorating!
Was that a derivative of Sargon? There were versions of Sargon as early
as 1978. Sargon is actually not that difficult to digest. I read the
book in 1980, and actually considered implementing a version.
Everything you needed to know about Z-80 programming could have been
learned from this program. Add to that perhaps the basic approach to
CP/M syscalls and you were golden, in those days.
The 1978 Sargon I that, I believe, the ZX-81 chess was based on,
supported E-P and castling. You could implement Sargon I in 8K RAM.
It was not *that* bad. You could beat it easily in the opening of
course, and alpha-beta pruning doesn't really work for endgames, but its
tactics are not all that bad. I believe that in 1980, a Sargon-I on a
Z-80 microcomputer had a rating in the 1600's. I suspect it was the
basis for some of the purpose-built chess computers of the day.
Sargon does a pretty good job of pruning loss-lines, provided they are
evaluated as losses early enough. It is a very good example of
Alpha-Beta pruning, and does what I would call a magnificent job of
pushing the limits of a small memory space for evaluating board
positions. I mean, GNUChess does essentially the same thing (I know PVS
is more than just an optimization of Alpha-Beta, but it's still
essentially the same approach to evaluation).
I've seen smarter guys than myself be beaten time and time again by
GNUChess. Also, I suspect that there are problem setups you could feed
to Sargon that would allow its tactics to play quite strongly, even on a
16K machine.
I'm not seriously trying to compare Sargon I to a computer chess program
that can be configured with hundreds of megabytes of opening book,
complete solutions for 5-piece endgames, and that can exploit
multi-gigahertz processors and gigabytes of ram for tactical evaluation.
But I still say that Sargon and its variants might surprise you. Yeah,
you can beat it every time -- but if you refrain from confusing it in
the opening, you may find it quite surprisingly "strong" in midgame
tactics.
I'm no chess champion, by any means (I play in the 1400's), and I only
dabble in game programming, so don't contribute to the conversation by
tearing my analysis to shreds. I'd actually like to read on this topic
from people who have implement a-b on a board game, for instance.
Rybka, the strongest chess engine in the world, ignores some
underpromotions (at one point it ignored all of them).
Is it therefore not a chess program?
Similarly, the chess program Junior won the world championship without
performing underpromotions -- even when an underpromotion is the best
move.
Is Junior therefore not a chess program?
Both of these programs are sold commercially and even used by chess
experts to analyze games.
My two line chess program obeys the FIDE rules of chess and is
therefore a complete and working chess program.
It loses every game, but that is beside the point.
>From article 10.2, it is very clear that:
#include <stdio.h>
int main(void){puts("I resign");return 0}
is a legal chess program. It also works fine for thematic tournaments.
dco...@connx.com wrote:
>10.2
>The game is won by the player whose opponent declares he resigns. This
>immediately ends the game.
>..."
>
>>From article 10.2, it is very clear that:
>#include <stdio.h>
>int main(void){puts("I resign");return 0}
>is a legal chess program. It also works fine for thematic tournaments.
Legal, but far from small. stdio.h is *huge*.
puts(const char *);main(){puts("I resign");return 0;}
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Richard Heathfield wrote:
>
>Guy Macon <http://www.guymacon.com/> said:
>
>> dco...@connx.com wrote:
>>
>>>10.2
>>>The game is won by the player whose opponent declares he resigns. This
>>>immediately ends the game.
>>>..."
>>>
>>>>From article 10.2, it is very clear that:
>>>#include <stdio.h>
>>>int main(void){puts("I resign");return 0}
>>>is a legal chess program. It also works fine for thematic tournaments.
>>
>> Legal, but far from small. stdio.h is *huge*.
>
>puts(const char *);main(){puts("I resign");return 0;}
Now *that's* what I call a small chess-playing program! <grin>
And, as an added bonus, it wins against my computer as often
as I do...
> David Richerby wrote:
> > max <no...@none.com> wrote:
> > > No idea how small micro-Max is, but back in the 1980s there was a
> > > chess program that fitted within the 1K ZX-81 memory - Z80 machine
> > > code, but making use of the 16K ZX-81 ROM, for IO. Apparently it
> > > played legal but bad chess.
> >
> > IIRC, the ZX-81 chess program didn't allow en passant and/or castling
> > and/or underpromotion, so can't really be called `legal chess'.
>
> Rybka, the strongest chess engine in the world, ignores some
> underpromotions (at one point it ignored all of them).
> Is it therefore not a chess program?
If it allows you to under-promote, but does not choose to do so itself,
that's legal.
Richard
No it wasn't actually. The 1K zx81 chess program used no look ahead (or
rather just 1-ply). Iit just evaluated a score for each of its
available moves.
Since the screen contents also were stored in that 1k memory, this
program cleverly didn't have any code to draw the board. You had to
reload the program from tape to play another game. It also used that
screen memory directly for its board representation, i.e. it did not
have any other copy of the board contents in memory.
It was fun to completely disassemble it to see how it worked.
> There were versions of Sargon as early
> as 1978. Sargon is actually not that difficult to digest. I read the
> book in 1980, and actually considered implementing a version.
I still have that book, full of pencil annotations. I also wanted to
implement it, but as an 11-year-old that was a daunting task that I
never got around to. It taught me a lot though.
--
Jaap's Puzzle Page:
http://www.geocities.com/jaapsch/puzzles/
Exactly. (Sorry for the `me too' but the question was kind of
directed at me.)
Dave.
--
David Richerby Natural Newspaper (TM): it's like a
www.chiark.greenend.org.uk/~davidr/ daily broadsheet but it's completely
natural!
I see now that there was more than one commercially available chess
program for the ZX81. At least one of these implemented all legal
moves but it is implied in
http://www.sincuser.f9.co.uk/016/mindgms.htm
that this required 16KB RAM. I infer this because the article then
goes on to say,
``Artic also produces a technically-excellent game which fits into
the 1K ZX-81. It may not play brilliantly but it is fascinating to
watch the computer scan the moves available to it graphically on
the screen. The computer makes moves very quickly, although it
will not allow the usual en passant and castling which are
available on the bigger games. The game loads very quickly and at
GBP2.95 it is worth the money.''
I suspect that this is the program I was thinking of.
Dave.
--
David Richerby Old-Fashioned Mexi-Pants (TM):
www.chiark.greenend.org.uk/~davidr/ it's like a well-tailored pair of
trousers that comes from Mexico but
it's perfect for your grandparents!
But puts is not. The remainder is a linking problem, and OT. :-)
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
> No idea how small micro-Max is, but back in the 1980s there was a chess
> program that fitted within the 1K ZX-81 memory - Z80 machine code, but
> making use of the 16K ZX-81 ROM, for IO. Apparently it played legal but bad
> chess.
>
One should distingush the sizes of the source code, the executable and
the memory size used including data. The 1KB ZX81 program was a real
achievement, since the 1KB had to hold both the program code and the
data. I am not sure if it was written (entirely) in assembler, though,
because I seem to recall that the ZX-81 had a BASIC interpreter in ROM,
so the program could also have been encoded BASIC instructions (which
could do more per byte than Z80 machine instructions).
In those days I had written a 2KB chess program (code + data) for the
6800 micro-processor, called Usurpator I. The micro-Max project was
actually inspired by the question if I could rival such code density in
a high-level language. The source of such assembly programs was much
larger, of course, since a single-byte assembly instruction typically
took 5 characters to write down. On the other hand, micro-Max is very
memory-hungry for data: in just a few characters you can declare an
array of hundreds of megabytes (int A[1<<26];), and this is exactly
what micro-Max does. So in that sense the comparison is not fair.
Dan and I simply disagree about whether resigning should count as
playing Chess. In my opinion playing Chess is what you do *before* you
resign. That the FIDE rules stipulate that you are allowed to stop
playing Chess any time you like during a game (by resigning) does not
convince me that the stopping itself is part of the game. I would
reserve the term Chess program for a program that can play a game of
Chess to the very end without resigning.
How is it differnt than a program that resigns (plays fully under the
FIDE rules of chess)?
It also is simply not exercising every possible rule of the game. In
both cases the programs are simply choosing not to perform some of the
alternatives that are available to them.
If you fail to see the full correspondence between these two
situations, then I am at a loss as to how to make it clear.
Another even shorter alternative is:
int main(void) (while(1);return 0;}
This program always loses the game on time.
In that case,
int main() {while (1);}
is a chess program: it will lose every game on time. I think the best
way to proceed is to use the term `non-trivial chess program'.
Dave.
--
David Richerby Aluminium Bulb (TM): it's like a light
www.chiark.greenend.org.uk/~davidr/ bulb that's really light!
As far as I can see, we're in complete agreement! My objection to the
ZX-81 program was that not allow its opponent to castle, capture en
passant or underpromote. If a program wishes to avoid making certain
types of moves itself or to resign without even considering the
position, that's perfectly within its prerogative.
> If you fail to see the full correspondence between these two
> situations, then I am at a loss as to how to make it clear.
>
> Another even shorter alternative is:
>
> int main(void) (while(1);return 0;}
>
> This program always loses the game on time.
Indeed -- as I posted myself earlier. (This is not a criticism of you
for posting the same program; just an observation that I was already
aware of this idea.)
Dave.
--
David Richerby Pickled Priest (TM): it's like a
www.chiark.greenend.org.uk/~davidr/ man of the cloth but it's preserved
in vinegar!
There is nothing to make clear. We just don't agree on the definition
of Chess.
In my view the rules of Chess are a subset of the FIDE rules. There are
other FIDE rules that prescribe how participants in events organized by
FIDE should behave. These FIDE rules have nothing to do with Chess. The
Dutch Bridge Society has rules for when Bridge players can smoke during
a Bridge game. That dosn't mean that smoking a cigarete is playing
Bridge.
FIDE rules about offering draws, resigning, and other player
interactions that can determine the entry that goes in the score table
of a tournament by negociation without playing, have nothing to do with
Chess. FIDE rules allow you to participate in a FIDE tournament without
playing Chess.
Resigning is *not* a Chess move, it is merely exercising your right to
stop playing Chess. At any turn someone playing a Chess game has the
choice to play (a move) or to resign or forfeit on time (= not play).
Not playing does not violate FIDE rules. But that does not make not
playing playing Chess.
In fact, to elaborate, the following is a satisfactory puts:
int puts(char *s) {
int err;
while (*s && (EOF != (err = putchar(*s++)))) continue;
if (err > 0) err = putchar('\n');
return err;
}
For many non-hosted systems, it suffices to code putchar(), which
will usually reduce to a half-dozen lines of assembly at worst.
> How is it differnt than a program that resigns (plays fully under the
> FIDE rules of chess)?
> It also is simply not exercising every possible rule of the game.
The difference is, a reasonable person will call you an idiot for making
that program, whereas a program that makes some attempt at actually
playing, might garner some respect.
If you honestly do not see the difference between, say, a one-statement
program that "just resigns", versus say, a one-liner that actually
*plays chess*, 100% completely or otherwise, you have a perception
problem, or you are merely being a clown.
> For many non-hosted systems, it suffices to code putchar(), which
> will usually reduce to a half-dozen lines of assembly at worst.
However: the putchar and puts functions are in the hosted
library, which freestanding implementations don't have to support
at all.
--
"Programmers have the right to be ignorant of many details of your code
and still make reasonable changes."
--Kernighan and Plauger, _Software Tools_
The "return 0;" is not necessary. In C99, reaching the '}' that
terminates the main function is equivalent to "return 0;". In C90, it
merely causes an unspecified status to be returned to the environment,
but that doesn't matter since it can't ever be executed anyway.
And you can save a single character by using "for" rather than "while":
int main(void){for(;;);}
In C90, you can drop the "int "; it's required in C99.
<OT>Running this program on a multi-user system is likely to anger
your fellow users.</OT>
--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
I also suggest considering carefully whether further followups should
go to comp.lang.c, rec.games.chess.computer, or both. If you're not
discussing the C programming language, please consider limiting your
followup to rec.games.chess.computer.
> One should distingush the sizes of the source code, the executable and
> the memory size used including data. The 1KB ZX81 program was a real
> achievement, since the 1KB had to hold both the program code and the
> data. I am not sure if it was written (entirely) in assembler, though,
> because I seem to recall that the ZX-81 had a BASIC interpreter in ROM,
> so the program could also have been encoded BASIC instructions (which
> could do more per byte than Z80 machine instructions).
In those days, it was common practice to code in assembler while making
maximum use of routines that could be found in ROM -- you could use it
for constants, use routines as they were meant to be used, and very
clever people figured out ways to use ROM in really bizarre ways, with
arbitrary entry points, setting registers a certain way, etc.
I knew some of this stuff for Model-I TRS-80. I realized it was an
insane practice then, but it was how you pushed the envelope and squoze
every last byte out of the machine.
Allright. Using the principal of successive refinement:
#include <stdio.h>
int turn;
int main(void)
{
do {
if (!turn++) puts("1: P-K4");
else {
puts("I resign");
return 0;
}
} while (1);
} /* main, fully tested */
Note that it works when playing either white or black. :-) The
next refinement is to get the players move, which will upset the
above universality. Algebraic notation will also upset that.
Ignore any compiler warnings about failure to return a value. The
compiler is confused.
In seriousness, is there an available system for playing postal
chess, which avoids the temptation of letting the program analyze?
Sure. Those that do not contain analyzing programs like:
http://deepfrozen.tripod.com/index.html
http://www.ectool.nu/
http://jhess.sourceforge.net/
http://astrodogpress.com/chess/
There are some others.
Perhaps but it's a header file and does not appear in your executable
program.
Remove del for email
<snip>
> In seriousness, is there an available system for playing postal
> chess, which avoids the temptation of letting the program analyze?
http://www.auspost.com.au
http://www.canadapost.ca
http://www.indiapost.gov.in
http://www.post.japanpost.jp/english/
http://www.newzealandmail.co.nz
http://www.royalmail.com
http://www.usps.com
are the Web sites of just some of the several specialist agencies dedicated
to providing a postal chess service (and other, somewhat related,
services). Alas, they won't normally provide you with an opponent, paper,
pencil, envelopes, pieces, or chess-board. But once you have solved those
problems, they can generally take up the strain from there.
> And you can save a single character by using "for" rather than "while":
>
> int main(void){for(;;);}
You can save one more character by using a recursive call to main:
int main(void){main();}
This is likely to break an implementation limit on many
implementations, but I can imagine an implementation that recognizes
the tail-recursion and goes into an infinite loop here (which is the
behaviour the Standard would suggest).
--
ais523
dco...@connx.com wrote:
>Another even shorter alternative is:
>
>int main(void) (while(1);return 0;}
>
>This program always loses the game on time.
You, sir, are brilliant! You program does indeed play
perfectly legal chess according to both FIDE and USCF
rules, runs on a wide variety of hardware, and is self
documenting as well.
The same program ported to FORTH runs much faster though... :)
On a Cray it executes in 15 seconds.
- William Hughes
David Richerby wrote:
>
><dco...@connx.com> wrote:
>> [...] a program that resigns (plays fully under the FIDE rules
>> of chess) [...] is simply not exercising every possible rule
>> of the game. In both cases the programs are simply choosing
>> not to perform some of the alternatives that are available t
>> to them.
>
>As far as I can see, we're in complete agreement! My objection to the
>ZX-81 program was that not allow its opponent to castle, capture en
>passant or underpromote. If a program wishes to avoid making certain
>types of moves itself or to resign without even considering the
>position, that's perfectly within its prerogative.
Exactly so. The ZX-81 was palying something a lot like chess,
but it wasn't playing chess.
Guy Macon
<http://www.guymacon.com/>
>int main(void){main();}
>This is likely to break an implementation limit on many
>implementations, but I can imagine an implementation that recognizes
>the tail-recursion and goes into an infinite loop here
gcc appears to be such an implementation, when -O is used.
-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Then it's not a valid chess program on a Cray. This may be one of the
few examples of a purpose for which a Cray is less powerful than a
Sinclair ZX-81.
Richard
Pah. These wimpy, verbose languages. In Algol, the "same"
program is only 21% of the size, and for good measure is palindromic,
almost symmetric, and almost a word:
DO~OD
><OT>Running this program on a multi-user system is likely to anger
>your fellow users.</OT>
Surely, only if it's a *bad* multi-user system? Or does the
idle loop equally annoy the users?
--
Andy Walker, School of MathSci., Univ. of Nott'm, UK.
a...@maths.nott.ac.uk
>><OT>Running this program on a multi-user system is likely to anger
>>your fellow users.</OT>
> Surely, only if it's a *bad* multi-user system? Or does the
>idle loop equally annoy the users?
[Still off-topic]
Unfortunately, there seem to be some bad multi-user systems around
these days. Running a single CPU-intensive process on our Linux
systems drastically slows down interactive response and network file
access. Perhaps it's related to Linux's Minix heritage...
So it still fails to output a legal move within the time limit so
still loses on time. Mission accomplished, either way.
Dave.
--
David Richerby Accelerated Swiss Painting (TM): it's
www.chiark.greenend.org.uk/~davidr/ like a Renaissance masterpiece but
it's made in Switzerland and twice
as fast!
#include <sys/select.h>
int main () { select (1,0,0,0,0); }
Is much friendlier and only a little longer.</OT>
Dave.
--
David Richerby Aquatic Cyber-Laser (TM): it's like
www.chiark.greenend.org.uk/~davidr/ an intense beam of light that exists
only in your computer but it lives in
the sea!
But it's not portable; the <sys/select.h> header and the select()
function are not part of standard C.
Yes, but if you allow anything that "fails to output a legal
move within the time limit" , isn't the empty program
a solution?
- William Hughes
<dco...@connx.com> wrote in message
news:1164245524.9...@h54g2000cwb.googlegroups.com...
biy...@gmail.com wrote:
> Hi, a year ago I won the 2005 Best Game categoryof the International
> Obfuscated C Code Contestwith a chess program.
> http://www.ioccc.org/whowon2005.html
> http://www.mailcom.com/ioccc/toledo/hint.htmBut this post is because I
> have discovered (asurprise for me) that it is also the worldsmallest
> chess program written in C language.It has a size of 3004 bytes, or
> 2261 bytes simplydeleting all the spacing that makes the knightfigure,
> cutting down the evaluation function wouldmake it smaller but that
> deteriorates the computergameplay.By the way, if someone doesn't play
> chess, here isa simple modification to make the computer playversus
> itself, change 1<L&e to 1Regards,Óscar Toledo G.http://www.biyubi.com/
It's not the smallest C chess program in the world.
http://home.hccnet.nl/h.g.muller/max1.html
Je hebt gelijk. You are right on this, I second that.
Vincent
p.s. smallest chessprogram on planet in C:
#include <stdio.h>
main() {
printf("i resign\n");
return 0;
}
"Hans" <m...@mac.mac> wrote in message
news:45d0ef5b$0$437$c3e...@news.astraweb.com...
> Nice to see Harm-Geert active here too :)
Currently "Here" includes comp.lang.c, and IMHO the discussion has
become sufficiently un-C-like that it would be best to remove
comp.lang.c from the followup list. Thanks. (f'ups set)
--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
h.g.m...@hccnet.nl said:
> Resigning is *not* a Chess move, it is merely exercising your right to
> stop playing Chess. At any turn someone playing a Chess game has the
> choice to play (a move) or to resign or forfeit on time (= not play).
> Not playing does not violate FIDE rules. But that does not make not
> playing playing Chess.
So the worlds smallest/simplest chess program would make a move,
wait until the other side moves, *then* resign.
Just as the world's smallest OS would give you a file, trash it, and
then crash. So why is MS Windows so bleedin' large?
Richard