Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: The death of computerchess.

Author: Uri Blass

Date: 10:07:58 12/21/01

Go up one level in this thread


On December 21, 2001 at 11:20:22, Miguel A. Ballicora wrote:

>On December 21, 2001 at 07:15:01, Uri Blass wrote:
>
>>On December 20, 2001 at 23:31:52, Miguel A. Ballicora wrote:
>>
>>>On December 20, 2001 at 21:15:42, Dann Corbit wrote:
>>>
>>>>On December 20, 2001 at 17:07:05, Peter Berger wrote:
>>>>
>>>>>On December 20, 2001 at 14:04:24, Christophe Theron wrote:
>>>>>
>>>>>>120-150 amateur Winboard chess engines, 90%-95% of them being essentially
>>>>>>partial Crafty clones (I mean using the same techniques, or only a subset of the
>>>>>>same techniques).
>>>>>
>>>>>How do you know? Some Harry Potter trick ? Alorama.
>>>>
>>>>He's wrong, and I am very sure of that.  The only crafty clones that I know of
>>>>are Voyager, Bionic, and La Petite.  Most bitboard programs don't resemble
>>>>crafty very much.  Beowulf is nothing like crafty, and neither are Pepito or
>>>>Amy.  The only thing that is the same is the bitboard representation.
>>>
>>>Neither is Gaviota (a weak one), unless for some remote coincidence there is a
>>>resemblance since I have never studied Crafty sources or any other, because I am
>>>lazy.
>>
>>Do you say that you read nothing of the comments of Crafty source code?
>>You do not need to try to understand the source code of Crafty in order to learn
>>some things about it.
>
>No, everything I learned was from r.g.c.c. an excellent chapter I read from am
>Enciclopaedia of AI and/or figuring out things by myself.
>That was part of my fun. I did things wrong (performance wise) but allowed me
>to learn a lot. All the bitboard stuff I developed by myself after I read
>a message from Bob saying that he was using "rotated bitboards". The word
>"rotated" gave me the clue about what he was doing. Further messages from him
>confirmed that I guessed in the right direction. Of course, this took me a
>_long_ time. Some people like puzzles or crosswords. I like this. For me,
>peeking at the code would have been like reading the solution on the last page.
>The whole generator must have taken me probably a year.
>
>>I think that I can consider my chess program as original(I think that more than
>>80% of the source code is original) but I copied a lot of names of variables
>>from tscp and even copied some lines by copy and paste.
>>
>>Here is an example:
>>The small function get_ms() that returns the time that the program calculated is
>>an example for lines that were copied from TSCP
>>
>>I do not copy things without understanding them but sometimes copying is simply
>>the fastest way to do things.
>>
>>How did you implement a function that return the time?
>>Did you remember the exact way to use the function ftime or did you copy it
>>from a previous application that does not have to be about chess?
>
>I just browsed the "The C programming language" by K&R to see what kind
>of functions I could use. Learning C.C. went along learning C.
>
>The only thing I copied from another program was the lines needed to connect
>my program to winboard. I did it from TSCP. I did that because I had an engine
>running and I was extremely eager to play with a board. Once I did it, I tossed
>it out when I coded it in the way I wanted (completely different, with pointer
>to functions and multithreading).

It is one thing that I also think to copy from TSCP
my program has also the same structure in main as TSCP
but the heavy move generator of generating legal moves is not
taken from TSCP.

I will have to do some changes in it but
I do not like to learn winboard.


few function in it (gen_push and gen_promote)
are mainly taken from tscp but they are not exactly the same
(I have also my way to give scores for moves that is not
the same as TSCP and I did not learn it from another program).

My move ordering is still bad and I think to try to
investigate how to get a better order of moves by
looking at the trees of my program.

I do not use hash tables and null move and I do not expect
it to be changed in the near future.

It is now almost a tscp clone in the search techniques
except the fact that my qsearch is limited and
considers different move than TSCP and the fact that
the order of moves is different.



>
>You are doing what it could be the most efficient thing and probably after
>a while your program will have no lines from TSCP.

I predict that it never going to be the case
I see no reason to change the name of my variables
only because part of them are the same as TSCP and
I am probably also not going to change few other lines
that I copied from TSCP.

Here is part of Tscp that I am probably going to copy
with few small changes

It my be relevant for every game and not only for chess and
it is not dependent on the data structure of the program.
I see no reason not to do it.

if (!strcmp(s, "on")) {
			computer_side = side;
			continue;
		}
		if (!strcmp(s, "off")) {
			computer_side = EMPTY;
			continue;
		}
		if (!strcmp(s, "st")) {
			scanf("%d", &max_time);
			max_time *= 1000;
			max_depth = 32;
			continue;
		}
		if (!strcmp(s, "sd")) {
			scanf("%d", &max_depth);
			max_time = 1 << 25;
			continue;
		}
		if (!strcmp(s, "undo")) {
			if (!hply)
				continue;
			computer_side = EMPTY;
			takeback();
			ply = 0;
			gen();
			continue;
		}
		if (!strcmp(s, "new")) {
			computer_side = EMPTY;
			init();
			gen();
			continue;
		}
		if (!strcmp(s, "d")) {
			print_board();
			continue;
		}
		if (!strcmp(s, "bench")) {
			computer_side = EMPTY;
			bench();
			continue;
		}
		if (!strcmp(s, "bye")) {
			printf("Share and enjoy!\n");
			return 0;
		}
		if (!strcmp(s, "xboard")) {
			xboard();
			return 0;
		}
		if (!strcmp(s, "help")) {
			printf("on - computer plays for the side to move\n");
			printf("off - computer stops playing\n");
			printf("st n - search for n seconds per move\n");
			printf("sd n - search n ply per move\n");
			printf("undo - takes back a move\n");
			printf("new - starts a new game\n");
			printf("d - display the board\n");
			printf("bench - run the built-in benchmark\n");
			printf("bye - exit the program\n");
			printf("xboard - switch to XBoard mode\n");
			printf("Enter moves in coordinate notation, e.g., e2e4, e7e8Q\n");
			continue;
		}


Uri



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.