Ajax Chess 3.0

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

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
gladius
Posts: 535
Joined: Tue Dec 12, 2006 9:10 am

Ajax Chess 3.0

Post by gladius » Thu Jul 01, 2010 1:09 am

http://forwardcoding.com/projects/ajaxchess/chess.html

It's slowly getting stronger :). Still lacking pawn evaluation though.

Changes:
- 604.5/1000 or ~70 ELO better than previous version
- Killer moves
- Tuned PSQ tables/mobility
- Better king eval in endgame (won't stay on back row)
- Show '#' for checkmate
- Improved UI (new game, switch black/white, choose time/move)
- Fixed crashes from using invalid hash moves
- Other small bug fixes
- Speed optimizations

IanO
Posts: 450
Joined: Wed Mar 08, 2006 8:45 pm
Location: Portland, OR
Contact:

Re: Ajax Chess 3.0

Post by IanO » Thu Jul 01, 2010 4:44 pm

Nice work! Some feedback:

Bug: when you start with computer playing white, the queens are on the wrong squares.

New game: FEN, which reads the FEN string below the board, would be a nice option for testing against particular positions.

gladius
Posts: 535
Joined: Tue Dec 12, 2006 9:10 am

Re: Ajax Chess 3.0

Post by gladius » Fri Jul 02, 2010 3:49 am

Whoops, thanks for the bug report :). I'll get that fixed for next version.

The FEN loading should be easy, should be able to get that in too.

tmokonen
Posts: 901
Joined: Sun Mar 12, 2006 5:46 pm
Location: Vancouver

Re: Ajax Chess 3.0

Post by tmokonen » Fri Jul 02, 2010 9:07 pm

I'm getting wildly varying speeds, depending on browser. From the opening position:

IE: approx 7,000 NPS
Mozilla: approx 8,000 NPS
Opera: approx 120,000 NPS
Chrome: approx 130,000 NPS

Is this normal?

Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 8:19 pm
Location: Oslo, Norway

Re: Ajax Chess 3.0

Post by Tord Romstad » Fri Jul 02, 2010 9:26 pm

tmokonen wrote:I'm getting wildly varying speeds, depending on browser. From the opening position:

IE: approx 7,000 NPS
Mozilla: approx 8,000 NPS
Opera: approx 120,000 NPS
Chrome: approx 130,000 NPS

Is this normal?
I get 155,000 N/s with Safari 5 on a 2.8 GHz i7.

This is a pretty impressive program. Thanks, Gary!

alpha123
Posts: 660
Joined: Sat Dec 05, 2009 4:13 am
Location: Colorado, USA

Re: Ajax Chess 3.0

Post by alpha123 » Fri Jul 02, 2010 9:33 pm

tmokonen wrote:I'm getting wildly varying speeds, depending on browser. From the opening position:

IE: approx 7,000 NPS
Mozilla: approx 8,000 NPS
Opera: approx 120,000 NPS
Chrome: approx 130,000 NPS

Is this normal?
Yeah. Different browsers have vastly different JS engines. IE's JScript totally sucks, a private development version of Chrome's V8 was allegedly half the speed of optimized C code. I'm surprised Mozilla only got 8,000 NPS; SpiderMonkey/TraceMonkey is usually quite efficient. And I'm also surprised Opera got 120,000 NPS, it doesn't seem that fast for me.

Here's a benchmark of the first version of Ajax Chess (with some slightly outdated browsers) that shows the huge difference in speed.

Peter

tmokonen
Posts: 901
Joined: Sun Mar 12, 2006 5:46 pm
Location: Vancouver

Re: Ajax Chess 3.0

Post by tmokonen » Fri Jul 02, 2010 9:43 pm

I was just surprised at the poor performance of Mozilla. It seemed odd to me that another browser would be 15 times faster. But looking at your numbers, I guess it's not such an oddity after all.

Nice job on the program, Gary. Amazing that a JavaScript based program can play a creditable game.

gladius
Posts: 535
Joined: Tue Dec 12, 2006 9:10 am

Re: Ajax Chess 3.0

Post by gladius » Sat Jul 03, 2010 5:24 am

Tord Romstad wrote:I get 155,000 N/s with Safari 5 on a 2.8 GHz i7.

This is a pretty impressive program. Thanks, Gary!
Glad you like it, as it is heavily inspired by Stockfish :). The pruning ideas are a very basic version of what is in Stockfish. I should add a thanks section to the page for this.

Great work on the Glaurung for iPhone as well, it's great fun to play against.

gladius
Posts: 535
Joined: Tue Dec 12, 2006 9:10 am

Re: Ajax Chess 3.0

Post by gladius » Sat Jul 03, 2010 5:26 am

alpha123 wrote:
tmokonen wrote:I'm getting wildly varying speeds, depending on browser. From the opening position:

IE: approx 7,000 NPS
Mozilla: approx 8,000 NPS
Opera: approx 120,000 NPS
Chrome: approx 130,000 NPS

Is this normal?
Yeah. Different browsers have vastly different JS engines. IE's JScript totally sucks, a private development version of Chrome's V8 was allegedly half the speed of optimized C code. I'm surprised Mozilla only got 8,000 NPS; SpiderMonkey/TraceMonkey is usually quite efficient. And I'm also surprised Opera got 120,000 NPS, it doesn't seem that fast for me.

Here's a benchmark of the first version of Ajax Chess (with some slightly outdated browsers) that shows the huge difference in speed.

Peter
I am also surprised Mozilla does so poorly. It may be that they don't optimize recursive functions, or maybe I'm falling down some bad code path for them. Too bad too, as if they were fast, with IE9 coming out, it would perform decently on all major browsers.

gladius
Posts: 535
Joined: Tue Dec 12, 2006 9:10 am

Re: Ajax Chess 3.0

Post by gladius » Sat Jul 03, 2010 5:29 am

tmokonen wrote:I was just surprised at the poor performance of Mozilla. It seemed odd to me that another browser would be 15 times faster. But looking at your numbers, I guess it's not such an oddity after all.

Nice job on the program, Gary. Amazing that a JavaScript based program can play a creditable game.
Thanks Tony! I find it's at a good strength right now. I can beat it occasionally, but not often. After adding some pawn evaluation, that may not last too much longer :).

And, I'm surprised Mozilla does poorly as well. The mysteries of Javascript :).

Post Reply