HAwkeye 1.03 Released

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

HAwkeye 1.03 Released

Post by MikeB »

Found a bug introduced in Hawkeye 1.02. Not sure how it much hurt , but a bug is a bug.

new source and mac exe are available here

https://github.com/MichaelB7/Hawkeye

Code: Select all

Rank Name                 Elo    +    - Games   Score    SC%  OppR   Won  Lost  Draw    EQ% 
   1 Hawkeye 1.02 OSx64  3100   19   19   140    70.0   50.0  3100    33    33    74   52.9 
   2 Hawkeye 1.03 OSx64  3100   19   19   140    70.0   50.0  3100    33    33    74   52.9 
140 game(s) loaded
It may be complier compiler related, not too much difference with icc, more of difference with gcc - related to missing brackets.
User avatar
Nordlandia
Posts: 2821
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: HAwkeye 1.03 Released

Post by Nordlandia »

Someone please compile windows binary :)
petero2
Posts: 690
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: HAwkeye 1.03 Released

Post by petero2 »

MikeB wrote:Found a bug introduced in Hawkeye 1.02. Not sure how it much hurt , but a bug is a bug.

It may be complier compiler related, not too much difference with icc, more of difference with gcc - related to missing brackets.
Can you explain what this bug fix is supposed to do? According to the git repository the bug fix looks like this:

Code: Select all

     if (DTZ_table[0].key1 != key && DTZ_table[0].key2 != key)
     {
         for &#40;i = 1; i < DTZ_ENTRIES; i++)
-        ///mfb
+        ///mfb fix
+        &#123;
             if &#40;DTZ_table&#91;i&#93;.key1 == key || DTZ_table&#91;i&#93;.key2 == key&#41; break;
-        ///mfb
+        &#125;
         if &#40;i < DTZ_ENTRIES&#41;
         &#123;
             struct DTZTableEntry table_entry = DTZ_table&#91;i&#93;;
As far as I can tell these added brackets will make no difference at all unless the C compiler is buggy.
User avatar
Guenther
Posts: 4610
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: HAwkeye 1.03 Released

Post by Guenther »

petero2 wrote:
MikeB wrote:Found a bug introduced in Hawkeye 1.02. Not sure how it much hurt , but a bug is a bug.

It may be complier compiler related, not too much difference with icc, more of difference with gcc - related to missing brackets.
Can you explain what this bug fix is supposed to do? According to the git repository the bug fix looks like this:

Code: Select all

     if &#40;DTZ_table&#91;0&#93;.key1 != key && DTZ_table&#91;0&#93;.key2 != key&#41;
     &#123;
         for &#40;i = 1; i < DTZ_ENTRIES; i++)
-        ///mfb
+        ///mfb fix
+        &#123;
             if &#40;DTZ_table&#91;i&#93;.key1 == key || DTZ_table&#91;i&#93;.key2 == key&#41; break;
-        ///mfb
+        &#125;
         if &#40;i < DTZ_ENTRIES&#41;
         &#123;
             struct DTZTableEntry table_entry = DTZ_table&#91;i&#93;;
As far as I can tell these added brackets will make no difference at all unless the C compiler is buggy.
Have you ever looked at the changes before? Then you won't wonder ;-)
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: HAwkeye 1.03 Released

Post by MikeB »

Guenther wrote:
petero2 wrote:
MikeB wrote:Found a bug introduced in Hawkeye 1.02. Not sure how it much hurt , but a bug is a bug.

It may be complier compiler related, not too much difference with icc, more of difference with gcc - related to missing brackets.
Can you explain what this bug fix is supposed to do? According to the git repository the bug fix looks like this:

Code: Select all

     if &#40;DTZ_table&#91;0&#93;.key1 != key && DTZ_table&#91;0&#93;.key2 != key&#41;
     &#123;
         for &#40;i = 1; i < DTZ_ENTRIES; i++)
-        ///mfb
+        ///mfb fix
+        &#123;
             if &#40;DTZ_table&#91;i&#93;.key1 == key || DTZ_table&#91;i&#93;.key2 == key&#41; break;
-        ///mfb
+        &#125;
         if &#40;i < DTZ_ENTRIES&#41;
         &#123;
             struct DTZTableEntry table_entry = DTZ_table&#91;i&#93;;
As far as I can tell these added brackets will make no difference at all unless the C compiler is buggy.
Have you ever looked at the changes before? Then you won't wonder ;-)
I know - I have had zero programming instruction- Certified Public Accountant by day , mad chess programmer at night. Just do it for fun.
Dokterchen
Posts: 133
Joined: Wed Aug 15, 2007 12:18 pm
Location: Munich

Re: HAwkeye 1.03 Released

Post by Dokterchen »

Windows version please. :)
Torsten
User avatar
Nordlandia
Posts: 2821
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: HAwkeye 1.03 Released

Post by Nordlandia »

User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: HAwkeye 1.03 Released

Post by MikeB »

Nordlandia wrote:http://www71.zippyshare.com/v/bQBsusB6/file.html

https://filesend.co/hawkeye-1.03-(win-lin-mac).7z

Source: http://immortalchess.net/forum/showthread.php?t=31127

Although the "engine load error" bug* is still present.

What causes this bug`?
Sorry - I do not have access to Window tools to debug bugs that only exist in Windows. There are no issues in the Mac version that I'm aware of. I only released a Mac version and if others released a Windows version let them know and maybe they can fix it and send me the patch. Thank you.
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: HAwkeye 1.03 Released

Post by MikeB »

petero2 wrote:
MikeB wrote:Found a bug introduced in Hawkeye 1.02. Not sure how it much hurt , but a bug is a bug.

It may be complier compiler related, not too much difference with icc, more of difference with gcc - related to missing brackets.
Can you explain what this bug fix is supposed to do? According to the git repository the bug fix looks like this:

Code: Select all

     if &#40;DTZ_table&#91;0&#93;.key1 != key && DTZ_table&#91;0&#93;.key2 != key&#41;
     &#123;
         for &#40;i = 1; i < DTZ_ENTRIES; i++)
-        ///mfb
+        ///mfb fix
+        &#123;
             if &#40;DTZ_table&#91;i&#93;.key1 == key || DTZ_table&#91;i&#93;.key2 == key&#41; break;
-        ///mfb
+        &#125;
         if &#40;i < DTZ_ENTRIES&#41;
         &#123;
             struct DTZTableEntry table_entry = DTZ_table&#91;i&#93;;
As far as I can tell these added brackets will make no difference at all unless the C compiler is buggy.
That might be true but i suggest compile with very aggressive options and then have the engines play each other and let us know what you get. In my tests I got a 99% los after 200 games so it did matter but - but may be specific to my hardware, my OS or my compiler - who knows I go by the results and the results speak for themselves.
petero2
Posts: 690
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: HAwkeye 1.03 Released

Post by petero2 »

MikeB wrote:
petero2 wrote:
MikeB wrote:Found a bug introduced in Hawkeye 1.02. Not sure how it much hurt , but a bug is a bug.

It may be complier compiler related, not too much difference with icc, more of difference with gcc - related to missing brackets.
Can you explain what this bug fix is supposed to do? According to the git repository the bug fix looks like this:

Code: Select all

     if &#40;DTZ_table&#91;0&#93;.key1 != key && DTZ_table&#91;0&#93;.key2 != key&#41;
     &#123;
         for &#40;i = 1; i < DTZ_ENTRIES; i++)
-        ///mfb
+        ///mfb fix
+        &#123;
             if &#40;DTZ_table&#91;i&#93;.key1 == key || DTZ_table&#91;i&#93;.key2 == key&#41; break;
-        ///mfb
+        &#125;
         if &#40;i < DTZ_ENTRIES&#41;
         &#123;
             struct DTZTableEntry table_entry = DTZ_table&#91;i&#93;;
As far as I can tell these added brackets will make no difference at all unless the C compiler is buggy.
That might be true but i suggest compile with very aggressive options
I did but as expected there is no difference in the generated executable code:

Code: Select all

git checkout 365521be37063e4233a3a45ae833a6f4e91d49bd
g++ -DNDEBUG -Os -msse4.2 -mpopcnt -fno-exceptions -fno-rtti -Wno-parentheses -O3 -S tbprobe.cpp
mv tbprobe.s tbprobe.s_old
git checkout 7fb5383d57e63b19bf5c22dc67848fc75778c74c
g++ -DNDEBUG -Os -msse4.2 -mpopcnt -fno-exceptions -fno-rtti -Wno-parentheses -O3 -S tbprobe.cpp
mv tbprobe.s tbprobe.s_new
diff tbprobe.s_&#123;old,new&#125;
The diff command produces no output since the two compiled versions are identical.
MikeB wrote:and then have the engines play each other and let us know what you get.
No need for that since the executables are identical.
MikeB wrote:In my tests I got a 99% los after 200 games so it did matter but - but may be specific to my hardware, my OS or my compiler - who knows I go by the results and the results speak for themselves.
I can see two possible explanations.
1. There is some problem in your test environment or your result was a statistical anomaly.
2. Your compiler is buggy.

If your compiler really generates different object code for the two source code versions, you should upgrade it to the latest version, or if you are already running the latest version, you should report the compiler bug to the compiler vendor.

I think explanation 1 is more likely to be true.