Alf 1.06

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Alf 1.06

Postby Casper W. Berg » 05 Nov 2006, 23:45

Hi,

A new version of my engine "Alf" has been released.

Some of it's new features are:
-bigger and better book
-LMR and futility pruning
-recapture extensions

There is also a lot of other small tweaks, so it should be considerably stronger than the old version :D

http://www.student.dtu.dk/~s021692/Alf/alf.htm

-Casper
User avatar
Casper W. Berg
 
Posts: 27
Joined: 11 Jan 2006, 22:33

Re: Alf 1.06

Postby Jim Ablett » 06 Nov 2006, 13:20

___________________________
http://jimablett.net63.net/
Jim Ablett
 
Posts: 721
Joined: 27 Sep 2004, 10:39
Location: Essex, England

Re: Alf 1.06

Postby Tony Thomas » 08 Nov 2006, 09:38

Jim Ablett wrote:Image

Win32 exe including opening book.

http://www.sigmirror.com/files/599/ALF%20CHESS/alf_106_win32.7z

Jim.


Jim, is there any speed increase with your version?
Tony Thomas
 
Posts: 232
Joined: 14 May 2006, 19:13
Location: Atlanta, Ga

Re: Alf 1.06

Postby Jim Ablett » 08 Nov 2006, 10:57

Hi Tony,

There should definitely be a speed increase :D
Java compiled to optimized machine code will always be faster than
the Java interpreter.

Jim.
___________________________
http://jimablett.net63.net/
Jim Ablett
 
Posts: 721
Joined: 27 Sep 2004, 10:39
Location: Essex, England

Re: Alf 1.06

Postby Tony Thomas » 08 Nov 2006, 19:13

Jim Ablett wrote:Hi Tony,

There should definitely be a speed increase :D
Java compiled to optimized machine code will always be faster than
the Java interpreter.

Jim.


The reason I asked is because I do not have Java run time environment on the computer that I use to run tournaments and I am too lazy to download it using dial-up. I figured there would be a nice speed up, but I wasnt too sure because I cannot test the Java version.
Tony Thomas
 
Posts: 232
Joined: 14 May 2006, 19:13
Location: Atlanta, Ga

Re: Alf 1.06

Postby Casper W. Berg » 09 Nov 2006, 14:57

Hi, Jim.

First, thanks for the logo - I like it!
Can I use on my homepage?

Java compiled to optimized machine code will always be faster than
the Java interpreter.


This is actually an old myth, almost every Java interpreter uses Just-in-Time compilation, which means there should only be a constant time difference when you start the program. Unless of course your compiler is better than Java's...

-Casper
User avatar
Casper W. Berg
 
Posts: 27
Joined: 11 Jan 2006, 22:33

Re: Alf 1.06

Postby Guenther Simon » 09 Nov 2006, 15:11

Hi Casper,

Is there some chance for a version using a bit less memory?
I noticed that Alf reserves around 221 MB Ram on my machine,
which is somehow 60MB more than normally allowed here
in RWBC.
The used ram from those 221MB BTW climbs from initially
160MB to > 190MB in a 40/15 rapid game.

OS: WIN XP SP2, Java version of Alf
(config settings have no influence at all on memory usage)

Best regards,
Guenther
User avatar
Guenther Simon
 
Posts: 794
Joined: 26 Sep 2004, 19:49
Location: Regensburg, Germany

Re: Alf 1.06

Postby Casper W. Berg » 09 Nov 2006, 16:12

Hi, Guenther

There is two ways to decrease the memory usage:
1) Set the hashsize to something lower in the settings.ini file
I can't understand when you say it has no influence at all - it works on my machine...

2) Disable the book (also in the settings.ini)
The book is loaded in the memory.

Yes, Alf might allocate more memory if the hashtable is full, in order to collect the PV for thinking lines (limited to 5 ply - so it should not be much).

If the memory limit is to provide fairness and not because it's eating all you free memory, then I wouldn't worry...the number of entries is still very low compared to other engines, because my classes are very memory inefficient.

I will try to make it smaller for next release, but I fear a complete rewrite is the only thing that will seriously help, so that's not in the near future...

-Casper
User avatar
Casper W. Berg
 
Posts: 27
Joined: 11 Jan 2006, 22:33

Re: Alf 1.06

Postby Jim Ablett » 09 Nov 2006, 19:29

Hi Casper,

First, thanks for the logo - I like it!
Can I use on my homepage?


You certainly can :D

This is actually an old myth, almost every Java interpreter uses Just-in-Time compilation, which means there should only be a constant time difference when you start the program. Unless of course your compiler is better than Java's...


Maybe latest java is quicker than it was. I haven't compared the latest but my older java compiles run a lot faster. Searching up to
a ply deeper in the same time. I use the 'Excelsior Jet java compiler' here's the reason they give why they run faster >

http://www.excelsior-usa.com/jetperformance.html

regards Jim.
___________________________
http://jimablett.net63.net/
Jim Ablett
 
Posts: 721
Joined: 27 Sep 2004, 10:39
Location: Essex, England

Re: Alf 1.06

Postby Casper W. Berg » 09 Nov 2006, 22:17

Hi Jim,

You're right, I ran a little test and your compiled version is about 25% faster!
:shock:

-Casper
User avatar
Casper W. Berg
 
Posts: 27
Joined: 11 Jan 2006, 22:33

Re: Alf 1.06

Postby Casper W. Berg » 09 Nov 2006, 23:41

A little further testing:

Alf (exe) vs. Alf (java) timecontrol: 1' 2''
8 - 1 - 1.

And speaking of memory consumption: The compiled version drops 40-50 Mb below the Java version a little while after startup.

So I can only recommend Jim's compilation for all XP users!

-Casper
User avatar
Casper W. Berg
 
Posts: 27
Joined: 11 Jan 2006, 22:33

Re: Alf 1.06

Postby Guenther Simon » 10 Nov 2006, 09:44

Casper W. Berg wrote:Hi, Guenther

There is two ways to decrease the memory usage:
1) Set the hashsize to something lower in the settings.ini file
I can't understand when you say it has no influence at all - it works on my machine...

2) Disable the book (also in the settings.ini)
The book is loaded in the memory.

Yes, Alf might allocate more memory if the hashtable is full, in order to collect the PV for thinking lines (limited to 5 ply - so it should not be much).

If the memory limit is to provide fairness and not because it's eating all you free memory, then I wouldn't worry...the number of entries is still very low compared to other engines, because my classes are very memory inefficient.

I will try to make it smaller for next release, but I fear a complete rewrite is the only thing that will seriously help, so that's not in the near future...

-Casper


Hi Casper,

No matter what settings I use either in the settings.ini
or in the command line by Xms/Xmx options Alf always
allocates around 225MB memory for it and uses at least
170MB of this after a while.
BTW what is the exact meaning of the Xms/Xmx commands?

Even with this settings:
Code: Select all
hashsize=300000

java -Xms100m -Xmx150m -jar Alf106.jar


Of course I don't want to disable the book.
(It shouldn't allocate more than 16MB for the book files anyway?
Or does it expand somehow?)

I guess you don't use a WIN OS?
AFAIK memory allocation often works different for
different OS.

Best wishes,
Guenther

P.S. I will try Jims compile too. After your last message it seems
it is both faster and less memory consuming.
User avatar
Guenther Simon
 
Posts: 794
Joined: 26 Sep 2004, 19:49
Location: Regensburg, Germany

Re: Alf 1.06

Postby Guenther Simon » 10 Nov 2006, 10:11

Jim Ablett wrote:Image

Win32 exe including opening book.

http://www.sigmirror.com/files/599/ALF%20CHESS/alf_106_win32.7z

Jim.


Hi Jim,

Just a note:
Your Alf exe runs also in WIN 2K.

Best regards,
Guenther
User avatar
Guenther Simon
 
Posts: 794
Joined: 26 Sep 2004, 19:49
Location: Regensburg, Germany

Re: Alf 1.06

Postby Jim Ablett » 10 Nov 2006, 11:53

Hi Guenther,

With my build of Alf you can make it use a lot less memory
because it's built with dynamic memory allocation. If you
set Alf not to use it's very large opening book and use a Gui one instead and lower the hash setting it will use a lot less. Here's an example 'settings.ini' that sets Alf to use 38mb.

Code: Select all
// This is the settings file for the chess engine Alf.
// units are:
// hashsize=roughly number of entries (the number will be the closest prime not near a power of two). (100k = about 12 Mb)
// contempt=(point)decimal number in pawns (this value may be scaled up/down by Alf in timed games) 
// boolean options can be "true"/"false"
hashsize=100000
contempt=0.75
postThinking=true
useNullMove=true
useBook=false
bookFile=book106.bin
useFutility=true
useLMR=true


Also thanks to testing it on Win2k.

Regards,
Jim.
___________________________
http://jimablett.net63.net/
Jim Ablett
 
Posts: 721
Joined: 27 Sep 2004, 10:39
Location: Essex, England

Re: Alf 1.06

Postby Tony Thomas » 10 Nov 2006, 11:59

Jims version uses less memory, without any change it used around 100, then later in the game it was up to 170. After making some drastic changes in the configuration I was able to make it use about 60, but my happiness didnt last too long, because it used 107MB, so the memory usage is very inconsistent and varies from game to game.
Tony Thomas
 
Posts: 232
Joined: 14 May 2006, 19:13
Location: Atlanta, Ga

Re: Alf 1.06

Postby Casper W. Berg » 10 Nov 2006, 13:16

Hi Guenther, thanks for the feedback.

No matter what settings I use either in the settings.ini
or in the command line by Xms/Xmx options Alf always
allocates around 225MB memory for it and uses at least
170MB of this after a while.


This sounds very strange...Which version of Java are you using?
Maybe an upgrade will help. But I suggest you use Jim's compilation since it's clearly better :D
Another possibility is that the settings.ini file is somehow corrupt, in which case a default value of 300k is used as hashsize (you might also get an error message from Alf on startup).

BTW what is the exact meaning of the Xms/Xmx commands?

Xms is the initial heap size, and Xmx is the maximum.
If Xmx is exceeded Java should exit with an "out of memory" exception, but these are non-standard options (Java -X to print help on these).

Of course I don't want to disable the book.
(It shouldn't allocate more than 16MB for the book files anyway?
Or does it expand somehow?)

Well, if you use Arena you can use one of the Arena books instead.
But no, it should not allocate more as far as I know, but there might be differences between Java versions.

I guess you don't use a WIN OS?

I use Win XP 64 ed. and Sun's Java 1.5.

Java uses garbage collection, which usually happens when the system is not heavily loaded, so there might be some differences when memory use drops. There are also settings for that, but I haven't tried them.

I hope that was helpful.
-Casper
User avatar
Casper W. Berg
 
Posts: 27
Joined: 11 Jan 2006, 22:33

Re: Alf 1.06

Postby Guenther Simon » 10 Nov 2006, 19:29

Casper W. Berg wrote:Hi Guenther, thanks for the feedback.

No matter what settings I use either in the settings.ini
or in the command line by Xms/Xmx options Alf always
allocates around 225MB memory for it and uses at least
170MB of this after a while.


This sounds very strange...Which version of Java are you using?
Maybe an upgrade will help. But I suggest you use Jim's compilation since it's clearly better :D
Another possibility is that the settings.ini file is somehow corrupt, in which case a default value of 300k is used as hashsize (you might also get an error message from Alf on startup).

BTW what is the exact meaning of the Xms/Xmx commands?

Xms is the initial heap size, and Xmx is the maximum.
If Xmx is exceeded Java should exit with an "out of memory" exception, but these are non-standard options (Java -X to print help on these).

Of course I don't want to disable the book.
(It shouldn't allocate more than 16MB for the book files anyway?
Or does it expand somehow?)

Well, if you use Arena you can use one of the Arena books instead.
But no, it should not allocate more as far as I know, but there might be differences between Java versions.

I guess you don't use a WIN OS?

I use Win XP 64 ed. and Sun's Java 1.5.

Java uses garbage collection, which usually happens when the system is not heavily loaded, so there might be some differences when memory use drops. There are also settings for that, but I haven't tried them.

I hope that was helpful.
-Casper


Hi Casper,

I use the latest Java (1.50.09 and 1.50.06) on both of my machines
which are WINXP SP2 and WIN2K SP5 and the memory
behaviour is the same on both.
If you read above, Tony Thomas did verify my findings.
(I can upload a screenshot from my taskmanager
if you like :)
My settings.ini is also not corrupted of course.

Not using the own book is no great choice for me and
I never use Arena but strict WB.
At least it seems I can drop the memory with Jims build
to something like 160MB, which is ok for me.
(It seems loading the book really needs a lot of memory
already)

I wonder why you don't have that phenomen in XP 64?
Did you really look at teh taskmanager _during_ a game
or a _while_ after start?
Well maybe memory allocation in 64 bit is different...

Best regards,
Guenther

P.S. I noticed something else which is not WB standard
and should be at least there as an user option.
Alf reports scores only from White POV, under WB it is usual
to report from engines POV.
(E.g. this breaks some analysis tools written for WB PGNs
and the WB evaluation window too... I guess you don't even
know WB 4.27x by Alessandro Scotti?)
User avatar
Guenther Simon
 
Posts: 794
Joined: 26 Sep 2004, 19:49
Location: Regensburg, Germany

Re: Alf 1.06

Postby Casper W. Berg » 11 Nov 2006, 19:54

Did you really look at teh taskmanager _during_ a game
or a _while_ after start?
Well maybe memory allocation in 64 bit is different...

I am certain now that it is the garbage collection that makes the confusion. I tried starting Alf up (Jim's compilation) in winboard and doing absolutely nothing aftwards (no moves played) other than watching the task manager. The mem usage increases to about 220 Mb, then after a while it drops to 200 and then finally to 140 Mb.
After that it seems to be almost steady, also when thinking.
Maybe you can confirm this?
P.S. I noticed something else which is not WB standard
and should be at least there as an user option.
Alf reports scores only from White POV, under WB it is usual
to report from engines POV.
(E.g. this breaks some analysis tools written for WB PGNs
and the WB evaluation window too... I guess you don't even
know WB 4.27x by Alessandro Scotti?)

I will add that as an option for the next release :wink:
I do know WB_x, and I use it with Alf on ICC. There the evaluation diagram looks correct for some reason (+ when engine is ahead).

-Casper
User avatar
Casper W. Berg
 
Posts: 27
Joined: 11 Jan 2006, 22:33

Re: Alf 1.06

Postby Volker Pittlik » 17 Nov 2006, 12:09

Casper W. Berg wrote:Hi,

A new version of my engine "Alf" has been released....


Unfortunately it chrashes here. I use Linux (2.6.18) Fedora Core 6. Java is version 1.5.0_09. All in 64-bit flavor.

Debug:

Code: Select all
8703 >first : white
8703 >first : go
8712 <first : 1 1 1 1  c2 - c4 (5401.0)
8732 <second: tellicsnoalias set 1 Crafty v20.14 (1 cpus)
8732 <second: pong 1
8913 <first : move c2c4
8913 >second: time 90000
otim 90479
8913 >second: c4
8913 >second: go
AnimateMove: piece 0 slides from 2,1 to 2,3
8994 <second: tellicsnoalias kibitz Hello from Crafty v20.14! (1 cpus)
8994 <second: move e5
Interrupting first
8994 >first : time 90479
otim 90491
8994 >first : e7e5
AnimateMove: piece 6 slides from 4,6 to 4,4
9079 <second: Hint: Nc3
9079 <first : e7e5
9079 <first : 1 1 1 1 Nb1 - c3 (846.0)
xboard: Error: first chess program (java -Xms400m -Xmx600m -jar Alf106a.jar) exited unexpectedly


Regards

Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: Alf 1.06

Postby Guenther Simon » 17 Nov 2006, 12:17

Code: Select all
9079 <second: Hint: Nc3
9079 <first : e7e5
9079 <first : 1 1 1 1 Nb1 - c3 (846.0)
xboard: Error: first chess program (java -Xms400m -Xmx600m -jar Alf106a.jar) exited unexpectedly


I bet it only crashes against Crafty ;-)

Guenther
User avatar
Guenther Simon
 
Posts: 794
Joined: 26 Sep 2004, 19:49
Location: Regensburg, Germany

Next

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 9 guests