Puzzle of the Day

My Library

When HTML is not HTML

Oops. I have discovered, by accessing the blog from my new work computer, that the chess board does not display properly in Internet Explorer. About half the board doesn’t display the black/white squares as expected. I use Firefox (and will do so at work once I get the computer set up the way I want), but it’s no good to have a game viewer that isn’t viewable in the most used browser.

I’m not one to get on the anti-Microsoft bandwagon, and I did not have much of an issue with Vista, but I don’t understand how standardized protocols can be rendered so differently. I mean, read the RFCs or something!

Anyway, I will try to find a fix for this but in the meantime if you really want to play over the games (trust me, they aren’t worth it), use Firefox.

Sigh

Last Monday I played the final round of a 3 round Swiss (G/9o) and lost as White against a lower-rated player. He played the dreaded 1. … c5. I came into the game not knowing what I was going to play against the Sicilian, and ended up in an Accelerated Dragon where I wasn’t sure what I was doing was right, but apparently made reasonable moves until move 9 or so (at least my Chessbase database found some games by better players that followed my moves until that point).

I have to say one pet peeve of mine when it comes to chess blogs are the excuses that are listed when the writer loses. From distractions across the room to lack of sleep (because the plane arrived late), it usually comes down to external circumstances or other things outside the player’s control. Rarely is credit given to the opposing player for finding a good combination or making the right responses to poor moves. But if that player had won, you can be sure they would not even remember the guy three boards down who constantly coughed, or their fidgeting opponent who played with the captured pieces. It’s just human nature to look for a scapegoat.

So to avoid being labeled a hypocrite, I want to point out that my opponent simply outplayed me. Granted I did not have my “A” game (it’s not a good sign when you don’t have a plan after move 3), but regardless, he took the positions offered, did not make mistakes that I could find and exploit, and beat me fair and square. Any issue I have with how I played is entirely internal – my mental state and psychological issues with my opening prep and lack of focus.

What do I need to do?

  • Trust my evaluation of the position instead of trying to remember the book recommendation of the opening.
  • Stop being scared of particular openings, like the Sicilian. If it won by force, chess would be over.
  • Refocus on sharpening evaluation skills, instead of spending all my free chess time trying to memorize an opening repertoire.

What will I likely do instead? Buy more opening books/DVDs. Sigh.

I hate losing rating points! One bad game squanders the gains from five good ones, especially if you are one of the higher rated members of the club and are usually paired down. I can always stop going to the club and instead focus on playing in a half-dozen tournaments throughout the year, but I need to play more often and I do think active players owe it to the chess community to regularly play in their local club. I just need to stop playing as badly as I did last Monday.

Time for some self-flagellation. Here is the game, after running it by Fritz to see what went wrong. I am surprised, as I did not play as badly as I felt I did. If only I had moved that g pawn one more square…or just taken the a7 pawn instead of castling into danger…ah well, candy and nuts.


Modification to French

It’s been awhile since my last post. I’ve come to the conclusion that the idea of having a blog is much more interesting than actually having one. The free time I have to update this blog I would rather spend doing other things – including drive around recklessly and randomly assault strangers as Niko in Grand Theft Auto 4 (got a new HD TV and Playstation 3 to go with it). As someone who started out with Atari and 8-bit graphics, it’s amazing the level of detail and gameplay available today. I actually drove around the park area in GTA4 looking for chess games (unfortunately I did not find any and had to resort to beating some people on a park bench with a baseball bat).

However, I do not want to abandon the blog entirely. I just need to reset my expectations on how often I will maintain and update it. If I can manage a couple posts a month, I should still be able to show any changes or progress in my game (and rating), without having to worry about finding something to fill the space.

Enough of the rationalization, on to the actual chess topic!

I believe I need to make my focus on White opening preparation those defenses that Black is most likely to play. As such, I want to reassess my answer to the Sicilian (probably the defense I will see most often), and look for a short-cut in secondary defenses like the French. Speaking of which, I found an interesting (and forcing) response that leads to an open game with plenty of piece play (something a French player probably doesn’t want; I know my least favorite type of French to play when I am Black is the Exchange). It is called the Monte Carlo French, and it starts out:

1. e4 e6 2. d4 d5 3. exd5 (Exchange) exd5 4. c4

Starting position for Monte Carlo

Starting position for Monte Carlo

If I may, I want to plug the site linked above and encourage my nonexistent readers to check out their article archive.

I am going to base my play vs. the French entirely on that one web page (and the Chessbase 10 database). I realize that it likely isn’t the most testing variation – if it was then the giants would play it. But it seems to have a reasonable plan, is likely not something the opponent will have prepared for, and is played by people stronger than me to beat other people stronger than me – so it can’t be horrible.

Now I just need to make a final decision on what to do against the Sicilian, besides resigning.

My repertoire outline

If there has been one constant throughout my years playing chess, it has been my ADD-like compulsion to change openings (especially as White). I have tried 1. d4 (both mainline and the Colle/Stonewall), 1. e4 (King’s Indian Attack to Scotch), 1. Nf3 (Reti) and 1. c4 (English). Each time I thought I had found the opening for life, but as time went on I become disatisfied and instead of trying to repair what bothered me I would end up scrapping all that hard work and start with a new system.

I took a decade long absence from tournament chess, getting back into it almost four years ago. When I came back I thought I had settled on a mainline d4 opening system, as laid out in Starting Out: 1.d4. I did have success, but became obsessed with finding a better way to handle the Nimzo-Indian; I did not like the positions I got myself into (even if objectively speaking my results were fine) although it’s not like I encountered it all that much.

However, I could not be satisfied so long as this variation nagged at me. So I started looking at lesser-known sidelines (likeĀ  4. f3), but I liked these positions even less. Did I try harder, looking for ways of justifying all the time spent trying to remember these variations? Of course not – about 18 months ago I decided to switch to 1.e4, ala Starting Out: 1.e4. Those of you familiar with the reputation of the Sicilian are probably chuckling right now, and you would be right to do so.

Fast forward a year, and I not only was feeling miserable about my White opening (centered around the Scotch and Open Sicilians), I was finding myself playing my Black defenses (1. … e6 : French and Stonewall Dutch) without much thought, ending up in passive or worse positions against lower-rated players. I decided to take another break from chess, to recharge my batteries (or just see if I would rekindle my interest in the game), and also work on an opening system that I swear would last me for life. My memory is only getting worse, this time I had to mean it. After only four months away I was ready to return, armed with a new opening.

Well my foray into 1. Nf3 2. b3 (Nimzo-Larsen) lasted about a month. My name is Waxmatbl, and I have a problem.

Take a deep breath. Count to ten. This time…this time I am picking an opening and sticking to it.

What follows is my latest – and last! – White repertoire. Although I haven’t had a chance to try out the Vienna (except against the computer, where I have done surprisingly well), and I need to study some of the variations (against the Sicilian and Caro-Kann especially), I am feeling good about my choices. Will I stick with them? How dare you even ask!

1. e4

1. … e5 2. Nc3 (Vienna game) Nf6 3. Bc4

3. … Nxe4 4. Qh5 (leading to the interesting Frankenstein-Dracula variation)

3. … Nc6 4. d3

1. … Nf6 2. Nc3 (Vienna again – sorry Alekhine players)

1. … c5 2. Nc3 Nc6 3. g3 (Closed Sicilian – will need to study this in depth)

1. … e6 2. d3 d5 3. Nd2 (King’s Indian Attack vs. French)

1. … c6 2. Nc3 d5 3. d4 dxe4 4. Nxe4 (Classical Caro-Kann)

1. … d6 2. d4 Nf6 3. Nc3 g6 4. Be3 (150 Attack vs. Pirc/Modern)

1. … d5 2. exd5 (Scandinavian – it’s a forcing Black defense, so just need to find the most common replies)

That’s it. If I ever come across 1. … b6 or the like I’ll just have to wing it. My resources involve the following:

Hopefully I will have this fleshed out, with the major variations locked away in my porous memory, by early next year. At least in time for the US Amateur Team East, my favorite tournament.

Chesstempo viewer how-to

The ChessTempo game viewer is a Javascript application that requires some finagling to get to work with a Wordpress blog. This post will go over all that in gory detail, so hopefully others can have an easier time – and also so that if/when I change themes or lose my notes, I’ll remember what to do.

Firstly, the way the viewer works is by specifying a game, in PGN format. This can either be done “inline” (pasting the entire game within the calling code) or by giving the file name. The former seems awkward and messy to me, especially if you have a long game (or multiple games) with many comments. In order to do the latter I need to upload the game file to this site. Seems simple, but there is a catch.

I should note that I am using GoDaddy web hosting, where Wordpress is an installed application on my server instance. This works differently from a straight Wordpress.com blog, where you do not have server space outside of the blog itself. I am not sure of this, but I believe your option of uploading files is limited in this scenario.

So, assuming you have a file system to upload files to, there are two ways to go about it. One is to just use whatever upload interface is available (ftp, GoDaddy file manager, etc) and place the file where you want it. The other is to upload files from within Wordpress itself. Because I wanted to do everything from within Wordpress and not have to open a separate app/window just to upload the file, I went this route. But as I said, there is a catch.

By default Wordpress only allows for the uploading of certain file types, such as images and other media. In order to allow it to accept PGN files, I had to add that file type to its “whitelist”. This can be accomplished by installing the PJW Mime Config plugin.

After doing that, I still had a problem – the built-in uploader only places files in a predetermined directory. I wanted to place all games in a separate directory, and in order to do this I found and installed the WP Easy Uploader plugin. Apparently this plugin also allows for uploading arbitrary file types, so the first plugin probably isn’t needed – but since I already installed and activated it, I don’t feel like removing those changes and testing that theory out. Feel free to experiment.

In any case, now I can place PGN files in any directory I want. Next step, call the viewer and have it display the game.

Here are the lines necessary to call the viewer:

<script type="text/javascript"  src="http://chesstempo.com/js/pgnyui.js"> </script>
<script type="text/javascript"  src="http://chesstempo.com/js/pgnviewer.js"> </script>
<link  type="text/css"  rel="stylesheet"  href="http://chesstempo.com/css/board-min.css"> </link>
<script type="text/javascript">
  new PgnViewer (
   { boardName: "game123",
      pgnFile: '/chessgames/game.pgn',
      pieceSize: 35 }  );
</script>
<style type="text/css"/>
 .ct-black-square
 {
    background: url("/images/green_marble.jpg") no-repeat;
 }
 .ct-white-square
 {
    background: url("/images/white_marble.jpg") no-repeat;
 }
</style>
<div id="game123-container" style="float: left; margin-right: 20px;"></div>
<div id="game123-moves"></div>
<div style="clear: both;"></div>

The first three lines tell Wordpress where to find the script files, and also to load the CSS that formats the look of the viewer. These initialization lines should be placed in the beginning of the web page, the head section. So I went to the edit page of my theme, and added the following to the header.php file:

<script type="text/javascript"  src="http://chesstempo.com/js/pgnyui.js"> </script>
<script type="text/javascript"  src="http://chesstempo.com/js/pgnviewer.js"> </script>
<link  type="text/css"  rel="stylesheet"  href="http://chesstempo.com/css/board-min.css"> </link>

The remaining lines are to be called within the specific post, replacing “game.pgn” with the specific game file and “game123″ with a unique identifier. This last is important; on the main blog page you see multiple posts, and if you call each game with the same identifier, all you will see is the same game displayed in all the posts.

You will notice I made some modification to the default CSS, by specifying marble texture for the black and white squares. In addition, I added a div wrapper around the elements that display the board and moves. I did this so that the moves would appear to the right of the board display, instead of below it. And because of issues I read involving the “float” parameter, I felt I had to add a “clear” element at the end, to avoid causing display issues with the rest of the post (or other posts that would follow from the main page). I don’t know if it’s needed; the first time I added the game I did not include it, but my knowledge of HTML and CSS is limited and I’d rather be safe than sorry.

So that’s it. Once you get the upload and header customization done, all you need to do is add the lines above and you can display a chess game. If I was motivated (or had the time to learn PHP) I would look at integrating this into Wordpress, as an actual plugin. That way, I could just have a button added to the post editor where I enter in the game file I want, and all the code would be automatically added to the post. But as it is, I am happy it works and hope whoever reads this can benefit from these instructions.

Phoenix rising

If anyone was reading this blog in the last month – and if Wordpress stats are to be believed, that would be no one – they would have noticed multiple posts decrying my inability to find a workable chess game viewer, a complaint about political bias in an episode of Law & Order: SVU, and a long whine about chess openings and how I can never seem to find one I can live with for long.

Well I have some good news. I finally did find and figure out how to use a game viewer, and I decided to delete all those other posts and spare you, dear reader, from my trials and tribulations. I also wanted this blog to appear more professional, or at least like I knew what I was doing. Of course by admitting this I am exposing the sad truth, but that only matters if anyone is reading this.

In any case, here is a random bad game I played against the computer – I’m not normally this awful, I just wanted a quick game to display. Not that I don’t regularly lose against GNUChess even when I am trying, but I usually make it past move 18. Usually.

About the only thing I’d like to see added to this viewer is the extended PGN data, such as player names, ratings, etc. Until I figure that out I’ll just have to remember to write that info when introducing the game. Ah, and I just noticed that when I switch between Visual and HTML in the Edit Post section, I lose some of the code I need to display the game. The trick appears to be to do all writing in Visual first, then when ready to post, go to HTML and copy/paste the code.

In the next post I will go into detail on how I configured the viewer and got it to work with Wordpress.

Game viewer by ChessTempo (with some style modifications by me).