Two Types of Thinking
I divide the types of thinking that a chess player uses during a game into two categories: Reasoning and Intuition.
Perhaps we should start with some definitions.
Reasoning
By reasoning, I mean the concrete calculation that goes on when a chess player is analyzing variations. Reasoning is when a player is considering moves and consequences. Reasoning is hard work.
Intuition
Intuition is the mode of thinking that relies on experience, gut feel, instinct, rules of thumb. Intuition is not exact calculation; instead it is a feeling about a move or position.
How Computers "Think" while playing chess.
To explore the ideas of reasoning is and intuition, I first need to take a look at how computers are programmed to find moves. This is an overly simplified explanation, but it covers the important points.
The computer first generates a tree of variations. For my example, the computer will only look 2 moves deep for each player, and will only look at 2 moves at each branch. In reality, the programs will look at more moves and will look deeper in positions that have forcing continuations.
Next the program will calculate a value that represents an evaluation of the position for each of the final positions. This score will be based largely on the material balance, but also positional considerations. For my example I just generated random values between -9 and 9. A negative score is in Black's favor, and a positive score means White is better.
What follows next is called the Minimax algorithm. Working from the final position backwards, the program first calculates the score for the position after White's second move by choosing the minimum score of the two choices of moves for Black. Then the program calculates the score for the position after Black's 1st move by picking the maximum score of the two choices of moves for White. This happens two more times until all of the positions have a score.
By applying the Minimax algorithm, the program calculates that the best move White can make is the one marked 'a' above, which has a score of -3. The alternative has a score of -6 which is even better for Black. Black's best response to move 'a' is move 'b'. White's best 2nd move is 'c', and Black's best second move is 'd'.
Now back to Human Thinking
I showed you all that in order to discuss how reasoning and intuition are used when humans play chess.
While generating the "tree of variations" in their heads, humans cannot possibly consider every move at every branch. Only a limited number of moves can be considered, and to decide which, we use intuition. Rules of thumb help, which guide use to look at checks, captures and treats. Experience can play a role if the position is similar to other positions we have seen before. And gut feel can guide us into considering certain moves. Intuition also guides us in how deep we follow each line. Much like with the computer program, we use the rule of thumb to look deeper into lines with forcing moves.
Evaluating the positions at the end of each branch also involves intuition. We humans don't have the processing power to do a computer-like evaluation, but we can estimate how much we value differences in material, pawn structure, piece activity, weaknesses, etc. Rules of thumb are useful for the material imbalances. Instinct may tell us that piece activity may compensate for a weak pawn.
The human equivalent of the Minimax algorithm is where we use reasoning. Visualizing the possible moves at each branch and assigning mental scores is where we can use pure calculation power. As I mentioned above, reasoning is hard work. It takes mental discipline to do a thorough evaluation of the important moves and the opponent's replies.
The role of Time
Reasoning also takes a lot of time. You may notice that at long time controls, you will use reasoning much more than you do at 5 minute chess where it is mostly intuition. Something else to consider is that your reasoning will often benefit by spending more time, but your intuition will not.
Improving your Reasoning and Intuition
Reasoning is a skill, and is improved by practice. Solving tactical positions and working through endgame studies are good ways to improve your reasoning.
Intuition is based in part on your knowledge and experience, so reading books on strategy and playing over master games are good ways to improve intuition.
Friday, September 4, 2015
Saturday, May 23, 2015
Openings for Beginners
What opening should I play?
I see this question a lot on internet forums. There are so many openings, with multiple paths and transpositions, it is no wonder beginners are confused.
General Advice
The advice most often given to beginners is to play the open games. These are the openings that start with White playing 1.e4 and Black responding with 1...e5. These openings are called the open games because there are usually pawns traded on the center squares resulting in open central files and diagonals. With all these open lines, the pieces come into play quickly and it is often easy to figure out the best squares for your pieces. Quick development, king safety, and the fight for the central squares are usually the main priorities of the open games.
All of the above tends to make the open games good for learning, but I think the best reason to play the open games is that when you lose, it will usually be easy to figure out your mistake because it will be punished tactically right away. In the closed games, your positional mistake may not be exploited for another 10 moves, and the beginner will not be able to make the logical connection.
Who is the target audience of this advice?
The title says openings for beginners, and certainly anybody just learning to play chess should consider the opening advice listed below. I would think players rated under 1200 should also be trying out these openings. All the lines I give have been played by masters, so there is no need to worry that these lines are unsound. If they suit your style you could play them as you progress up through ratings of 1600 to 1800.
I should also note that these recommendations are intended to maximize learning, not increase short term performance. You may lose a higher percentage of games at first if you adopt these openings, but I am confident that your understanding will improve, and in the long term, so will your results.
Now for some specifics
To cut to the chase, I am recommending the Scotch Game, but using a modified move order.
The Scotch Game is usually reached by:
1. e4 e5
2. Nf3 Nc6
3. d4
when Black almost always plays 3...exd4
The move order I recommend is:
1. e4 e5
2. d4 dxe4
3. Nf3
and if Black responds with 3...Nc6, then we will have reached the same position.
Why this move order?
There are a couple of reasons why I recommend this particular move order.
- Some of Black's best options are avoided with this move order (see notes below)
- There are more opportunities for Black to make a mistake
What if Black doesn't play those moves?
That is a very good question. I first want to show some lines in the Scotch Game, then I will give some advice on how to play if Black plays moves other than those that lead to the Scotch Game.
The Scotch Game
We will consider two main variations in the Scotch Game following these moves:
1. e4 e5
2. d4 exd4
3. Nf3 Nc6
4. Nxd4
Black will usually play either 4...Bc5 or 4...Nf6. You will also need to prepare for 4...Qh4. Beginners will sometimes play 4...Nxd4, but this should cause you no trouble.
Gambit options for White
White can choose not to re-capture the pawn on move 4. There are some options where White can sacrifice a pawn to gain a lead in development with lots of open lines that may lead to an early attack.
4.Bc4 is the Scotch Gambit
4.c3 is the Goring Gambit.
When Black does not play 3...Nc6
These are some moves that Black may play instead of 3...Nc6
3...Nf6 is a variation of the Petroff Defense
3...d6 is a line in the Philidor Defense
3...Bb4+ and 3...Bc5 are options that are unique to this move order, but not problems for White.
3...c5 is sometimes played by beginners and is just bad for Black.
What if Black does not play 1...e5?
That will have to be another chapter. In most cases, the idea of playing 2.d4 will be the right move, and against the Sicilian, you can follow up with 3.Nf3.
Summary
As White, I recommend beginning players aim for the Scotch Game (or possibly the Scotch Gambit) using the 2.d4 move order. This will lead to positions that beginning players will be able to understand and learn from. This last diagram is a summary of the lines discussed above.
That will have to be another chapter. In most cases, the idea of playing 2.d4 will be the right move, and against the Sicilian, you can follow up with 3.Nf3.
Summary
As White, I recommend beginning players aim for the Scotch Game (or possibly the Scotch Gambit) using the 2.d4 move order. This will lead to positions that beginning players will be able to understand and learn from. This last diagram is a summary of the lines discussed above.
Saturday, April 25, 2015
Thursday, April 23, 2015
Working Prototype
Here is my working Prototype
It is hard to get a good picture of the displays.
It is hard to get a good picture of the displays.
The clock on the left is counting down. The button on the left is lit indicating which player is on the move. I will try to post a video soon.
Making all of the wiring cables, and soldering everything to the perf board took a lot more time than I had expected.
Saturday, April 4, 2015
Plastic Prototype Enclosure
It is time to move off the breadboards and into the prototype in a box phase. I bought a plastic storage box for about $4. It is made from polypropylene which is easy to cut. I drilled 1 inch holes in the bottom for the two lighted switches, and cut a large rectangle in the side for the displays.
This box is much larger than the final wood version will be. The wood version will be shaped much more like a Chronos; a bit wider, lower and narrower, with a sloped front for the displays. I also plan to use mechanical plungers instead of the buttons, but this will work for the prototype. These buttons have an LED inside that I will use to indicate who is to move. The sides of this box are transparent, so I won't have to open the box to show off the electronics inside.
Next step is to make wiring harnesses for the displays. The headers on the displays have male pins spaced 0.1 inches. This page has instructions for building the wiring harness. Since the displays only use 12 of the 16 pins, and they are in groups of 6, I will likely use two 6 pin housings for each display. I can get all the parts at the local electronics shop.
More pictures to follow.
Friday, March 27, 2015
It's a Clock !
I've got the basic clock sending time output to the displays. The LEDs show who is on move, and the buttons switch the clocks and LEDs.
What is left to do (software):
- move counter
- increment and delay
- multiple periods
- Setup routine for setting time and choosing options using buttons
- save settings to non-volatile memory
What is left to do (hardware)
- switches (on/off and pause)
- 4 buttons for navigating the menus
- prototype case, probably plastic
- eventually a nice wooden case, with mechanical plungers.
Sketch Update
I modified the printTime() function to convert the time remaining for each player from 1/10 seconds to H:MM:SS and to write that to the displays, by calling a new writeNum() function.
// Function to write the time to the displays void printTime() { // print time function int secDis1; int secDis10; int minDis1; int minDis10; int hrDis1; int secs; secs = timeR1 / 10; // convert 1/10 sec to H:MM:SS hrDis1 = secs / 3600; secs = secs % 3600; minDis10 = secs / 600; secs = secs % 600; minDis1 = secs / 60; secs = secs % 60; secDis10 = secs / 10; secDis1 = secs % 10; writeNum(hrDis1,3,1); writeNum(minDis10,7,1); writeNum(minDis1,10,1); writeNum(secDis10,14,1); writeNum(secDis1,17,1); secs = timeR2 / 10; // convert 1/10 sec to H:MM:SS hrDis1 = secs / 3600; secs = secs % 3600; minDis10 = secs / 600; secs = secs % 600; minDis1 = secs / 60; secs = secs % 60; secDis10 = secs / 10; secDis1 = secs % 10; writeNum(hrDis1,3,2); writeNum(minDis10,7,2); writeNum(minDis1,10,2); writeNum(secDis10,14,2); writeNum(secDis1,17,2); }
Part of the writeNum() function:
// function to write digits to the displays void writeNum(int charDigit, int charPos, int turn){ switch (charDigit){ case 0: if (turn==1){ lcd1.setCursor(charPos,0); lcd1.write(1); lcd1.write(2); lcd1.write(2); lcd1.setCursor(charPos,1); lcd1.write(3); lcd1.write(32); lcd1.write(3); lcd1.setCursor(charPos,2); lcd1.write(3); lcd1.write(32); lcd1.write(3); lcd1.setCursor(charPos,3); lcd1.write(3); lcd1.write(2); lcd1.write(4); } else{ lcd2.setCursor(charPos,0); lcd2.write(1); lcd2.write(2); lcd2.write(2); lcd2.setCursor(charPos,1); lcd2.write(3); lcd2.write(32); lcd2.write(3); lcd2.setCursor(charPos,2); lcd2.write(3); lcd2.write(32); lcd2.write(3); lcd2.setCursor(charPos,3); lcd2.write(3); lcd2.write(2); lcd2.write(4); } break;
and this continues for each of the 10 digits, plus a blank space if I want to use that later.
Thursday, March 26, 2015
Functioning Clock and BIG NUMBERS
Working Chess Clock
I now have a functioning chess clock. Lots of work yet to be done, but the basic functions are all working.
I took the code from the earlier clock test, and changed it from sending the output to the serial port, to writing the time to the displays. I also made the updates every 1/10 second.
This picture shows the two buttons and the green LEDs which indicate whose turn it is to move:
The buttons are wired to pins 2 and 3, with 10 K ohm pull-up resistors to +5V. Closing the switch pulls the pin to ground.
The LED anodes are connected to pins 4 and 5, with 560 ohm resistors between the cathode and ground. (similar to the schematics published earlier, but the pins have changed).
This next picture shows the display for player 2. Note, it is counting down tenths of seconds.
I will attach the sketch at the bottom of this post.
Big Numbers
I also did some work on making large numbers for the time display. (I don't know why this blog page insists on turning the image sideways, it is horizontal on my PC, but you can still see the large digits).
These large numbers were made by combining 7 custom characters. The custom characters are numbered 0 through 7, but I used 1 through 7 because those were the numbers I used when I drew out the patterns on graph paper. Note, if you use character 0, the data type must be declared something like this: lcd.write((byte)0); It has something to do with control codes vs. custom characters. Luckily, since I used 1-7, I didn't run into this issue, but read about it on other web pages.
Some pieces of the sketch that created these large numbers:
#include <LiquidCrystal.h>
LiquidCrystal lcd1(6,7,9,10,11,12);
LiquidCrystal lcd2(6,8,9,10,11,12);
// create bit maps of the custom characters. 5 columns by 8 rows.
byte customChar1[8] = {
B00000,
B00000,
B00000,
B00000,
B00011,
B00011,
B00011,
B00011
};
.
.
.
void setup() {
lcd1.begin(20, 4);
lcd2.begin(20, 4);
lcd1.createChar(1,customChar1); // assign the bitmap pattern to character 1
.
.
.
}
void loop() {
lcd1.setCursor(3,0);
lcd1.write(1); // write character 1
.
.
.
}
And now, my most up to date clock sketch (from the photos at the top of this post):
I now have a functioning chess clock. Lots of work yet to be done, but the basic functions are all working.
I took the code from the earlier clock test, and changed it from sending the output to the serial port, to writing the time to the displays. I also made the updates every 1/10 second.
This picture shows the two buttons and the green LEDs which indicate whose turn it is to move:
The buttons are wired to pins 2 and 3, with 10 K ohm pull-up resistors to +5V. Closing the switch pulls the pin to ground.
The LED anodes are connected to pins 4 and 5, with 560 ohm resistors between the cathode and ground. (similar to the schematics published earlier, but the pins have changed).
This next picture shows the display for player 2. Note, it is counting down tenths of seconds.
I will attach the sketch at the bottom of this post.
Big Numbers
I also did some work on making large numbers for the time display. (I don't know why this blog page insists on turning the image sideways, it is horizontal on my PC, but you can still see the large digits).
These large numbers were made by combining 7 custom characters. The custom characters are numbered 0 through 7, but I used 1 through 7 because those were the numbers I used when I drew out the patterns on graph paper. Note, if you use character 0, the data type must be declared something like this: lcd.write((byte)0); It has something to do with control codes vs. custom characters. Luckily, since I used 1-7, I didn't run into this issue, but read about it on other web pages.
Some pieces of the sketch that created these large numbers:
#include <LiquidCrystal.h>
LiquidCrystal lcd1(6,7,9,10,11,12);
LiquidCrystal lcd2(6,8,9,10,11,12);
// create bit maps of the custom characters. 5 columns by 8 rows.
byte customChar1[8] = {
B00000,
B00000,
B00000,
B00000,
B00011,
B00011,
B00011,
B00011
};
.
.
.
void setup() {
lcd1.begin(20, 4);
lcd2.begin(20, 4);
lcd1.createChar(1,customChar1); // assign the bitmap pattern to character 1
.
.
.
}
void loop() {
lcd1.setCursor(3,0);
lcd1.write(1); // write character 1
.
.
.
}
And now, my most up to date clock sketch (from the photos at the top of this post):
// // Chess Clock Practice Sketches // // Bob Nolan // 3/26/2015 // // Include LCD display library and set up pinouts #include <LiquidCrystal.h> LiquidCrystal lcd1(6,7,9,10,11,12); LiquidCrystal lcd2(6,8,9,10,11,12); // Declare Global Variables unsigned int timeR1; unsigned int timeR2; unsigned long lastMilliS; int turn; int ledPin1 = 4; int ledPin2 = 5; int switchPin1 = 2; int switchPin2 = 3; boolean checkButton; boolean flag1=0; boolean flag2=0; void setup() { timeR1 = 150; // set initial time. Time is in 1/10 sec timeR2 = 150; // need to add user input routine turn=0; pinMode(ledPin1,OUTPUT); pinMode(ledPin2,OUTPUT); pinMode(switchPin1,INPUT); pinMode(switchPin2,INPUT); lcd1.begin(20,4); lcd2.begin(20,4); lcd1.print("Player 1"); lcd2.print("Player 2"); } void loop() { if (turn==0){ // dont start counting until 1st button press lastMilliS=millis(); } if (millis()-lastMilliS >= 100) { // every 100 msec, update time lastMilliS=millis(); if((turn==1)&&(!flag1)){ timeR1--; } if((turn==2)&&(!flag2)){ timeR2--; } printTime(); } checkButton=digitalRead(switchPin1); // player 1 button press if(!checkButton && (turn!=2)){ digitalWrite(ledPin2,HIGH); digitalWrite(ledPin1,LOW); turn = 2; printTime(); } checkButton=digitalRead(switchPin2); // player 2 button press if(!checkButton && (turn!=1)){ digitalWrite(ledPin1,HIGH); digitalWrite(ledPin2,LOW); turn = 1; printTime(); } if((timeR1<=0)&&(!flag1)){ // player 1 flag lcd1.setCursor(0,2); lcd1.print("Flag"); flag1=1; } if((timeR2==0)&&(!flag2)){ // player 2 flag lcd2.setCursor(0,2); lcd2.print("Flag"); flag2=1; } } void printTime() { // print time function lcd1.setCursor(0,1); lcd1.print(timeR1); lcd1.print(" "); lcd2.setCursor(0,1); lcd2.print(timeR2); lcd2.print(" "); }
Subscribe to:
Posts (Atom)