Live data from Hacker News

Asm.js Chess Battle

dev.windows.com

31–39 of 39 posts

Re: Asm.js Chess Battle

#31
post #9

So does this mean that asm.js is good for longer operations? Because I tried reducing the think time and the engine lost.

That doesn't mean anything, asm.js only increases the amount of positions searched. If it searched more positions and still lost it means it either searched the same depth on average (which means the extra computational power did not finish a deeper search) or it just happened to lose despite it. See if it's searching more positions on average.

Re: Asm.js Chess Battle

#35

At high level chess (which this is), white has a significant advantage over black. Always picking asm.js as white (and not providing a setting to change it) is a bit disingenuous.

It looks like very poor chess to me. 1.Nf3 Nf6 2.e4?? Nxe4 at 1000ms...

Re: Asm.js Chess Battle

#36

Interesting. I slowed a game down to 1000ms per move so I could realistically follow what was going on. The game started 1.Nf3 Nf6 2.e4? So White sacrifices (loses?) a pawn for no compensation on move 2. Not really sure what this says in respect of the experiment in general, but it does smell a little. Also; Showing the dark squares would be a massive usability advance! And it would be nice if they respected some sim…

It's almost certainly playing out of an opening book. There is a move history, but you have to expand it.

I'd say the exact opposite is true. With an opening book, both would play a much stronger opening.

Without one, they have only a second to come up with an opening, so it's no surprise if the result is weird.

Re: Asm.js Chess Battle

#37
post #17

The code they are benchmarking is written in C, then compiled to asm.js (presumably with Emscripten). In one version, they remove the "use asm" header, but the code appears identical. That seems like a strange test. They aren't testing JS against ASM, or even compiled-to-vanilla-JS vs compiled-to-ASM. Both versions are compiled to ASM (complete with all strange annotations like num|0), only one has the asm optimizati…

> I don't know enough about asm to know if their annotations are slower than vanilla JS in unoptimized engines, but I suspect they might be. The opposite is true, for the most part. JS engines, even without asm.js optimizations, utilize the fact that the | operator emits a 32-bit integer (per the JS semantics), so it helps their type inference. (The engine needs to be good enough to get rid of the actual 0 value in t…

[deleted]

Re: Asm.js Chess Battle

#38

At high level chess (which this is), white has a significant advantage over black. Always picking asm.js as white (and not providing a setting to change it) is a bit disingenuous.

They seem to be horribly bad to me. Constant obvious miss play sacrificing pieces at random from time to time.
Post reply on HN