Bookbuilding 101

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Norm Pollock
Posts: 1017
Joined: Thu Mar 09, 2006 3:15 pm
Location: Long Island, NY, USA
Contact:

Re: Bookbuilding 101

Post by Norm Pollock » Tue Aug 14, 2012 3:20 am

Hi Dan,

Getting an error: "Could not find the main class: chess.Bookworm. Program will exit."

-Norm

User avatar
Dan Honeycutt
Posts: 5170
Joined: Mon Feb 27, 2006 3:31 pm
Location: Atlanta, Georgia

Re: Bookbuilding 101

Post by Dan Honeycutt » Tue Aug 14, 2012 1:04 pm

Norm Pollock wrote:Hi Dan,

Getting an error: "Could not find the main class: chess.Bookworm. Program will exit."

-Norm
Hi Norm,

Damn Java. Supposed to be run anywhere; it's more like run nowhere. Check your version of Java. You can do that by opening a command prompt (Start Menu then type cmd or command in the box) and entering:

java -version

Mine is 1.7.0_03. I think that you have to be caught up with me for things to work even if I'm not using features of the latest version.

Let me know what happens
Dan H.

Norm Pollock
Posts: 1017
Joined: Thu Mar 09, 2006 3:15 pm
Location: Long Island, NY, USA
Contact:

Re: Bookbuilding 101

Post by Norm Pollock » Tue Aug 14, 2012 2:27 pm

Dan,

I'm using 1.6.0_29.

I don't intend to switch to 1.7 for awhile. And it should be backward compatible. The issue may be something else. As a general rule when writing software, use the simplest version possible to avoid as many version conflicts as possible. My own tools are compiled with Java 1.4.

Btw, an alternative to extracting the suspicious games would be a listing of their game numbers (vertically in a text file). I could then use my tool "numExtract" to extract both the "good" games and the "suspicious" games.

Another issue in determining "suspicious" games are the games that do not have any legal moves, namely where there is a checkmate or stalemate. These games have to be checked separately.

-Norm

Norm Pollock
Posts: 1017
Joined: Thu Mar 09, 2006 3:15 pm
Location: Long Island, NY, USA
Contact:

Re: Bookbuilding 101

Post by Norm Pollock » Tue Aug 14, 2012 3:43 pm

Norm Pollock wrote: I don't intend to switch to 1.7 for awhile. And it should be backward compatible.
... provided new features are not used.

User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 2:27 pm

Re: Bookbuilding 101

Post by Don » Tue Aug 14, 2012 4:43 pm

Norm Pollock wrote:Dan,

I'm using 1.6.0_29.

I don't intend to switch to 1.7 for awhile. And it should be backward compatible. The issue may be something else. As a general rule when writing software, use the simplest version possible to avoid as many version conflicts as possible. My own tools are compiled with Java 1.4.
I built a simple tester in java that did not use any unusual libraries or constructs and when I fixed a bug and recompiled, it did not work anywhere else. It's just not compatible - so Larry and anyone else using it had to download and upgrade to 1.7 java to run it.

Btw, an alternative to extracting the suspicious games would be a listing of their game numbers (vertically in a text file). I could then use my tool "numExtract" to extract both the "good" games and the "suspicious" games.

Another issue in determining "suspicious" games are the games that do not have any legal moves, namely where there is a checkmate or stalemate. These games have to be checked separately.

-Norm
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.

User avatar
Dan Honeycutt
Posts: 5170
Joined: Mon Feb 27, 2006 3:31 pm
Location: Atlanta, Georgia

Re: Bookbuilding 101

Post by Dan Honeycutt » Tue Aug 14, 2012 4:56 pm

Norm Pollock wrote:Dan,

I'm using 1.6.0_29.

I don't intend to switch to 1.7 for awhile. And it should be backward compatible. The issue may be something else. As a general rule when writing software, use the simplest version possible to avoid as many version conflicts as possible. My own tools are compiled with Java 1.4.

Btw, an alternative to extracting the suspicious games would be a listing of their game numbers (vertically in a text file). I could then use my tool "numExtract" to extract both the "good" games and the "suspicious" games.

Another issue in determining "suspicious" games are the games that do not have any legal moves, namely where there is a checkmate or stalemate. These games have to be checked separately.

-Norm
Hi Norm,

Yes, 1.6 is the problem. I've got an older machine that is 1.6 and I get the same error. My laptop and my desktop, both 1.7 something, work fine.

I agree with you 100% about using the simplest version but my problem is I'm a relative Java dummy. I'm using Netbeans as my Ide and I've read there is a way to compile for 1.6 or earlier but I haven't found how to do that yet. But, sit tight and I'll look some more.

Right now, as I noted, it's just an added piece to my pgn check routine. That was the easiest way to do it quickly. With your feedback I hope to determine if this is something I want to incorporate as a permanent feature to my book utility. If so I'll then go the trouble of making a user interface where you can specify the win/draw margins and search time and I'll gather the output or send it to a file.

When you say "game number" I don't know what that is. Is it the ordinal position in the file or a tag or something else??

I already do checkmate and stalemate. I gather 3 results - the one in the tag-pairs, the one at the end of the moves and one from the engine in the case of no moves. If there are any discrepancies in those three that game is displayed as in error.

Best
Dan H.

Norm Pollock
Posts: 1017
Joined: Thu Mar 09, 2006 3:15 pm
Location: Long Island, NY, USA
Contact:

Re: Bookbuilding 101

Post by Norm Pollock » Tue Aug 14, 2012 5:47 pm

Hi Dan,

I mean the ordinal position of the game: 1st game is "1", 2nd game is "2", etc.

Sample content of file containing numbers of suspicious games:

5
12
321
432
1022

Getting back to Java. When I started my tools in 2006, I asked on this board if there was a way to make my java programs into Windows "exe". Jim Ablett set me up in a way I have been using since. The trouble is that version 3.4 of the "gcj" compiler only accepts up to Java 1.4 and it severely limits my use of commands. The output file size is 1M, which is large but ok. I could use a slightly more advanced version of "gcj" that uses up to Java 1.5, but then the file size becomes 4M or 8M.

Here is the site if you are interested:

http://www.thisiscool.com/gcc_mingw.htm

User avatar
Dan Honeycutt
Posts: 5170
Joined: Mon Feb 27, 2006 3:31 pm
Location: Atlanta, Georgia

Re: Bookbuilding 101

Post by Dan Honeycutt » Tue Aug 14, 2012 6:36 pm

Norm Pollock wrote:Hi Dan,

I mean the ordinal position of the game: 1st game is "1", 2nd game is "2", etc.

Sample content of file containing numbers of suspicious games:

5
12
321
432
1022

Getting back to Java. When I started my tools in 2006, I asked on this board if there was a way to make my java programs into Windows "exe". Jim Ablett set me up in a way I have been using since. The trouble is that version 3.4 of the "gcj" compiler only accepts up to Java 1.4 and it severely limits my use of commands. The output file size is 1M, which is large but ok. I could use a slightly more advanced version of "gcj" that uses up to Java 1.5, but then the file size becomes 4M or 8M.

Here is the site if you are interested:

http://www.thisiscool.com/gcc_mingw.htm
Hi Norm,

Well, I found where to change the compile version. Unfortunately, it failed miserably. Turns out I've got a lot of 1.7 stuff (that I never knew I had). The most pervasive is strings in switch statements which would be a pain to rewrite with "if" statements.

I'm aware of gcj but with a limit of 1.4 or 1.5 I expect I'd be even worse off.

Anyway, I'll keep my "suspicious result" patch and when you get around to 1.7 we can revisit it.

Best
Dan H.

CRoberson
Posts: 1999
Joined: Mon Mar 13, 2006 1:31 am
Location: North Carolina, USA
Contact:

Re: Bookbuilding 101

Post by CRoberson » Mon Aug 20, 2012 5:55 pm

Norm Pollock wrote:
jdart wrote:To save the output you need to redirect to a file, for example:

playchess2 input.pgn > output.pgn

--Jon
I did realize that. But what I am asking for is a way to capture the games that were excluded. Namely, the games that seem to have an incorrect result based on the evaluation of the final position.

-Norm
There is an easy solution to that on Unix and other systems. It is a tool called diff. It shows the difference in two files. So, do this

diff allgames.pgn goodgames.pgn > badgames.pgn

Versions of diff are free on most all OS's including windows.

User avatar
Jim Ablett
Posts: 1327
Joined: Fri Jul 14, 2006 5:56 am
Location: London, England
Contact:

Re: Bookbuilding 101

Post by Jim Ablett » Mon Aug 20, 2012 7:10 pm

Norm Pollock wrote:Hi Dan,

Getting an error: "Could not find the main class: chess.Bookworm. Program will exit."

-Norm
Try running the jar through Retrotranslator.

http://retrotranslator.sourceforge.net/

Command line to convert to java 1.4 would be >

Code: Select all

java -jar retrotranslator-transformer-1.2.9.jar -target 1.4 -srcjar bookworm.jar
Jim.

Post Reply