[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what is the best language for go:Re: [computer-go] Score estimating
Be careful proposing lines of code as a software metric or someone
will post a perl one-liner that does minimax search and therefore
solves go ;-).
I am agree, if the clarity of code suffer, but from my own experience,
if the clarity of code is the same, I prefer short code which fit
better in my head. To keep on my example, I was always afraid
to use introspection in java, because it is much longer.
the number of line of code is another way to explain that
I prefer to use
for line in open("myFile.txt"):
print line
than use, something like:
import java.io.*;
public static void main () {
InputStream file = FileInputStream(File("myFile.txt");
String s;
while( (s =file.readLine() ) !=null) {
System.out.println(s);
}
}
It is a lot more long, and clearly, there is some mistake
on usually thing (file.readLine ???). Moreover, the added
liens don't give us more clarity
It's different to compare with one liner of perl
which is
print while(<>);
By loosing variable names and special construct, Perl
loose a lot of clarity.
For those considering scripting languages for quick development and
algorithm evaluation might I suggest writing an extension to wrap
gnugo's tactical search.
That should be a good way, I am seriously just thinking about that.
I don't believe that only one language can don't do everything.
You can't do much of anything without tactical information on chains,
and tactical search needs fast code (e.g. as David Fotland said in
this thread, Many Faces has carefully crafted C code for tactical
search and the program still spends 70% of its time there).
My main exeperience is playing with gnugo. I did not feel that time is
a problem (he play very fast) It seems that the problem is he plays
very strange
things, as this strange shimari.
| . . . . . . .
| . . . . . . .
| . . . + . X .
| . . X . . . .
| . . . . . . .
| . . . . . . .
|---------------
My personal feeling is to explain how strange this shimari,
a high level language is more usefull than carefully crafted code.
It seems that gnugo first decide to play a san-san and then played
a kind of shimari. How can he win if the value of the moves he play
don't depend of the possible following moves
In an other way, as I have really few experience in go programming,
mabe you find my advices too far from the reality. But I really wonder
that how the lack of startegic sense can be compensated with brute force.
I hope I did not make too much noise with my suggestion of Python.
But I am still convinced that as long as performance don't matter, the
higher
the langage is, the best is too find new points of views. And seeing how
fast gnugo play, I am not sure that performance really matter. He really
read
well the semai but half of time it's not the importants ones.
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/