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.
supersharp77
Posts: 1094
Joined: Sat Jul 05, 2014 5:54 am
Location: Southwest USA

Re: OliThink 5.9.5 is very small

Post by supersharp77 » Sun May 23, 2021 9:48 pm

OliverBr wrote:
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.
I think this little exe is popcnt only.....it crashed right away in windows 10 x64 npopcnt.... :) :wink:

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 10:08 pm

supersharp77 wrote:
Sun May 23, 2021 9:48 pm
I think this little exe is popcnt only.....it crashed right away in windows 10 x64 npopcnt.... :) :wink:
You are talking about the OliThink Windows executable? Yes, the one on my homepage is popcnt only. I am surprised there are cpus running without popcnt out there...
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

supersharp77
Posts: 1094
Joined: Sat Jul 05, 2014 5:54 am
Location: Southwest USA

Re: OliThink 5.9.5 is very small

Post by supersharp77 » Mon May 24, 2021 12:51 am

OliverBr wrote:
Sun May 23, 2021 10:08 pm
supersharp77 wrote:
Sun May 23, 2021 9:48 pm
I think this little exe is popcnt only.....it crashed right away in windows 10 x64 npopcnt.... :) :wink:
You are talking about the OliThink Windows executable? Yes, the one on my homepage is popcnt only. I am surprised there are cpus running without popcnt out there...
Yeah of course because others have been putting out Olithink compiles for years all over the net..Java..exes you name it..
lots of those compiles have bugs it seems..The java compiles just stop working in some GUI's..
some don't work at all... :) :wink:

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 » Mon May 24, 2021 2:36 am

OliverBr wrote:
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"?
I guess HGM can explain. I have no idea.
Especially since 1024 is a power of 2 and 1028 is not.
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.

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 » Mon May 24, 2021 8:44 am

OliverBr wrote:
Sun May 23, 2021 9:25 pm
The import of stdlib.h is a little annoying. Another extra line
I'd draw a line where minimalism impacts robustness. For example, I'd also add error handling for calloc() and try half the allocation of the previous attempt if it returns NULL, or exit if even the minimum allocation (e.g. 1 MB) fails.
Rasmus Althoff
https://www.ct800.net

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 » Mon May 24, 2021 9:01 am

Ras wrote:
Mon May 24, 2021 8:44 am
I'd draw a line where minimalism impacts robustness. For example, I'd also add error handling for calloc() and try half the allocation of the previous attempt if it returns NULL, or exit if even the minimum allocation (e.g. 1 MB) fails.
Of course you have a point about this.

But I have another issue: When the memory is dynamically allocated, the version loses a couple of ELOs. This is a simple performance issue, it's somewhat slower even though it's hardy measurable.

I have this issue, too, when combining "generateNoisy" and "generateQuite" into one method, which is elegant, but loses even more ELO points.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

User avatar
mvanthoor
Posts: 1283
Joined: Wed Jul 03, 2019 2:42 pm
Location: Netherlands
Full name: Marcel Vanthoor
Contact:

Re: OliThink 5.9.5 is very small

Post by mvanthoor » Mon May 24, 2021 10:27 am

OliverBr wrote:
Sun May 23, 2021 10:08 pm
You are talking about the OliThink Windows executable? Yes, the one on my homepage is popcnt only. I am surprised there are cpus running without popcnt out there...
Indeed. POPCNT was introduced in 2008, so you'd need to be running a Core2Duo or Core2Quad or even older CPU to not have it. (I don't know on top of my head when AMD introduced this instruction.)

I can only think of a few reasons why you'd run a CPU without POPCNT:
- For retro-purposes
- If you _really_ don't have any money to get a second hand computer built after 2008. (I've seen computers built in 2016 been given away for free, or for a token price such as €25.)

I still have an old Core2Duo laptop lying around to see if non-POPCNT compiles actually start. I provide a 32-bit generic compile, but I just test that on my normal computer. If it starts, I'm fine with it. If it's going to give me problems in the future, I'll drop it. It isn't even extensively tested, as it's about half the speed of the 64-bit compile.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL

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 » Mon May 24, 2021 8:48 pm

OliverBr wrote:
Mon May 24, 2021 9:01 am
Ras wrote:
Mon May 24, 2021 8:44 am
I'd draw a line where minimalism impacts robustness. For example, I'd also add error handling for calloc() and try half the allocation of the previous attempt if it returns NULL, or exit if even the minimum allocation (e.g. 1 MB) fails.
Of course you have a point about this.

But I have another issue: When the memory is dynamically allocated, the version loses a couple of ELOs. This is a simple performance issue, it's somewhat slower even though it's hardy measurable.

I have this issue, too, when combining "generateNoisy" and "generateQuite" into one method, which is elegant, but loses even more ELO points.
I think the bigger hash is important because SMP is just around the corner. And when Olithink has SMP, a small hash table will fill up in a heartbeat on big hardware.
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.

supersharp77
Posts: 1094
Joined: Sat Jul 05, 2014 5:54 am
Location: Southwest USA

Re: OliThink 5.9.5 is very small

Post by supersharp77 » Mon May 24, 2021 11:37 pm

mvanthoor wrote:
Mon May 24, 2021 10:27 am
OliverBr wrote:
Sun May 23, 2021 10:08 pm

I can only think of a few reasons why you'd run a CPU without POPCNT:
- For retro-purposes
- If you _really_ don't have any money to get a second hand computer built after 2008. (I've seen computers built in 2016 been given away for free, or for a token price such as €25.)

Oh..really Free Computers Given Awaqy in Amsterdam? Wheres That at for these circa 2016 Laptops for sale or given away for 25 Euros? Your got any links for these "sales"? You can't blow Smoke for Free in USA Hash Houses..Sorry Mate... :) :wink:

User avatar
mvanthoor
Posts: 1283
Joined: Wed Jul 03, 2019 2:42 pm
Location: Netherlands
Full name: Marcel Vanthoor
Contact:

Re: OliThink 5.9.5 is very small

Post by mvanthoor » Tue May 25, 2021 8:13 am

supersharp77 wrote:
Mon May 24, 2021 11:37 pm
Oh..really Free Computers Given Awaqy in Amsterdam? Wheres That at for these circa 2016 Laptops for sale or given away for 25 Euros? Your got any links for these "sales"? You can't blow Smoke for Free in USA Hash Houses..Sorry Mate... :) :wink:
Here you go for desktops

And laptops

Lots of stuff for free, somewhere in the range of €25-100, or price negotiable. Some hardware is really old, but some of the hardware is newer, low-end stuff that does have the necessary functionality. You still won't get a monster computer, but it'll at least be 5-7 years newer than a Core2Duo-era machine. There are more sites beside this one.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL

Post Reply