OliThink 5.9.5 is very small

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.
OliverBr
Posts: 691
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

OliThink 5.9.5 is very small

Post by OliverBr » Tue May 18, 2021 9:54 pm

OliThink 5.9.5 has only 44 kByte or 1500 lines of code.

It's even smaller than its predecessor OliThink4, which is very compact.
The mobility evaluation is very small. There are no pre-computed or texelian numbers.
Still there are quite a couple of bugs in search and pruning.

OliThink supports MacOSX, Linux and Windows and there is a 1:1 translation into Java.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

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

Re: OliThink 5.9.5 is very small

Post by Dann Corbit » Wed May 19, 2021 1:01 am

I made a version with variable sized hash tables:
https://drive.google.com/file/d/1tngP5U ... sp=sharing

I kept the power of 2 thing, but allowed whatever fits within the request:
memory N
where N is megabytes.
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: 691
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Re: OliThink 5.9.5 is very small

Post by OliverBr » Thu May 20, 2021 8:23 pm

Thank you very much, Dann!

May I use your code within the next version of OliThink, with some changes?
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

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

Re: OliThink 5.9.5 is very small

Post by Dann Corbit » Sat May 22, 2021 8:35 am

OliverBr wrote:
Thu May 20, 2021 8:23 pm
Thank you very much, Dann!

May I use your code within the next version of OliThink, with some changes?
Of course, any changes I make you can use without asking permission. IOW, you have my implicit permission to use any tweaks I ever make to Olithink.
I looked at the code, and I think I left out initialization of the last hash element. So that's a bug.
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.

User avatar
Werner
Posts: 2655
Joined: Wed Mar 08, 2006 9:09 pm

Re: OliThink 5.9.5 is very small

Post by Werner » Sat May 22, 2021 8:55 am

Dann Corbit wrote:
Wed May 19, 2021 1:01 am
I made a version with variable sized hash tables:
https://drive.google.com/file/d/1tngP5U ... sp=sharing

I kept the power of 2 thing, but allowed whatever fits within the request:
memory N
where N is megabytes.
Hi Dann,
how to use inside Arena=
commandline parameter Memory 256 does not work here ?
or
startcommand Memory 256 does not work here ?
thanks
Werner

Archimedes
Posts: 72
Joined: Tue Mar 05, 2019 2:43 pm
Full name: Archimedes

Re: OliThink 5.9.5 is very small

Post by Archimedes » Sat May 22, 2021 9:56 am

OliverBr wrote:
Tue May 18, 2021 9:54 pm
OliThink supports MacOSX, Linux and Windows and there is a 1:1 translation into Java.
It also works on Android (tested with Chess for Android).

OliThink 5.9.5 for Android:
https://app.box.com/s/ga6nnh7fxw01mg7hxuqe3ixv9ivgy0zs

Ras
Posts: 2032
Joined: Tue Aug 30, 2016 6:19 pm
Full name: Rasmus Althoff
Contact:

Re: OliThink 5.9.5 is very small

Post by Ras » Sat May 22, 2021 1:41 pm

Dann Corbit wrote:
Wed May 19, 2021 1:01 am
I made a version with variable sized hash tables:
But memory=1 is missing in the feature announcent in line 1529 so that this will not be used. From http://hgm.nubati.net/CECP.html:
memory N
Specifies the engine can use at most N megabytes of memory. Only sent when the engine requested it through feature memory=1, and never during a game.

Also, stdlib.h should be included to use calloc() (in which case the integer variable random needs to be renamed), and the scanf() in line 1552 is using the wrong format string for the type size_t of the variable wanted.
Rasmus Althoff
https://www.ct800.net

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

Re: OliThink 5.9.5 is very small

Post by Dann Corbit » Sat May 22, 2021 7:44 pm

Amazing that I can generate so many bugs with about ten new lines of code.
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: 691
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Re: OliThink 5.9.5 is very small

Post by OliverBr » Sun May 23, 2021 9:15 pm

Dann Corbit wrote:
Sat May 22, 2021 8:35 am
Of course, any changes I make you can use without asking permission. IOW, you have my implicit permission to use any tweaks I ever make to Olithink.
I am implementing now your code and there is something I don't understand:
Using xboard I configured 1024 MB Hashsize, but xboard sends the following string to the engine:

Code: Select all

memory 1028
What exactly is the purpose of those "4 Mbyte extra"?
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

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

Re: OliThink 5.9.5 is very small

Post by OliverBr » Sun May 23, 2021 9:25 pm

Ras wrote:
Sat May 22, 2021 1:41 pm
But memory=1 is missing in the feature announcent in line 1529 so that this will not be used. From http://hgm.nubati.net/CECP.html:
memory N
Specifies the engine can use at most N megabytes of memory. Only sent when the engine requested it through feature memory=1, and never during a game.

Also, stdlib.h should be included to use calloc() (in which case the integer variable random needs to be renamed), and the scanf() in line 1552 is using the wrong format string for the type size_t of the variable wanted.
That's right.
The import of stdlib.h is a little annoying. Another extra line and I can't use "random" anymore, of course. I had to rename it.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

Post Reply