My new engine - KhepriChess (Typescript/Javascript)

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

Moderator: Ras

KhepriChess
Posts: 93
Joined: Sun Aug 08, 2021 9:14 pm
Full name: Kurt Peters

Re: My new engine - KhepriChess (Typescript/Javascript)

Post by KhepriChess »

Carlos777 wrote: Thu Aug 12, 2021 4:15 pm I tried with the uci file first, but without success, then I used the other file without the -fUCI command, same thing. Maybe, it needs the last node version, I'll check it out.
The latest version of node wouldn't hurt. I'm using 14.15.5. If you do continue to have issues let me know (maybe in a PM)? I've been running it from both Arena and Cute Chess without issues, but I'd really like to know if other people run into problems.
Gabor Szots wrote: Thu Aug 12, 2021 4:31 pm A laic's question: Does it mean it is BBC translated to JavaScript or that it has BBC backbone with original evaluation and search?
Mostly just a backbone. Some of the earlier stuff is probably closer to a translation (excluding some things that you just can't translate from C to JS) since I had no clue what I was doing and was just following along his tutorials. But as I went along, I started to understand the concepts and was able to start implementing stuff my own way. Search and evaluation is where I tried to be much more independent in my implementations, though you still might see some similarities (the PV table being a particular one, though I have it on my list of things-to-do of looking into alternatives).
Gabor Szots wrote: Thu Aug 12, 2021 5:25 pm Kurt, will you please tell your country?

And a suggestion in case this is not the last version: somehow indicate in the filename which version it is. I could see it was 0.5.0 only after running it from the command line but e.g. under Arena it does not introduce itself.
USA
Puffin: Github
KhepriChess: Github
User avatar
towforce
Posts: 12700
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

Re: My new engine - KhepriChess (Typescript/Javascript)

Post by towforce »

Something's not right - KhepriChess beat me! :evil:

As to how to enable it to be tested: I don't know exactly how this will work with multiple files, but a couple of ideas:

1. Many OSes can run JavaScript natively. For example, Windows can run JavaScript under the Windows host (link). So if Winboard cannot run it under Node, maybe it can run the host as the executable instead?

2. There are undoubtedly ways to compile JavaScript into an executable
Human chess is partly about tactics and strategy, but mostly about memory
KhepriChess
Posts: 93
Joined: Sun Aug 08, 2021 9:14 pm
Full name: Kurt Peters

Re: My new engine - KhepriChess (Typescript/Javascript)

Post by KhepriChess »

towforce wrote: Fri Aug 13, 2021 12:19 am Something's not right - KhepriChess beat me! :evil:

As to how to enable it to be tested: I don't know exactly how this will work with multiple files, but a couple of ideas:

1. Many OSes can run JavaScript natively. For example, Windows can run JavaScript under the Windows host (link). So if Winboard cannot run it under Node, maybe it can run the host as the executable instead?

2. There are undoubtedly ways to compile JavaScript into an executable
I think we got Carlos' issue resolved!

And yes, there's a node package to do exactly that. I did try that, but I swear it had worse performance when running from a packaged executable.
Puffin: Github
KhepriChess: Github
Carlos777
Posts: 1977
Joined: Sun Dec 13, 2009 6:09 pm

Re: My new engine - KhepriChess (Typescript/Javascript)

Post by Carlos777 »

KhepriChess wrote: Fri Aug 13, 2021 12:30 am I think we got Carlos' issue resolved!
Yes, I can confirm this. Thanks Kurt.
User avatar
maksimKorzh
Posts: 775
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: My new engine - KhepriChess (Typescript/Javascript)

Post by maksimKorzh »

Hi Kurt!

Wow! So many feedbacks already!
I'm so happy you've finally became the part of this community!
I swear here you can find much more insights and get a deeper help as opposed to my channel)
KhepriChess
Posts: 93
Joined: Sun Aug 08, 2021 9:14 pm
Full name: Kurt Peters

Re: My new engine - KhepriChess (Typescript/Javascript)

Post by KhepriChess »

Well, I've been sitting on an update for months now (for no particular reason, other than I needed a break) but I've finally gotten back into things and released version 2 of my engine.

It's a full rewrite using what I've learned, both to improve code readability and to actually test features prior to their inclusion. Some things were cut (razoring still doesn't seem to give any benefit, no matter what I seem to do) and a few new ones were added. I really wish I could get a gain from mobility, but it seems like counting bits is way too slow (thanks to JS not having a CPU instruction to do a bit count for bigints).

Overall, I was a little disappointed in the results. In testing new features, sometimes some would show pretty large gains (pawn hash table was like a 100 point difference again the non-pawn hash table version). But then when I tested it against the previous released version, the overall gain was pretty minimal.
Puffin: Github
KhepriChess: Github