Skippers sixty memorable bugs: bug 8

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

Moderator: Ras

op12no2
Posts: 560
Joined: Tue Feb 04, 2014 12:25 pm
Location: Gower, Wales
Full name: Colin Jenkins

Re: Skippers sixty memorable bugs: bug 8

Post by op12no2 »

Henk
Posts: 7261
Joined: Mon May 27, 2013 10:31 am

Re: Skippers sixty memorable bugs: bug 8

Post by Henk »

Fairy max played Qc2 but maybe I did not give it enough time.
op12no2
Posts: 560
Joined: Tue Feb 04, 2014 12:25 pm
Location: Gower, Wales
Full name: Colin Jenkins

Re: Skippers sixty memorable bugs: bug 8

Post by op12no2 »

The Javascript version of Stockfish 5 (unknown build) finds it at depth 10 so I'd guess you need to let FMax get at least that far.
Henk
Posts: 7261
Joined: Mon May 27, 2013 10:31 am

Re: Skippers sixty memorable bugs: bug 8

Post by Henk »

Fairy max can't find it at depth 11. It now plays Qb3. Just as stupid as Skipper.
Henk
Posts: 7261
Joined: Mon May 27, 2013 10:31 am

Re: Skippers sixty memorable bugs: bug 8

Post by Henk »

op12no2 wrote:The Javascript version of Stockfish 5 (unknown build) finds it at depth 10 so I'd guess you need to let FMax get at least that far.
Is it all written in JavaScript or does it only call a web service.
op12no2
Posts: 560
Joined: Tue Feb 04, 2014 12:25 pm
Location: Gower, Wales
Full name: Colin Jenkins

Re: Skippers sixty memorable bugs: bug 8

Post by op12no2 »

Is it all written in JavaScript or does it only call a web service.
It's 100% pure Javascript being downloaded, interpreted in real-time and run locally in your web browser :) (which is how Lozza works as well).

The generation of the Javascript is automated via some tools (see below) and the result is utter gloop to read. Apparently this has even been done for games like DOOM. The world is going Javascript based...

I didn't do the Stockfish conversion. It has been done by at least 3 separate people and I just chose one pretty much at random to add to the site after Norbert pointed me at them.

Example:-

https://github.com/skalee/stockfish-emscripten

Tools needed:-

https://kripken.github.io/emscripten-site/
http://clang.llvm.org/
http://asmjs.org/

After the auto conversion you just need to add a HTML5 Web Worker UCI harness by hand. which one can borrow from Lozza initially.
Last edited by op12no2 on Wed May 20, 2015 3:32 pm, edited 3 times in total.
Robert Pope
Posts: 572
Joined: Sat Mar 25, 2006 8:27 pm
Location: USA
Full name: Robert Pope

Re: Skippers sixty memorable bugs: bug 8

Post by Robert Pope »

Henk wrote:In this position Skipper plays Bd2 and thinks his position is worse -0.32. What do normal engines play here ? How smart is your engine ?


[d] r1bq1rk1/pppn1ppp/2n1p3/2PpP3/Pb1P4/2NB1N2/1P3PPP/R1BQK2R w KQ - 1 2

Code: Select all

Depth  Value   Time
  1  -4100.00   0.018         394   c1d2 
  2  -4500.00   0.028        1917   c1d2 a7a5 
  3  -4100.00   0.042        3624   c1d2 h7h5 h2h4 
  4  -4300.00   0.108       15478   h2h4 h7h6 c1d2 a7a5 
  5  -4100.00   0.257       39956   h2h4 h7h6 c1d2 a7a5 b2b3 
  6  -4100.00   0.563      101565   h2h4 h7h6 c1d2 a7a5 h4h5 d8e7 
  7  -4100.00   2.068      404468   h2h4 h7h6 c1d2 a7a6 b2b3 h6h5 d1e2 
  8  -3900.00   9.292     1816195   h2h4 h7h6 h4h5 d8e7 c1d2 a7a5 b2b3 g8h8 
  9  -3200.00   40.067     7705559   c1d2 h7h5 c3a2 a7a5 d2c3 d8e7 d3b5 b4c3 b2c3 
Abbess wants to castle, and thinks it is up a pawn. It only gets to depth 6 in a minute, though.
Henk
Posts: 7261
Joined: Mon May 27, 2013 10:31 am

Re: Skippers sixty memorable bugs: bug 8

Post by Henk »

op12no2 wrote:
Is it all written in JavaScript or does it only call a web service.
It's 100% pure Javascript being downloaded, interpreted in real-time and run locally in your web browser :) (which is how Lozza works as well).

The generation of the Javascript is automated via some tools (see below) and the result is utter gloop to read. Apparently this has even been done for games like DOOM. The world is going Javascript based...

I didn't do the Stockfish conversion. It has been done by at least 3 separate people and I just chose one pretty much at random to add to the site after Norbert pointed me at them.

Example:-

https://github.com/skalee/stockfish-emscripten

Tools needed:-

https://kripken.github.io/emscripten-site/
http://clang.llvm.org/
http://asmjs.org/

After the auto conversion you just need to add a HTML5 Web Worker UCI harness by hand. which one can borrow from Lozza initially.
I always thought JavaScript was much slower then C++. Have you tested how much of its speed is lost by converting it to JavaScript ?
op12no2
Posts: 560
Joined: Tue Feb 04, 2014 12:25 pm
Location: Gower, Wales
Full name: Colin Jenkins

Re: Skippers sixty memorable bugs: bug 8

Post by op12no2 »

Henk wrote:I always thought JavaScript was much slower then C++. Have you tested how much of its speed is lost by converting it to JavaScript ?
It is presently, but I think it will get better and better. Certainly Javascript is getting massive in the popularity stakes and there will be more demand on it performance wise as time goes by - I would think.

Take Google's V8 Javascript engine for example (in their Chrome browser) - when you run SF5 as per the link above your browser actually compiles it in real time to native machine code (not a VM) - but without fully optimising. Then when it starts running, it optimises in real-time based on how 'hot' functions are etc. In some ways this has more scope than a static optimisation.

Lozza uses a 1960s primitive mailbox move generator and yet achieved over 5M NPS doing perft on my old 'slow' machine - I do perft differently now using the real makeMove so I can't compare them. I get about 600k NPS in play.

Slower yes, but not slow...

The problems from a chess POV are no 64 bit integers (I occasionally beg the V8 developers for them) and things are a bit fluid about whether something is an integer or 'number' which is one of the things asm.js tries to resolve. Lozza's hash for example is 2 32 bit integers which is messy. I keep wondering if an additive 64 bit floating point hash would work..
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Skippers sixty memorable bugs: bug 8

Post by Evert »

Henk wrote:
Evert wrote:
Henk wrote:In a virtual world anything is possible. What's wrong with -1000. -1000 means -100 cps.
[d]r1bqkb1r/ppp1pppp/2np3n/4P3/3P4/5N1P/PPP2PP1/RNBQKB1R w KQkq - 1 2

You mean what's wrong with evaluating the above position as a pawn down for black? Other than black not being a pawn down?
Sorry mistake. I'm not used to thinking in centi pawns. It means 0.1 pawns = 10 cps
You have the value of a pawn set at 10000? Really?