Page 1 of 5
OliThink 5.9.5 is very small
Posted: Tue May 18, 2021 11:54 pm
by OliverBr
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.
Re: OliThink 5.9.5 is very small
Posted: Wed May 19, 2021 3:01 am
by Dann Corbit
I made a version with variable sized hash tables:
I kept the power of 2 thing, but allowed whatever fits within the request:
memory N
where N is megabytes.
Re: OliThink 5.9.5 is very small
Posted: Thu May 20, 2021 10:23 pm
by OliverBr
Thank you very much, Dann!
May I use your code within the next version of OliThink, with some changes?
Re: OliThink 5.9.5 is very small
Posted: Sat May 22, 2021 10:35 am
by Dann Corbit
OliverBr wrote: ↑Thu May 20, 2021 10: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.
Re: OliThink 5.9.5 is very small
Posted: Sat May 22, 2021 10:55 am
by Werner
Dann Corbit wrote: ↑Wed May 19, 2021 3:01 am
I made a version with variable sized hash tables:
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
Re: OliThink 5.9.5 is very small
Posted: Sat May 22, 2021 11:56 am
by Archimedes
OliverBr wrote: ↑Tue May 18, 2021 11: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
Re: OliThink 5.9.5 is very small
Posted: Sat May 22, 2021 3:41 pm
by Ras
Dann Corbit wrote: ↑Wed May 19, 2021 3:01 amI 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.
Re: OliThink 5.9.5 is very small
Posted: Sat May 22, 2021 9:44 pm
by Dann Corbit
Amazing that I can generate so many bugs with about ten new lines of code.
Re: OliThink 5.9.5 is very small
Posted: Sun May 23, 2021 11:15 pm
by OliverBr
Dann Corbit wrote: ↑Sat May 22, 2021 10: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:
What exactly is the purpose of those "4 Mbyte extra"?
Re: OliThink 5.9.5 is very small
Posted: Sun May 23, 2021 11:25 pm
by OliverBr
Ras wrote: ↑Sat May 22, 2021 3: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.