Chessmaster 11 - Add Stockfish or other UCI engines

Another-Life

Hello, I reinstalled my Chessmaster 11 and updated it to 1.2

I saw you can import Winboard engines but the better ones are UCI. After searching I found the answer in a post on the official forum, so I decided to make a comprehensive post here because there is no way non-experienced users could figure it out without full info and links.

 

I added the Stockfish engine like this:

 

1) Create a new folder and unzip the Stockfish 7 binaries there, get it from the official page of course. Also unzip the polyglot tool in the same folder, get it here:

http://www.geenvis.net/pg.html

 

2) Now create a polyglot.ini and paste this text in there:

https://github.com/exoticorn/stockfish-js/blob/master/polyglot.ini

 

Only change EngineCommand, set it to the name of the executable you want to use. I wanted to avoid having spaces in the name, so I renamed the 32bit Stockfish file to  stockfish732bit.exe, so in my ini I have:

EngineCommand = ./stockfish732bit

(I amm on a 32bit system, so I didn't use the x64 versions)

 

3) Now in Chessmaster 11 go to Game->Import Winboard engine and a window comes up.

Put in some name, for example "Stockfish 7"

For the engine filename browse to the polyglot.exe, so you have the full path there. For example c:\stuff\chess\stockfish\polyglot.exe   (I avoid spaces in the folder names)

In the command line parameters, put the full path to the polyglot.ini,  example:

example c:\stuff\chess\stockfish\polyglot.ini

BUT PUT A COUPLE OF SPACES AT THE END!!! (after ....polyglot.ini put a couple of spaces!)

 

I suggest you enable Pondering to allow the engine to think on the opponent's time, it's optional. I am not sure if the opening book option will work, I did not enable it. The endgame option will absolutely not work I think, it is in a special format, unique to Chessmaster's engine ("The King 3.5")

 

That's it, you can play against the engine or set up Chessmaster to play against it. Do NOT try to edit the personality, you may screw it up and then it will be the Chessmaster engine playing, not the one you imported.  If you need to edit something, go over Step 3 again, use the same name and CM 11 will ask to overwrite it.

 

I had Stockfish 7 play against the Grandmaster personality and it won all 3 matches. They were close, in the endgame they had the same pieces +- a pawn.  But I guess the position was better and Stockfish could threaten with promoting and exchange favourably. The time controls were 5min/3sec.

 

Another way to make sure the actual engine is used (and not the CM 11 engine) and that you didn't screw something up, is to use a process manager and see if there are the processes polyglot.exe and stockfish32.exe running (and eating up CPU time when thinking, heh, on my dualcore stockfish eats 50%, so I guess it's singlethreaded only)

EscherehcsE

I laid out a similar procedure for my Chessmaster 10th Edition a while back, but the post is buried where probably nobody would think to look for it. It's in Post #77 in this thread:

https://www.chess.com/forum/view/chess-equipment/chessmaster-biggest-load-of-crap-ever?page=4

 

You might be interested in Alex Guerrero's "Polyglot GUI" utility (link at the bottom of Post #77). It just makes it a bit easier to construct the Polyglot.ini file.

Another-Life

Cool. It is important to note the bug in CM 11 with the commandline needeing spaces at the end, though. I also found out that newer Stockfish versions don't support opening books, so I was right not to enable that stuff.

 

I changed my ini to make it more balanced with time management, to use both my cores and to disable pondering (hey, no CPU stealing for you!), these changes:

Threads = 2

Ponder = false

Slow Mover = 84

 

Then I readded it in CM 11 with pondering disabled and had it play against Chessmaster (I have already set the CM engine to High resource usage in the options), Stockfish 7 won again, more handily this time. (Crushing at move 37)

 

premio53

Does it allow Stockfish to analyze games also?  If so the "natural language advice" feature will allow anyone to see exactly how Stockfish is thinking as to strategy and the reason for the moves.  When I get the time I will investigate this and try to get it to work.

EscherehcsE

I didn't like how Stockfish 7 would occasionally allow three-position-rep draws, so I changed the contempt setting from 0 to +25. That change seems to help.

 

Also, Stockfish 7 would sometimes lose a game on time. Changing the Move Overhead setting from 30 to a larger value, like 300, seems to work for me.

 

At least in CM10, the "Polygloted" engines can use the CM opening books.

 

Regarding tablebases, I don't know whether the "Polygloted" engines can use the CM tablebase files. (I do know that the CM tablebase files will only work in the CM GUI.) However, In the Shredder Polyglot.ini file, I specified use of the Nalimov tablebases and the Shredder bitbases, and Shredder does seem to be using at least one, if not both of them. (Of course, the CM GUI doesn't display any information about the non-CM tablebases.)

HGMuller

I think the CM tablebases are only used by the CM engine (The King). Engines are in control of using their own tablebases, so if the polyglot.ini file sets Stockfish' options for them correctly, (I think Stockfish uses Syzygy EGT), Stockfish would use them fine no matter what GUI it runs under.

Note that Polyglot can support an opening book on behalf of any UCI engine; you just have to set the corresponding options in the [Polyglot] section of the polyglot.ini file. The opening book must have Polyglot format.

EscherehcsE
premio53 wrote:

Does it allow Stockfish to analyze games also?  If so the "natural language advice" feature will allow anyone to see exactly how Stockfish is thinking as to strategy and the reason for the moves.  When I get the time I will investigate this and try to get it to work.

In my experience with CM10, CM defaults to using the CM engine (The King) for analysis. You can specify an imported engine for analysis use, but you have to change an ini file. There's a user ini file located in the "Data\Users\[User name]\" folder. For example, if your CM account name is "Bob", then you'd look for the "C:\Program Files (x86)\Ubisoft\Chessmaster 10th Edition\Data\Users\Bob\Bob.ini" file. In that ini file, there's a [mentor] section. In that [mentor] section, you'd have to add a line:

personality=Stockfish7

(That is, assuming that Stockfish7 is the name of your imported engine. Note that there is no file extension in the personality name.)

However, while you can use an imported engine for auto analysis, the bad news is that the mentor analysis lines will not work. So you can use an imported engine for auto analysis, but not manual analysis.

Another-Life

From what I understand Stockfish 7 doesn't support opening book or EGTB itself. Maybe it will work through the GUI or the polyglot proxy but I don't want to test that. It is more than powerful as-is 

 

I imported the ProDeo 1.88 engine, it is the descendant of the Rebel engine and is available for free here:

http://www.top-5000.nl/prodeo188.htm

 

There is a Winboard and a UCI executable, I used the Winboard one and set it up against Chessmaster, CM won both games (5min/3sec time controls). They did reach the endgame with the same pieces but CM had better pawn structure and forced exchanges.

 

ProDeo in the second game narrowly missed the time as it was trying to avoid the checkmate, thankfully CM 11 does not end the game in this occasion, it just shows a messagebox about it, the game goes on regardless.

 

As they were playing I was looking at the process manager and "The King" was using the CPU even in ProDeo's turn (that didn't happen against Stockfish), while ProDeo didn't use a lot of CPU at all. Weird?

EscherehcsE
Another-Life wrote:

From what I understand Stockfish 7 doesn't support opening book or EGTB itself. Maybe it will work through the GUI or the polyglot proxy but I don't want to test that. It is more than powerful as-is 

 

I imported the ProDeo 1.88 engine, it is the descendant of the Rebel engine and is available for free here:

http://www.top-5000.nl/prodeo188.htm

 

There is a Winboard and a UCI executable, I used the Winboard one and set it up against Chessmaster, CM won both games (5min/3sec time controls). They did reach the endgame with the same pieces but CM had better pawn structure and forced exchanges.

 

ProDeo in the second game narrowly missed the time as it was trying to avoid the checkmate, thankfully CM 11 does not end the game in this occasion, it just shows a messagebox about it, the game goes on regardless.

 

As they were playing I was looking at the process manager and "The King" was using the CPU even in ProDeo's turn (that didn't happen against Stockfish), while ProDeo didn't use a lot of CPU at all. Weird?

As HGMuller mentioned, Stockfish 7 directly supports the Syzygy tablebases; However, the Syzygy tablebases are significantly different than the Nalimov or Gaviota tablebases.

 

The Chessmaster personality normally ponders. If you go into "Set up personality" and select the Chessmaster personality, unclicking the pondering box will create a clone of the Chessmaster personality with a slightly different name. I typically change the name to "Chessmaster NP" (NP being short for "No Pondering"). If you save the cloned personality, you can use the clone when you don't want Chessmaster to ponder.

 

Regarding Pro Deo, you might want to check to see how much hash it's using. When you install Pro Deo directly as Winboard, I think you have to specify the hash size directly in the command line using the w2, w4, w6 etc. codes. (Read the Pro Deo "readme.txt" file for more details.)

firegasm

Hey bros, didn't mean to stray from the topic. But what would you guys say would be the payoff if I learn from CM Academy. 

 

My ratings are currently fluctuating somewhere around the 1100- 1300 mark and I feel I could really improve with a plan to correct my stuff. 

 

In terms of rating, how much would I stand to gain after CM tutorials if I started at say 1150-1200 rating?

Another-Life

Can I use the Chessmaster engine in another GUI? Is that executable (the king.exe or something like that) usable as a normal Xboard engine?

EscherehcsE
Another-Life wrote:

Can I use the Chessmaster engine in another GUI? Is that executable (the king.exe or something like that) usable as a normal Xboard engine?

Theoretically it's possible, but with CM11, it might end up being a real pain in the butt. The CM programmers added an OPK code to the King engine that changes after every reboot of your system. Apparently, they were specifically trying to prevent running the King engine in another GUI.

 

There's an OPK patch that someone made that will permanently disable the OPK code, but I don't think it works in CM11; It's only advertised to work in CM8, 9, & 10. (I guess it couldn't hurt to try it with CM11.) I've tried this patch for CM10, and it does work.

 

If the patch won't work on your system, you'd have to manually obtain the OPK code before running the King engine in another GUI. The next time you reboot your system, you'd have to repeat the OPK procedure.

 

Download link for OPK patch (CM8000, 9000, 10th): https://web.archive.org/web/20070930221944/http://www.freewebs.com/jakent/

 

This link, in Section [D.3.4], discusses how to run the King engine in Winboard, Arena, etc. if you're not using the OPK patch: https://web.archive.org/web/20070427175013/http://horizonchess.com/FAQ/Winboard/Winboard4.html

 

A forum thread discussing running the CM11 engine in another GUI (it might or might not help you): http://talkchess.com/forum/viewtopic.php?start=0&t=17560&topic_view=flat

Another-Life

That opk link is corrupted, I scoured the internets and found another link. It could not patch The King 3.50 so I had to patch the 3.33 version (it is in the same folder, in CM 11 install dir)

 

I imported it to Scid vs PC and pitted it against Phalanx XXIV to see if it is working properly. (I tried to use the tts and ttu commands to set its hash to 64mb but I don't think it worked, task manager shows just a few megs being used by the King's process)

 

It is putting up a fair fight against Phalanx XXIV but it is rather weaker. Phalanx XXIV is rated close to 2600 at CCRL 40/4, Chessmaster 11 4CPU is rated higher but this is The King 3.33 not 3.50, it is running in one thread, I can't seem to change its options and it is moved out of its folder so not getting the benefits of opening book or EGTB as when running normally under Chessmaster 11.

 

The Xboard protocol sucks btw. (nowadays)

EscherehcsE
Another-Life wrote:

That opk link is corrupted, I scoured the internets and found another link.

Sorry about that, I didn't check it before posting. I had two links; They both used to work. I replaced the broken link with the good one.

EscherehcsE

I don't know if this will help, but here's the contents of my Chessmaster 10 Wb2Uci.eng file that I use in Arena. I have the hash set at 128 MB. Of course, your opk number will be different:

 

 (Edit - For the contents of the CM11 Wb2Uci.eng file, see Post #23.)

 

[ENGINE]
Name=Chessmaster 10
Author=Johan de Koning
Filename=Wb2Uci.exe

[OPTIONS]
Program=TheKing.exe
InitString=cm_parm default\cm_parm opk=216497 opp=100 opn=100 opb=100 opr=100 opq=100 myp=100 myn=100 myb=100 myr=100 myq=100 cc=100 mob=100 ks=100 pp=100 pw=100 cfd=0 sop=100 avd=0 rnd=0 sel=10 md=99
HashCommand=cm_parm tts=134217728 ttu=9
MateScore=10000
InitTime=4
Ponder=false
Logfile=false
Edit=edit
UseSAN=false
logfile=false
ownbook=false
Priority=normal
AddHintMove=false
Protocol=1
LevelExtend=Progressive
computer=true
Analyze=true
UseUndo=true
Visible=Ponder,Hash


(Edit - For the contents of the CM11 Wb2Uci.eng file, see Post #23.)

Another-Life

I use Scid vs PC and it has a field for cmdline parameters when adding a new xboard engine. Do I just put something like "tts=134217728 ttu=9" in that field? They seem to be ignored.

EscherehcsE

Regarding the opening book, can't you specify any polyglot opening book for The King engine in Skid vs. PC?

Anyway, there's a utility program that will convert a Chessmaster opening book to a PGN file. Then you should be able to make a polyglot book out of the PGN file.

http://homepages.paradise.net.nz/npattins/ChessOpeningBookPage.html

(This link works. Smile)

EscherehcsE
Another-Life wrote:

I use Scid vs PC and it has a field for cmdline parameters when adding a new xboard engine. Do I just put something like "tts=134217728 ttu=9" in that field? They seem to be ignored.

Oh, sorry, I didn't mention that I use a Wb2Uci adapter, so you'd actually be installing a UCI engine into Scid by selecting the Wb2Uci.exe file as the UCI engine. I'll install it into my Scid vs. PC to make sure it really works.

Another-Life

I studied the patch and it was trivial to implement it to the 3.50 version. I had it play two games against Phalanx XXIV, it lost the first but won the second so it is not weakened, it's our good ol' friend Chessmaster! Also I noticed that this version uses a lot more memory, more than 64mb.

 

To any owners of CM 11 that want to use it as an Xboard engine I have this to say to  you:

THEKING350.EXE
0000CE82: 0F 90
0000CE83: 85 E9

 

Here is the game it won.

 

 

 

EscherehcsE
Another-Life wrote:

I studied the patch and it was trivial to implement it to the 3.50 version. I had it play two games against Phalanx XXIV, it lost the first but won the second so it is not weakened, it's our good ol' friend Chessmaster! Also I noticed that this version uses a lot more memory, more than 64mb.

 

To any owners of CM 11 that want to use it as an Xboard engine I have this to say to  you:

THEKING350.EXE
0000CE82: 0F 90
0000CE83: 85 E9

 

That's pretty impressive! Do you mean that you're running the engine directly as an xboard engine, or are you running it as a UCI engine with an adapter? If it's the former case, are you specifying any parameters on the command line?

Regarding the hex stuff, I'm assuming that you used a hex editor on the engine file? I'd like to know how you did that, but then I don't have CM11, so it's a moot point for me anyway.

 

Oh, I was able to install the Chessmaster 10 engine into Scid vs. PC as a UCI engine with the Wb2Uci adapter.