Official Release of OliThink 5.7.5 including a Java-GUI

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

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Guenther
Posts: 3662
Joined: Wed Oct 01, 2008 4:33 am
Location: Regensburg, Germany
Full name: Guenther Simon
Contact:

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Post by Guenther » Fri Nov 13, 2020 4:57 pm

OliverBr wrote:
Fri Nov 13, 2020 2:59 pm
Hello .)

I have released OliThink 5.9.1 despite taking a developing break. It's about 25 ELO stronger against other engines and has even less code than before. I rewrote OliThink's late move pruning and got immediately an increase in strength.

...
I will upload soon a version that will work on old hardware again.

BTW I had a tiny warning while compiling, don't remember if I had it already for previous versions and was too lazy for reporting.

Code: Select all

clang -O3 -Wall -Wextra -mssse3 -mllvm -align-all-nofallthru-blocks=6    olithink.c   -o olithink
olithink.c:1474:83: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
                if (!strncmp(buf, comreturn[i], strlen(comreturn[i]))) return  i < 8 ? 0 : 6-i; return -1; }
                                                                                                ^
olithink.c:1473:16: note: previous statement is here
        else { int i; for (i = 0; i < 15 ; i++)
                      ^
1 warning generated.

Code: Select all

5.91 ssse3

xboard
analyze
...
16    21    211   1974753  d2d4 d7d5 e2e3 g8f6 c2c4 c8f5 c4d5 d8d7 b1c3 f6d5 f1d3 b8c6 g1f3 e7e6 e1g1
17    24    295   2829689  d2d4 d7d5 e2e3 g8f6 c2c4 e7e6 b1c3 b8c6 g1f3 f8b4 c1d2 a7a5 c4d5 e6d5 f1d3 c8d7
18    22    404   3938192  d2d4 d7d5 e2e3 g8f6 g1f3 c7c6 f1d3 e7e6 e1g1 b8d7 b1c3 d8b6 a1b1 h7h6 c1d2 f8d6
19    15    577   5633525  d2d4 d7d5 e2e3 g8f6 g1f3 c8f5 h2h3 c7c6 g2g4 f5e4 b1c3 h7h6 c3e4 f6e4 c2c4 b8d7 c4c5
20    27   1081  10834807  d2d4 d7d5 e2e3 g8f6 c2c4 c7c6 c4d5 c6d5 b1c3 e7e6 g1f3 b8c6 c1d2 a7a6 f3e5 d8b6 e5c6 b7c6 d1a4
21    24   1454  14791973  d2d4 d7d5 e2e3 b8c6 g1f3 c8f5 f1d3 f5d3 d1d3 e7e6 e1g1 a7a6 a2a3 d8c8 f1e1 g8f6 c1d2 f8d6 b1c3
22    20   1735  17678659  d2d4 d7d5 e2e3 b8c6 g1f3 c8f5 f1d3 f5d3 c2d3 e7e6 d1b3 a8b8 b1c3 f8d6 c3b5 g8f6 b3a4 h7h6 c1d2 e8g8 b5a7
23    21   2215  22696330  d2d4 d7d5 e2e3 b8c6 g1f3 c8f5 f1d3 f5d3 c2d3 e7e6 d1b3 a8b8 b1c3 f8d6 c3b5 g8f6 b3a4 e8g8 b5a7 b8a8
24    24   3282  33871860  d2d4 d7d5 e2e3 b8c6 g1f3 c8g4 c2c3 g4f3 g2f3 e7e6 e3e4 d8h4 e4d5 e6d5 d1e2 g8e7 e2e3 e8c8 e3g5 h4g5 c1g5 f7f5 f1d3 a7a6
25    19   4856  50836513  d2d4 d7d5 e2e3 e7e6 g1f3 c7c5 c2c4 g8f6 c4d5 e6d5 d4c5 f8c5 a2a3 e8g8 b2b4 c5b6 b1c3 b8c6 f1d3 c8g4 e1g1 d5d4 e3d4

Code: Select all

5.91 mn

xboard
analyze
...
16    21    206   1974753  d2d4 d7d5 e2e3 g8f6 c2c4 c8f5 c4d5 d8d7 b1c3 f6d5 f1d3 b8c6 g1f3 e7e6 e1g1
17    24    290   2829689  d2d4 d7d5 e2e3 g8f6 c2c4 e7e6 b1c3 b8c6 g1f3 f8b4 c1d2 a7a5 c4d5 e6d5 f1d3 c8d7
18    22    396   3938192  d2d4 d7d5 e2e3 g8f6 g1f3 c7c6 f1d3 e7e6 e1g1 b8d7 b1c3 d8b6 a1b1 h7h6 c1d2 f8d6
19    15    558   5633525  d2d4 d7d5 e2e3 g8f6 g1f3 c8f5 h2h3 c7c6 g2g4 f5e4 b1c3 h7h6 c3e4 f6e4 c2c4 b8d7 c4c5
20    27   1051  10834807  d2d4 d7d5 e2e3 g8f6 c2c4 c7c6 c4d5 c6d5 b1c3 e7e6 g1f3 b8c6 c1d2 a7a6 f3e5 d8b6 e5c6 b7c6 d1a4
21    24   1420  14791973  d2d4 d7d5 e2e3 b8c6 g1f3 c8f5 f1d3 f5d3 d1d3 e7e6 e1g1 a7a6 a2a3 d8c8 f1e1 g8f6 c1d2 f8d6 b1c3
22    20   1697  17678659  d2d4 d7d5 e2e3 b8c6 g1f3 c8f5 f1d3 f5d3 c2d3 e7e6 d1b3 a8b8 b1c3 f8d6 c3b5 g8f6 b3a4 h7h6 c1d2 e8g8 b5a7
23    21   2173  22696330  d2d4 d7d5 e2e3 b8c6 g1f3 c8f5 f1d3 f5d3 c2d3 e7e6 d1b3 a8b8 b1c3 f8d6 c3b5 g8f6 b3a4 e8g8 b5a7 b8a8
24    24   3229  33871860  d2d4 d7d5 e2e3 b8c6 g1f3 c8g4 c2c3 g4f3 g2f3 e7e6 e3e4 d8h4 e4d5 e6d5 d1e2 g8e7 e2e3 e8c8 e3g5 h4g5 c1g5 f7f5 f1d3 a7a6
25    19   4791  50836513  d2d4 d7d5 e2e3 e7e6 g1f3 c7c5 c2c4 g8f6 c4d5 e6d5 d4c5 f8c5 a2a3 e8g8 b2b4 c5b6 b1c3 b8c6 f1d3 c8g4 e1g1 d5d4 e3d4

OliverBr
Posts: 668
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Post by OliverBr » Fri Nov 13, 2020 5:17 pm

Guenther wrote:
Fri Nov 13, 2020 4:57 pm
BTW I had a tiny warning while compiling, don't remember if I had it already for previous versions and was too lazy for reporting.

Code: Select all

clang -O3 -Wall -Wextra -mssse3 -mllvm -align-all-nofallthru-blocks=6    olithink.c   -o olithink
olithink.c:1474:83: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
                if (!strncmp(buf, comreturn[i], strlen(comreturn[i]))) return  i < 8 ? 0 : 6-i; return -1; }
                                                                                                ^
olithink.c:1473:16: note: previous statement is here
        else { int i; for (i = 0; i < 15 ; i++)
                      ^
1 warning generated.
Thank you for this hint. Unfortunately I don't get any warning on neither MacOSX nor Linux.

Code: Select all

$ clang -O3 -Wall -Wextra -mssse3 -mllvm -align-all-nofallthru-blocks=6    olithink.c   -o olithink
$
It looks like the compiler even doesn't know this warning:

Code: Select all

$  clang -O3 -Wall -Wextra -Wmisleading-indentation -mssse3 -mllvm -align-all-nofallthru-blocks=6    olithink.c   -o olithink
warning: unknown warning option '-Wmisleading-indentation'; did you mean '-Wbinding-in-condition'? [-Wunknown-warning-option]
1 warning generated.
So it's difficult for me to fix it for me on my own. Do you have a tip how to avoid this warning?

Other question: If I compile with this option instead of "-mavx2", it will run on older hardware, too?

Code: Select all

-mssse3
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

Guenther
Posts: 3662
Joined: Wed Oct 01, 2008 4:33 am
Location: Regensburg, Germany
Full name: Guenther Simon
Contact:

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Post by Guenther » Fri Nov 13, 2020 7:26 pm

OliverBr wrote:
Fri Nov 13, 2020 5:17 pm

Code: Select all

    clang -O3 -Wall -Wextra -mssse3 -mllvm -align-all-nofallthru-blocks=6    olithink.c   -o olithink
    olithink.c:1474:83: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
                    if (!strncmp(buf, comreturn[i], strlen(comreturn[i]))) return  i < 8 ? 0 : 6-i; return -1; }
                                                                                                    ^
    olithink.c:1473:16: note: previous statement is here
            else { int i; for (i = 0; i < 15 ; i++)
                          ^
    1 warning generated.
Thank you for this hint. Unfortunately I don't get any warning on neither MacOSX nor Linux.

Other question: If I compile with this option instead of "-mavx2", it will run on older hardware, too?

Code: Select all

-mssse3
Sorry no time for looking at the stuff with the warning now.
Probably you can figure it out yourself anyway, or someonelse wants to look at this nested C stuff for protocol handling here:

Code: Select all

char comreturn[][9] = {"xboard", ".", "bk", "draw", "hint", "computer", "accepted", "rejected", // ignored
						"quit", "new", "remove", "analyze", "exit", "force", "undo"}; // return 6-index
char* feature = "feature setboard=1 myname=\"OliThink "VER"\" colors=0 analyze=1 ping=1 sigint=0 sigterm=0 done=1";
int protV2(char* buf, int parse) {
	if (!strncmp(buf,"protover",8)) printf("%s\n", feature);
	else if (!strncmp(buf,"ping",4)) { buf[1] = 'o'; printf("%s", buf); fgets(buf,255,stdin); return protV2(buf, 0); }
...    /* a lot of other else if conditions omitted GS */
	else if (strchr(buf, '/') != NULL && strlen(buf)>16) {
		engine = -1; analyze = pondering = 1; if (parse) _parse_fen(buf, 1); else return -9; }
	else if (buf[0] == 0 || buf[0] == '\n');
	else { int i; for (i = 0; i < 15 ; i++)
		if (!strncmp(buf, comreturn[i], strlen(comreturn[i]))) return  i < 8 ? 0 : 6-i; return -1; }
	return 0;
}
For the other question. Yes, but you should not replace it, but instead compile both or even better three flavours (+ -mbmi2 perhaps)
and include all of them in one download for WIN.
Avx2 will only run on very new hardware, while ssse3 should be working on almost all old hardware.
There is a lot between them though, therefore may be add bmi2 too.

Dann Corbit
Posts: 11859
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Post by Dann Corbit » Fri Nov 13, 2020 7:58 pm

You have two semicolons here for the initialization of pon to zero:
Move pv[128][128], pon = 0;;
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

Dann Corbit
Posts: 11859
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Post by Dann Corbit » Fri Nov 13, 2020 8:01 pm

You can remove the warning about misleading indentation by indenting it like this:

Code: Select all

    else {
        int i;
        for (i = 0; i < 15 ; i++)
            if (!strncmp(buf, comreturn[i], strlen(comreturn[i]))) return  i < 8 ? 0 : 6-i;
        return -1;
    }
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

OliverBr
Posts: 668
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Post by OliverBr » Fri Nov 13, 2020 8:15 pm

Guenther wrote:
Fri Nov 13, 2020 7:26 pm
For the other question. Yes, but you should not replace it, but instead compile both or even better three flavours (+ -mbmi2 perhaps)
and include all of them in one download for WIN.
Avx2 will only run on very new hardware, while ssse3 should be working on almost all old hardware.
There is a lot between them though, therefore may be add bmi2 too.
Actually I don't set explicitly the Avx2 option when creating the WIN executably, I build the Release with Visual Studio 2019. I guess it's selecting the option by itself.

I build the executables for 3 operating systems. 3 different compiling options each would mean 9 different executables.
Perhaps it's best to inquire first, which are demanded most.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

OliverBr
Posts: 668
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Post by OliverBr » Fri Nov 13, 2020 8:31 pm

Dann Corbit wrote:
Fri Nov 13, 2020 8:01 pm
You can remove the warning about misleading indentation by indenting it like this:

Code: Select all

    else {
        int i;
        for (i = 0; i < 15 ; i++)
            if (!strncmp(buf, comreturn[i], strlen(comreturn[i]))) return  i < 8 ? 0 : 6-i;
        return -1;
    }
Thank you. I am still wondering why I don't have this warning in the clangs of neither system:

MacOSX is 10:

Code: Select all

$ clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Linux is 7:

Code: Select all

# clang --version
clang version 7.0.1-8+deb10u2 (tags/RELEASE_701/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
I can't update Linux clang either:

Code: Select all

# apt-get install clang
Reading package lists... Done
Building dependency tree       
Reading state information... Done
clang is already the newest version (1:7.0-47).
The following packages were automatically installed and are no longer required:
  apt-show-versions libapt-pkg-perl
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

Dann Corbit
Posts: 11859
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Post by Dann Corbit » Fri Nov 13, 2020 9:58 pm

Some of us know how to make that lovely lady scream "BLOODY MURDER!" at the slightest provocation.
olithink.c:1474:83: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
if (!strncmp(buf, comreturn, strlen(comreturn))) return i < 8 ? 0 : 6-i; return -1; }

For more information, including the magical incantation, see the following:
https://drive.google.com/file/d/1krtXZO ... sp=sharing
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

Dann Corbit
Posts: 11859
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Post by Dann Corbit » Fri Nov 13, 2020 10:00 pm

I don't think it will make a difference, but I am using a more modern clang:

Code: Select all

$ clang --version
clang version 11.0.0 (https://github.com/msys2/MINGW-packages c0083b9edc111315c868f9c53dd60aaa78d1669b)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: C:\msys64\mingw64\bin
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

OliverBr
Posts: 668
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Post by OliverBr » Fri Nov 13, 2020 10:37 pm

Dann Corbit wrote:
Fri Nov 13, 2020 9:58 pm
Some of us know how to make that lovely lady scream "BLOODY MURDER!" at the slightest provocation.
olithink.c:1474:83: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
if (!strncmp(buf, comreturn[_i], strlen(comreturn[_i]))) return i < 8 ? 0 : 6-i; return -1; }
Fixed it:
https://github.com/olithink/OliThink/co ... 5d44848a26
For more information, including the magical incantation, see the following:
https://drive.google.com/file/d/1krtXZO ... sp=sharing
Ah, more things to do...
A guess: Some "statics" will do a lot.

One warning, I actually do not understand (clang-tidy is pestering with this , too) is:

Code: Select all

olithink.c:42:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _ONMV(x) ((x) << 12)
How is _ONMV a reserved identifier?
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

Post Reply