Author: Graham Laight
Date: 01:40:12 10/07/05
Go up one level in this thread
On October 06, 2005 at 18:06:03, Dann Corbit wrote:
>Here is the source:
{snip}
JavaScript in a web browser runs approximately 50x slower than Java, and 100x
slower than compiled C (assembly code will run faster still). Given that the
great stand-alone chess computers of the 1980s used to run at processor speeds
of 5-10 Mhz, a JavaScript program should be able to out-play these classic
machines.
One thing that could be done for this particular program: restricting the search
depth to 2 ply indicates that it was written when PCs were much slower than they
are now. At this time, the search depth could immediately be increased to 3 -
which would give the game's playing strength a huge boost. If JavaScript takes
more than 5 seconds to run, the browser will produce a warning message. Some
browsers (e.g. Firefox) allow you to configure how long JavaScript programs may
run for before a warning is triggered. However - 5 seconds should still be
enough for a JavaScript program to give most of us a good challenge (especially
those of us who are unable to beat the classic stand-alone chess computers of
the 1980s).
In general, when available, Javascript programs are the best: as soon as the web
page is loaded, the program is up and running - no messing about, no downloads -
page loaded, go! When I search for programs to accomplish a particular task
(e.g. Simplex optimiser, Diophantine solver, Binomial/Bayesian probability etc),
I ALWAYS search with the word "javascript" first to maximise my chances of
getting to a fuss-free web page. The games on my personal website are all
written in JavaScript.
There is also a good Java program at http://www.ludochess.com/ , which is almost
as fuss-free as a JavaScript program (one has to wait for the Java applet to
download - but that doesn't take long with a broadband internet connection).
-g
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.