Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Chess programming puzzle

Author: Scott Gasch

Date: 17:15:23 02/22/05

Go up one level in this thread


>>I do not understand assembler so I do not care about it.
>>I think that you take too serious the comparison in lines
>>
>>The fact that you can write things in one line mean nothing.
>>I compare codes that I understand and Tim foden's was the best that I found.
>>
>>I was interesting in the question because I may write something more general and
>>not because I am interested in exact comparison of length.
>>
>>30 lines is better than 50 lines when there is no effort to do it artificially
>>short but 30 lines is not necessaraly better than 32 lines.
>>
>>Uri
>
>
>Note that I understand also stefan's code but ideas that are used in Tim's code
>are better for solving more complicated problems.
>
>The question was what code is best.
>
>length is only an estimate.
>I want code to be clear to me and not to be too long to write(I do not care
>about length in lines and length in lines is only an estimate).
>
>Maybe better estimate is number of chars in the code in case that you use one
>letter for every variable(to prevent clearer code to be bigger because of longer
>names).
>
>Uri

I think best = shortest and fastest.  Programming puzzles rarely award points
for readability.

I find it strange that you consider the number of chars in the code as a
suitable measurement but not the number of lines of asm it produces.  If
"shortest" is indeed a goal I think lines of asm with the same compiler settings
is a good way to measure it.

As for speed, average execution time on the same machine would be a good
estimate.  Remind me to sprintf all my output to a buffer and dump it at the end
;)

Scott




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.