Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Computer programs and java

Author: Peter Kappler

Date: 22:11:46 04/21/99

Go up one level in this thread


On April 20, 1999 at 14:05:32, James Robertson wrote:

>On April 20, 1999 at 13:39:27, Peter Kappler wrote:
>
>>On April 20, 1999 at 11:46:39, Christophe Theron wrote:
>>
>>>On April 20, 1999 at 01:16:38, moag wrote:
>>>
>>>>Does anyone know the answer to this-- Is it possible to connect a program
>>>>directly into the java at a chess site? I play on the internet and i suspect
>>>>players of doing just that. I do not need to know how, as I am not attempting to
>>>>do this myself, I would just like to know if its possible. Thanks
>>>
>>>I don't know if this answers your question, but there is a french program,
>>>called "Jester" or "Lady Jester", which is entirely programmed in Java!
>>>
>>
>>"Grok" is also written entirely in Java.  It plays on the ICC.
>>
>>--Peter
>
>It doesn't play badly at all. Is it compiled, interpreted, or what? Does it use
>bitboards?
>
>James

(Actually it's been playing very badly recently, thanks to a nasty search bug.)

Grok isn't fully interpreted, nor is it fully compiled.  It uses a JIT
("Just-In-Time") compiler.  Rather than fumble through an explanation of this
technology, I clipped a tidbit from the Microsoft web site:

------------------------------------------------------------------------------
The standard model of a virtual machine continually interprets a sequence of
bytecodes that describe the intent of a Java applet or application. Each time
the VM encounters a bytecode, whether it has interpreted it many times before or
not, there is a (relatively) lengthy translation process. Even though various
approaches exist for speeding up this approach somewhat, this interpretation
process accounts for significantly slower execution performance compared to
equivalent compiled native code.

To improve this performance, JIT compilers interact with the VM and compile
appropriate bytecode sequences into an equivalent piece of native machine code.
This process occurs at run time (that is, as the particular piece of code is
going to be executed) rather than at compile time, as is traditionally the case
with compiled languages such as C and C++. Rather than interpret the same
bytecodes repeatedly, the hardware (the CPU) can run ("interpret") the native
code. This can allow quite dramatic performance gains in the execution speed.
There is, however, a tradeoff.

The time that the JIT compiler takes to compile the bytecodes is added to the
overall execution time. For example, when a method executes only once and does
not contain any loops, the overall performance might be reduced when JIT
compilation occurs.
------------------------------------------------------------------------------

The question everybody asks is how big a performance hit a Java chess program
takes.  I'm not entire sure, but my guess is ~50%.

As for your other question, Grok only uses Bitboards for pawn structure
analysis, but I might eventually try to build a bitboard-based move generator.

--Peter




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.