JavaScript port of Sjeng

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

Moderators: hgm, Rebel, chrisw

Gian-Carlo Pascutto
Posts: 1243
Joined: Sat Dec 13, 2008 7:00 pm

Re: JavaScript port of Sjeng

Post by Gian-Carlo Pascutto »

Maybe one can parallelize the JavaScript with Web Workers.
uaf
Posts: 98
Joined: Sat Jul 31, 2010 8:48 pm
Full name: Ubaldo Andrea Farina

Re: JavaScript port of Sjeng

Post by uaf »

:lol:
User avatar
Werner
Posts: 2871
Joined: Wed Mar 08, 2006 10:09 pm
Location: Germany
Full name: Werner Schüle

Re: JavaScript port of Sjeng

Post by Werner »

Gian-Carlo Pascutto wrote:Maybe one can parallelize the JavaScript with Web Workers.
Ok, I will never ask so "silly" questions!
Werner
Shaun
Posts: 322
Joined: Wed Mar 08, 2006 9:55 pm
Location: Brighton - UK

Re: JavaScript port of Sjeng

Post by Shaun »

If you don't want to sell 'Sjeng ct 2010' how about a donation to charity?

However a new commercial offering would be 'MOST' welcome

Shaun
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: JavaScript port of Sjeng

Post by mcostalba »

Gian-Carlo Pascutto wrote:
yanquis1972 wrote:very pretty interface, what version of sjeng is this?
Sjeng 11.2, it seems.
After googling for some sensible script content:

Code: Select all

GCP: this is straigth from Faile but converted to Sjeng internals
I've found this:

http://www.opensource.apple.com/source/ ... 0.3/sjeng/
Gian-Carlo Pascutto
Posts: 1243
Joined: Sat Dec 13, 2008 7:00 pm

Re: JavaScript port of Sjeng

Post by Gian-Carlo Pascutto »

Yes, Chess.App on every Mac has been using Sjeng for a long time. You can easily check if it you have a Mac by looking in the About menu.
gladius
Posts: 568
Joined: Tue Dec 12, 2006 10:10 am
Full name: Gary Linscott

Re: JavaScript port of Sjeng

Post by gladius »

You joke about the webworkers, but I've considered doing that with GarboChess JS :). Currently they are just used to allow long thinking times without blocking the UI though.

Any idea what NPS the Sjeng JS implementation is getting?
Gian-Carlo Pascutto
Posts: 1243
Joined: Sat Dec 13, 2008 7:00 pm

Re: JavaScript port of Sjeng

Post by Gian-Carlo Pascutto »

Do you actually get real multithreading with Web Workers or are they just emulated in the single JavaScript thread?

As for NPS: that's very browser dependent, of course. Firefox 4 and Chrome should give the best results.
gladius
Posts: 568
Joined: Tue Dec 12, 2006 10:10 am
Full name: Gary Linscott

Re: JavaScript port of Sjeng

Post by gladius »

They are real threads, and have a decent cross-thread communication mechanism as well.

I've optimized on Chrome, so it's the best for me currently. Around 100k nps, with a very basic mobility eval. Of course nps doesn't mean a whole lot, but it's pretty cool that javascript can go that fast!
alpha123
Posts: 660
Joined: Sat Dec 05, 2009 5:13 am
Location: Colorado, USA

Re: JavaScript port of Sjeng

Post by alpha123 »

Gian-Carlo Pascutto wrote:Do you actually get real multithreading with Web Workers or are they just emulated in the single JavaScript thread?

As for NPS: that's very browser dependent, of course. Firefox 4 and Chrome should give the best results.
According to MDN they are real OS-level threads, and section 1.2.6 of the spec seems to suggest that.

Opera's JavaScript engine is at least as fast as FF4.

Peter