Reply
 
LinkBack Thread Tools Display Modes
  #1   Report Post  
Old March 26th 04, 11:47 PM
Mikko Nummelin
 
Posts: n/a
Default Needle-0.53 released!

In the morning of Thu 2004-03-25 I released a version of Needle in its
usual address

http://www.math.hut.fi/~mnummeli/needle/

which was a very buggy development version. Those who downloaded it on
that day should take the new source code from the same address or revert
to 0.52. The current 0.53 release is more satisfactory than that but may
contain unexpected 'features' anyway (due to removal and hasty replacement
of search extension code).


Mikko Nummelin
  #2   Report Post  
Old April 2nd 04, 04:11 AM
Benjamin Jordan
 
Posts: n/a
Default Needle-0.53 released!

Mikko Nummelin wrote in message . fi...
In the morning of Thu 2004-03-25 I released a version of Needle in its
usual address

http://www.math.hut.fi/~mnummeli/needle/

which was a very buggy development version. Those who downloaded it on
that day should take the new source code from the same address or revert
to 0.52. The current 0.53 release is more satisfactory than that but may
contain unexpected 'features' anyway (due to removal and hasty replacement
of search extension code).


Mikko Nummelin



Mikko, does Needle have a transposition table, and if so, can it be
adjusted? I'd like to give it a fair chance against the other engines
in my little ladder matches, and it's only using about 5mb stock :-)
BTW, I like the name.
  #3   Report Post  
Old April 2nd 04, 07:39 AM
Mikko Nummelin
 
Posts: n/a
Default Needle-0.53 released!

On Fri, 1 Apr 2004, Benjamin Jordan wrote:

Mikko Nummelin wrote:


In the morning of Thu 2004-03-25 I released a version of Needle in its
usual address


http://www.math.hut.fi/~mnummeli/needle/


which was a very buggy development version. Those who downloaded it on
that day should take the new source code from the same address or revert
to 0.52. The current 0.53 release is more satisfactory than that but may
contain unexpected 'features' anyway (due to removal and hasty replacement
of search extension code).


Mikko, does Needle have a transposition table, and if so, can it be
adjusted?


Yes and yes, look at line 44 in "xboardclient.c" where it says:

alloc_hashtable(14,3);

This means that there are 2^14 hashtable "clusters" and each one of them
consists of 2^3 "slots". I suggest increasing the 14 to larger value for
bigger hashtable, as noted before increasing it by 1, the hash table size
doubles. It is not advisable to increase the cluster size, as then the
lookups take more time to loop through the cluster.

I'd like to give it a fair chance against the other engines
in my little ladder matches, and it's only using about 5mb stock :-)
BTW, I like the name.


Unfortunately there are many problems in Needle which significantly
decrease its playing strength. One is lack of pondering, other is that it
is too slow, as it generates the moves even when there is a move available
in hashtable. It doesn't however do the generating thing if hashtable
allows a cut-off. I suggest fixing the following thing from the newest
version (hashtable/extension-related sign errors not yet fixed on
Needle's page):


----- patch begins -----


diff -Nru4 needle-0.53/thinking.c needle-0.53.1/thinking.c
--- needle-0.53/thinking.c Thu Mar 25 18:22:12 2004
+++ needle-0.53.1/thinking.c Mon Mar 29 09:03:52 2004
@@ -402,9 +402,9 @@
}

if(!pre_defined_list) {
if(is_check(brd)){
- if(depth=maxdepth-this_extension-1){
+ if(depth=maxdepth+this_extension-1){
this_extension++;
}
generate_check_evasions(brd,new_list_template);
} else {
@@ -481,9 +481,9 @@
best_value=value;
}
if(value=beta){
mvl_in_use-moves[i].approx_move_value=beta;
- add_to_hashtable(brd,maxdepth-depth-this_extension,
+ add_to_hashtable(brd,maxdepth-depth+this_extension,
UPPER_BOUND,
(short)beta,mvl_in_use-moves[i].move);
return best_value; /* Fail high */
}
@@ -525,12 +525,12 @@
}
}

if(best_value=prev_alpha) {
- add_to_hashtable(brd,maxdepth-depth-this_extension,
+ add_to_hashtable(brd,maxdepth-depth+this_extension,
LOWER_BOUND,(short)prev_alpha,best_move);
} else {
- add_to_hashtable(brd,maxdepth-depth-this_extension,
+ add_to_hashtable(brd,maxdepth-depth+this_extension,
EXACT_VALUE,(short)best_value,best_move);
}

return best_value;


----- patch ends -----


Mikko Nummelin
  #4   Report Post  
Old April 2nd 04, 05:06 PM
Benjamin Jordan
 
Posts: n/a
Default Needle-0.53 released!

"Mikko Nummelin" wrote in message
i...
On Fri, 1 Apr 2004, Benjamin Jordan wrote:

Mikko Nummelin wrote:


In the morning of Thu 2004-03-25 I released a version of Needle in its
usual address


http://www.math.hut.fi/~mnummeli/needle/


which was a very buggy development version. Those who downloaded it on
that day should take the new source code from the same address or

revert
to 0.52. The current 0.53 release is more satisfactory than that but

may
contain unexpected 'features' anyway (due to removal and hasty

replacement[i]
of search extension code).


Mikko, does Needle have a transposition table, and if so, can it be
adjusted?


Yes and yes, look at line 44 in "xboardclient.c" where it says:

alloc_hashtable(14,3);

This means that there are 2^14 hashtable "clusters" and each one of them
consists of 2^3 "slots". I suggest increasing the 14 to larger value for
bigger hashtable, as noted before increasing it by 1, the hash table size
doubles. It is not advisable to increase the cluster size, as then the
lookups take more time to loop through the cluster.

I'd like to give it a fair chance against the other engines
in my little ladder matches, and it's only using about 5mb stock :-)
BTW, I like the name.


Unfortunately there are many problems in Needle which significantly
decrease its playing strength. One is lack of pondering, other is that it
is too slow, as it generates the moves even when there is a move available
in hashtable. It doesn't however do the generating thing if hashtable
allows a cut-off. I suggest fixing the following thing from the newest
version (hashtable/extension-related sign errors not yet fixed on
Needle's page):


----- patch begins -----


diff -Nru4 needle-0.53/thinking.c needle-0.53.1/thinking.c
--- needle-0.53/thinking.c Thu Mar 25 18:22:12 2004
+++ needle-0.53.1/thinking.c Mon Mar 29 09:03:52 2004
@@ -402,9 +402,9 @@
}

if(!pre_defined_list) {
if(is_check(brd)){
- if(depth=maxdepth-this_extension-1){
+ if(depth=maxdepth+this_extension-1){
this_extension++;
}
generate_check_evasions(brd,new_list_template);
} else {
@@ -481,9 +481,9 @@
best_value=value;
}
if(value=beta){
mvl_in_use-moves[i].approx_move_value=beta;
- add_to_hashtable(brd,maxdepth-depth-this_extension,
+ add_to_hashtable(brd,maxdepth-depth+this_extension,
UPPER_BOUND,
(short)beta,mvl_in_use-moves.move);
return best_value; /* Fail high */
}
@@ -525,12 +525,12 @@
}
}

if(best_value=prev_alpha) {
- add_to_hashtable(brd,maxdepth-depth-this_extension,
+ add_to_hashtable(brd,maxdepth-depth+this_extension,
LOWER_BOUND,(short)prev_alpha,best_move);
} else {
- add_to_hashtable(brd,maxdepth-depth-this_extension,
+ add_to_hashtable(brd,maxdepth-depth+this_extension,
EXACT_VALUE,(short)best_value,best_move);
}

return best_value;


----- patch ends -----


Mikko Nummelin



Perhaps a future version could have a config file or command line option to
set the hash size? I don't compile them, I just relax with a beer and watch
the binaries battle it out :-) I ran some blitz games last night, and
Needle certainly isn't the worst engine I have (that would be Geko). In one
game, it beat Gollem with a neat Rook sacrifice followed by smothered mate
on move 15.

- Benjamin Jordan


  #5   Report Post  
Old April 2nd 04, 05:48 PM
Tord Kallqvist Romstad
 
Posts: n/a
Default Needle-0.53 released!

Mikko Nummelin writes:

Unfortunately there are many problems in Needle which significantly
decrease its playing strength. One is lack of pondering, other is that it
is too slow, as it generates the moves even when there is a move available
in hashtable.


This is almost certainly much less important than you think. My chess
engine is old and established, and probably stronger than most amateur
engines, but I still generate all moves even when a move from the hash
table is found. Modifying my engine to just play the hash table move
before generating an moves would be an easy task, but I don't see any
point in doing so, because it wouldn't improve the playing strength at
all. The speed gain would be too small to be noticable, despite the
fact that my move generator is one of the slowest in the known
universe.

Most newbies seem to believe that the speed of the move generator is
the major factor (or at least one of the major factors) determining
the strength of a chess engine. It isn't. In fact, speed in general
is not terribly important, especially not in the early phases of
development.

In order of priority, you should concentrate on the following six
taks:

1. Fixing bugs.
2. Fixing bugs.
3. Fixing bugs.
4. Writing clear and clean code.
5. Reducing the size of your search tree.
6. Improving your evaluation function.

In particular, the first three items on the above list are
fundamentally important. I am constantly amazed by the number of bugs
I discover in my own code, often in functions which have been
unchanged for half a year and where I didn't even have the slightest
suspicion that anything was wrong.

In my opinion, you shouldn't worry at all about speed (at least not as
measured by nodes/second) until your engine is within 100-200 Elo points
from the best amateur engines. You will improve much more rapidly by
concentrating on high-level improvements.

Tord


  #6   Report Post  
Old April 5th 04, 10:18 AM
Benjamin Jordan
 
Posts: n/a
Default Needle-0.53 released!


"Tord Kallqvist Romstad" wrote in message
...
Mikko Nummelin writes:

Unfortunately there are many problems in Needle which significantly
decrease its playing strength. One is lack of pondering, other is that

it
is too slow, as it generates the moves even when there is a move

available
in hashtable.


This is almost certainly much less important than you think. My chess
engine is old and established, and probably stronger than most amateur
engines, but I still generate all moves even when a move from the hash
table is found. Modifying my engine to just play the hash table move
before generating an moves would be an easy task, but I don't see any
point in doing so, because it wouldn't improve the playing strength at
all. The speed gain would be too small to be noticable, despite the
fact that my move generator is one of the slowest in the known
universe.

Most newbies seem to believe that the speed of the move generator is
the major factor (or at least one of the major factors) determining
the strength of a chess engine. It isn't. In fact, speed in general
is not terribly important, especially not in the early phases of
development.

In order of priority, you should concentrate on the following six
taks:

1. Fixing bugs.
2. Fixing bugs.
3. Fixing bugs.
4. Writing clear and clean code.
5. Reducing the size of your search tree.
6. Improving your evaluation function.

In particular, the first three items on the above list are
fundamentally important. I am constantly amazed by the number of bugs
I discover in my own code, often in functions which have been
unchanged for half a year and where I didn't even have the slightest
suspicion that anything was wrong.

In my opinion, you shouldn't worry at all about speed (at least not as
measured by nodes/second) until your engine is within 100-200 Elo points
from the best amateur engines. You will improve much more rapidly by
concentrating on high-level improvements.

Tord



After reading your intriguing post, I looked up your engine and tried it
out. I really like Gothmog! It does splendidly in my little blitz battles,
and produces some interesting games. Its strength is within sight of
Crafty's, despite reaching only 1/4 the NPS and having a miniscule opening
book. What impresses me the most though, is its style. Look at this blitz
game where Gothmog makes a knight sacrifice on move 19 which results in a
winning attack. What is interesting is that the engine output was NOT
showing a winning continuation! "Speculative?" !!

[Event "-"]
[Site "-"]
[Date "2004.04.04"]
[Round "-"]
[White "Gothmog (Active)"]
[Black "Crafty-19.3"]
[Result "1-0"]

1.e4 e5 2.Nf3 Nf6 3.d4 exd4 4.e5 Ne4 5.Qxd4 d5 6.exd6 Nxd6 7.Qf4 Be7 8.Bd3
Na6
9.Be3 Bf6 10.Nc3 Bxc3+ 11.bxc3 O-O 12.O-O f6 13.Rae1 Re8 14.a3 g5 15.Qa4 Bd7
16.Qd4
Nb8 17.Bc1 Nc6 18.Qd5+ Kg7 19.Nxg5 Rxe1 20.Rxe1 fxg5 21.c4 h6 22.Bb2+ Kf8
23.Bh7
Ne7 24.Qe5 Ne8 25.f4 g4 26.Qh5 c6 27.Qxh6+ Kf7 28.Bg6+ Nxg6 29.Qh7+ Kf8
30.Rxe8+
Kxe8 31.Qxg6+ Ke7 32.Bf6+ Kd6 33.Bxd8+ Kc5 {Black resigns} 1-0


  #7   Report Post  
Old April 5th 04, 08:34 PM
Tord Kallqvist Romstad
 
Posts: n/a
Default Needle-0.53 released!

"Benjamin Jordan" writes:

After reading your intriguing post, I looked up your engine and tried it
out. I really like Gothmog!


Thanks! :-)

It does splendidly in my little blitz battles, and produces some
interesting games. Its strength is within sight of Crafty's,


On a single-processor 32-bit computer, it seems to be about 100 points
(or perhaps slightly less) behind. But while my engine was designed
for such computers, Crafty was designed to run on multi-processor
64-bit machines. Therefore, running a match on a single-processor
32-bit machine (which, I assume, is what you did) is not the most fair
way to compare the two engines.

despite reaching only 1/4 the NPS


A good piece of evidence of the correctness of my claim that there is
little point in worrying about speed until your engine is within sight
of the strongest ones, isn't it?

and having a miniscule opening book.


I guess you forgot to download the opening book, then. The opening
book is a separate download, found on the same page as the engine
itself. The file containing the executable only contains a tiny
tournament book containing only a handful of very short lines. The
engine plays its first few moves from the tournament book, and then
starts looking for moves in the main book (which, as I said, is a
separate download).

Another tip is that I have found that the default settings are not the
strongest. By changing the "selectivity" setting from the default
value of 4 to 6 you can improve the strength of the engine. If you
run Gothmog in Winboard mode, this is done by modifying the
gothmog.ini file. If you run it in UCI mode, you have to do the
change from the GUI.

What impresses me the most though, is its style.


I'm very happy to hear that. My main goal has always been to create
an engine with a different and entertaining style of play, rather than
the strongest possible engine.

Look at this blitz game where Gothmog makes a knight sacrifice on
move 19 which results in a winning attack. What is interesting is
that the engine output was NOT showing a winning continuation!
"Speculative?" !!


Yes, nice game. Thanks for posting it!

Tord
  #8   Report Post  
Old April 7th 04, 12:29 AM
hb
 
Posts: n/a
Default Needle-0.53 released!

Tord Kallqvist Romstad wrote:

Most newbies seem to believe that the speed of the move generator is
the major factor (or at least one of the major factors) determining
the strength of a chess engine. It isn't. In fact, speed in general
is not terribly important, especially not in the early phases of
development.


But speed of move generation can be an indication of the effectiveness
of optimization options given to the compiler. As such it can help solve
bugs in a makefile.
For a newbee speed can be reassuring in that you can keep up
with the Joneses at least in that respect.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Needle 0.51 released Mikko Nummelin rec.games.chess.computer (Computer Chess) 2 March 6th 04 03:09 PM
Palview 4 now released Eric Bentzen rec.games.chess.analysis (Chess Analysis) 0 December 14th 03 03:34 PM
Palview 4 now released Eric Bentzen rec.games.chess.computer (Computer Chess) 0 December 14th 03 03:34 PM
-Humor Break- Video of tiger attack Roy now released Chuck in Minot rec.games.chess.computer (Computer Chess) 0 October 14th 03 07:54 PM
Winboard engine Alarm is released Benny Antonsson rec.games.chess.computer (Computer Chess) 0 July 16th 03 11:30 AM


All times are GMT +1. The time now is 01:35 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ChessBanter.
The comments are property of their posters.
 

About Us

"It's about Chess"

 

Copyright © 2017