Sunday, December 16, 2012

How to program a chess engine in C++ language compatible with Xboard/Winboard: Chess Board Representation


Chess Board Representation is a very basic necessity in chess engine programming because it is the way to show the movements of the pieces and to visualize the current position of each player in the game. Some people prefer the use of arrays in C++ but this method below uses no arrays. It is just plain and simple way of representing the chess board. The lowercase letters r, n, b, k, q, and o represent Black's pieces and the uppercase letters R, N, B, K, Q, and P represent White's pieces. The numbers 1, 2, 3, 4, 5, 6, 7, 8 on the left represent the ranks while the letters a, b, c, d, e, f, g, h on the bottom represent the files.

Any suggestions and better ideas about how to represent the chess board for the chess engine program would be much more appreciated for the benefit of those who want to learn how to program their own chess engines. Also, a little sharing of your code would be a big bonus from you (I know you have better ideas, ways and methods in C++ programming to accomplish the same task). Thanks in advance :)

Source code:

/*
PROGRAM 7: Chess - board representation
AUTHOR: eternaltreasures
DATE: 2010 September 22
*/


#include <iostream>
#include <string>
using namespace std;

#define newline '\n'

//border represents the horizontal border lines between the ranks or rows of the chessboard
#define border "   +---+---+---+---+---+---+---+---+"

//sp represents the vertical spacer lines between the squares
#define sp " | "

/*
r1 to r8 represents the ranks or rows of the chess board, letters a to h represents the
files. The combination of these letters and numbers will be used in the coordinate
system of representing moves in chess.
*/
#define r8 "8 "
#define r7 "7 "
#define r6 "6 "
#define r5 "5 "
#define r4 "4 "
#define r3 "3 "
#define r2 "2 "
#define r1 "1 "
#define boardfiles "     a   b   c   d   e   f   g   h"

//ranks 8 and 7 are Black's initial position and ranks 1 and 2 for White.
char a8='r', b8='n', c8='b', d8='q', e8='k', f8='b', g8='n', h8='r';
char a7='o', b7='o', c7='o', d7='o', e7='o', f7='o', g7='o', h7='o';
char a6=' ', b6=' ', c6=' ', d6=' ', e6=' ', f6=' ', g6=' ', h6=' ';
char a5=' ', b5=' ', c5=' ', d5=' ', e5=' ', f5=' ', g5=' ', h5=' ';
char a4=' ', b4=' ', c4=' ', d4=' ', e4=' ', f4=' ', g4=' ', h4=' ';
char a3=' ', b3=' ', c3=' ', d3=' ', e3=' ', f3=' ', g3=' ', h3=' ';
char a2='P', b2='P', c2='P', d2='P', e2='P', f2='P', g2='P', h2='P';
char a1='R', b1='N', c1='B', d1='Q', e1='K', f1='B', g1='N', h1='R';


void introduction ()
{
cout << "   Chess Engine Program 1.0";
cout << newline;
cout << "   by eternaltreasures";
cout << newline;
cout << "   September 2010";
cout << newline;
cout << newline;
}

//function called by main () to display the chess board.
void displayboard ()
{

cout << border;
cout << newline;
cout <<r8<<sp <<a8<<sp <<b8<<sp <<c8<<sp <<d8<<sp <<e8<<sp <<f8<<sp <<g8<<sp <<h8<<sp;

cout << newline;
cout <<border;
cout << newline;
cout <<r7<<sp  <<a7<<sp <<b7<<sp <<c7<<sp <<d7<<sp <<e7<<sp <<f7<<sp <<g7<<sp <<h7<<sp;

cout << newline;
cout <<border;
cout << newline;
cout <<r6<<sp  <<a6<<sp <<b6<<sp <<c6<<sp <<d6<<sp <<e6<<sp <<f6<<sp <<g6<<sp <<h6<<sp;

cout << newline;
cout <<border;
cout << newline;
cout <<r5<<sp  <<a5<<sp <<b5<<sp <<c5<<sp <<d5<<sp <<e5<<sp <<f5<<sp <<g5<<sp <<h5<<sp;

cout << newline;
cout <<border;
cout << newline;
cout <<r4<<sp  <<a4<<sp <<b4<<sp <<c4<<sp <<d4<<sp <<e4<<sp <<f4<<sp <<g4<<sp <<h4<<sp;

cout << newline;
cout <<border;
cout << newline;
cout <<r3<<sp  <<a3<<sp <<b3<<sp <<c3<<sp <<d3<<sp <<e3<<sp <<f3<<sp <<g3<<sp <<h3<<sp;

cout << newline;
cout <<border;
cout << newline;
cout <<r2<<sp  <<a2<<sp <<b2<<sp <<c2<<sp <<d2<<sp <<e2<<sp <<f2<<sp <<g2<<sp <<h2<<sp;

cout << newline;
cout <<border;
cout << newline;
cout <<r1<<sp  <<a1<<sp <<b1<<sp <<c1<<sp <<d1<<sp <<e1<<sp <<f1<<sp <<g1<<sp <<h1<<sp;
cout << newline;
cout << border;
cout << newline;
cout << newline;
cout << boardfiles;
cout << newline;
cout << newline;
}

int main ()
{
introduction ();
displayboard ();

//Move entry - it asks the player to enter the move in coordinate system of chess move notations.
string entermove = "e2e4";
cout << newline;
cout << "Enter your move:";
cin >> entermove;
cout << entermove;
}

Saturday, December 15, 2012

How to setup the TCP/IP in Chessmaster 9000 CM LIVE:


This procedure for the TCP/IP setup in Chessmaster Live or CM LIVE in Chessmaster was tested using Chessmaster 9000 in Windows XP with 2 computers in a home network connected by a common router. The procedure for the setup of TCP/IP should be similar in older versions of Chessmaster as well as newer versions such as the Chessmaster 10th edition and the Chessmaster XI or the Grandmaster edition.

How to setup the TCP/IP in Chessmaster 9000 CM LIVE:

Hosting computer:

-----------------------
1. Start Chessmaster 9000
2. CM LIVE
3. TCP/IP
4. In the Create Session Box -> Game Name -- chessmaster
5. Click Host

Joining computer:

----------------------
1. Start Chessmaster 9000
2. CM LIVE
3. TCP/IP
4. In the Create Session Box -> Game Name -- chessmaster
5. In the Join Session Box -> Host IP Address or DNS Name -> 192.168.2.10 (Start -> Run -> cmd -> ipconfig (to obtain ip address)
6. Click Join

Note: chessmaster is a sample of Game Name and 192.168.2.10 is a sample ip address.

Challenge or Starting a chess game:

--------------------------------------------------
1. Windows -> Online Information
2. Right click the Name of the player and click Challenge
3. Send Challenge
4. Other player will Accept the Challenge
5. Play the game

CHESS Puzzles, Problems with solutions - mate in 3 by Two Bishops & King

CHESS PUZZLE:

White to move and mate in 3 moves.

This chess puzzle is an endgame problem of mating the opponent King using two Bishops with the help of the friendly King.


SOLUTION:

1. Ba6.
1... Kb8.
2. Bh2+.
2... Ka8.
3. Bb7 checkmate.

CHESS Puzzles, Problems with solutions - mate in 3 by Bishop & Knight

CHESS PUZZLE:

White to move and mate in 3 moves.

This chess puzzle is an endgame problem of mating the opponent King using only the Bishop and Knight with the help of the friendly King.


SOLUTION:

1. Ba6.
1... Ka8.
2. Bb7+.
2... Kb8.
3. Nc6 mate.

CHESS Puzzles, Problems with solutions - mate in 3

CHESS PUZZLE:

White to move and mate in 3 moves.
 
In this Chess puzzle, White to move and mates Black in 3 moves. The three pawns in the 7th rank are ready to be promoted. Note that this position is symmetrical. No matter which pawn Black captures, the solution to this chess problem of promoting pieces are the same, i.e. Bishop and then Rook.


SOLUTION:


1. Bd8=B.
1. Kxc6.
4. Rb8=R.
5. Kd6.
6. Rb6 checkmate.

Top 3 best places to play Free Live Chess online on the internet


There are so many sites to play live chess online on the web but some has too few members and it's hard to find someone to play with (opponent). Some sites has cool features and good interfaces but there are too much annoying ads and longer time to load meaning longer waiting times. Some websites has so small boards that you can't make it larger. Some has problems that I don't want to mention. Some sites are purely PAID (you have to purchase membership). I have tried and played on most of these sites but based on my own experience, these chess sites below are the:


Top 3 best places to play Free Live Chess online on the internet:


1. CHESS.COM ON FACEBOOK    http://apps.facebook.com/chessfb/

Chess.com http://www.chess.com/ is the best place to play Chess online on the internet. You can play live chess, correspondence (email) chess, tournaments, chess videos to learn from, chess tactics trainer, chess openings, chess mentor (virtual chess coach). You can also join chess groups, solve the Daily Chess Puzzle, see the Game of the Day, Opening of the Day and much more.

You can either play on the Facebook site or the Chess.com site (bigger board). Lots of available players from all over the world, friendly seek graph, cool interface, play against the computer, play with your friends, chat, chess analysis, select from many chess rooms, put on your flag/country, picture or avatar, has a chess forum and so much more resources. Note that some features are available only for paid members. Also note that being a free member is good enough to enjoy playing chess!


2. Free Internet Chess Server (FICS) http://www.freechess.org/  using BABASCHESS Client http://www.babaschess.net/

Free Internet Chess Server (freechess.org) is a free chess server with over 300,000 registered users. It is one of the oldest and one of the largest internet chess servers in the world. Availability to play various chess variants. Excellent for any level of the player. You can play also against the computer or any player in the world that is available.

BabasChess is a Free Internet Chess Client (Chess GUI - Graphical User Interface) used for playing on the FICS server. BabasChess can run on Windows and Linux operating systems. It has a nice, attractive, fast and customizable playing environment, with chat, emoticons, sound effects and other cool features. It also has a powerful PGN viewer/editor, chess engines support for analyzing positions, solving mates, chess puzzles and other grandmaster or classic games. BabasChess is totally free and supports many different major languages in the world. 


3. YAHOO CHESS  http://ca.games.yahoo.com/games/login?game=Chess

You need a Yahoo ID and password in order to play. Once logged in, you can select from four rooms namely: Social, Beginner, Intermediate, and Advanced. When you select a room, wait for the Java applet to load. If you click the Play Now button, and an opponent is available, you can then press Start Game to start playing chess. You can also click the Create Table to make ready a table, set time, sound, show last move options. Once a table is created, you can Invite a player or Boot a player. The Sit button will allow you to join the game with the corresponding color (Black or White).

The Yahoo Chess Games site and server has many players from all over the world with different levels of strength. It has also a nice, easy to navigate, friendly, and cool graphical user interface.

Top 10 & Top 20 Greatest, Strongest, Best, Most Brilliant Chess Players in the World of All Time Ever in History


Note: This list is subjective.

Top 10:
1. Garry Kasparov
2. Bobby Fischer
3. Anatoly Karpov
4. Emanuel Lasker
5. Alexander Alekhine
6. Mikhail Botvinnik
7. José Raúl Capablanca
8. Vladimir Kramnik
9. Boris Spassky
10. Tigran Petrosian

Top 20:
11. Wilhelm Steinitz
12. Max Euwe 
13. Vasily Smyslov
14. Mikhail Tal
15. Paul Morphy
16. Viswanathan Anand
17. Howard Staunton
18. Siegbert Tarrasch
19. Viktor Korchnoi
20. Paul Keres


Top 10 Chess Players with the Longest Reign of Championship:


Years as
Champion -- Rank ----- Name, Country of the World Champion

 27 --------- 1 --- Emanuel Lasker (longest chess champion), Germany
 17 --------- 2 --- Alexander Alekhine, Russia, France
 16 --------- 3 --- Anatoly Karpov, Russia
 15 --------- 4 --- Garry Kasparov, Russia, Azerbaijan, Soviet Union
 13 --------- 5 --- Mikhail Botvinnik, Finland, Soviet Union
 8 ---------- 6 --- Wilhelm Steinitz, USA & Bohemia *
 7 ---------- 7 --- Vladimir Kramnik, Russia, USSR
 6 ---------- 8 --- Tigran Petrosian, Georgia, USSR
 6 ---------- 9 --- José Raúl Capablanca, Cuba
 4 --------- 10 --- Viswanathan Anand, India

Bohemia * --> Czech Republic/Germany/Austria


Top 10 Chess Players with their Highest/Best Elo Ratings Ever Recorded:


Highest/Best
ELO Ratings --- Name of Grandmaster Chessplayer & (Country)

1. 2851 ------- Garry Kasparov (Russia, Azerbaijan, Soviet Union)
2. 2826 ------- Magnus Carlsen (Norway)
3. 2813 ------- Veselin Topalov (Bulgaria)
4. 2809 ------- Vladimir Kramnik (Russia)
5. 2803 -------    Viswanathan Anand (India)
6. 2788 -------    Alexander Morozevich (Russia)
7. 2787 -------    Vassily Ivanchuk (Ukraine)
8. 2786 -------    Levon Aronian (Armenia)
9. 2785 -------    Bobby Fischer (United States of America)
10. 2780 ------    Anatoly Karpov (Russia)

Friday, December 14, 2012

Chess Engine Programming - Checking the legal moves for White and Black on the first move

/*
PROGRAM 9: Chess Engine Programming - Checking the legal moves for White and Black on the first move

PURPOSE: On the first move of White, there are only 4 valid and legal Knight moves and also
         4 valid legal Knight moves for Black, making a total of 8 acceptable Knight moves
         on the first move. This program checks this validity using a hard coded method
         but it can also be done by reading from a file containing a list of all the legal
         moves on the first move of White or Black. It can also be tested using a procedure
         by coding the rules how the Knight moves in 'L-shaped' fashion, and other methods
         such as using a coordinate system and noting the "from square" (previous location)
         going to the "to square" (destination location).
         Also, on the first move for White, there are 16 legal and valid pawn moves and the
         same is true for Black, making a total of 32 acceptable pawn moves on the first
         move for White and Black. A total of 40 legal and valid moves (8 Knight moves and 32 Pawn moves)
         are possible on the first move of White and Black.
         This program assumes White is a Human Player and the Black Player is Computer. The user
         (player) enters a move first then the program tests the validity or legality of White's
         first move (in this case 20 legal moves). If White's move is acceptable, the Computer
         player responds with a move. If White Human Player moves any other move beside the
         20 acceptable moves, it will display an error to prompt the player "Illegal move.".

LANGUAGE: C++
AUTHOR: eternaltreasures
DATE: 2010 October 6
*/

#include <iostream>
#include <string>
using namespace std;

#define newline '\n'

string player_move;
string from_valid_move_choices = "e5";
int move_counter = 0;

int main ()
{
cout << endl;
cout << "Computer Chess Engine program 1.0" << endl << endl;
cout << "[Event: Chess Game Match]" << endl;
cout << "[Site: USA]" << endl;
cout << "[Date: 2010 October 6]" << endl;
cout << "[White: Human Player]" << endl;
cout << "[Black: Computer]" << endl << endl;

move_counter = move_counter + 1;

cout << "White Player: Please enter your move. " << move_counter << "."; cin >> player_move;

if  ((player_move == "Nf3") || (player_move == "Nh3")
  || (player_move == "Nc3") || (player_move == "Na3")
  || (player_move == "a3")  || (player_move == "a4")
  || (player_move == "b3")  || (player_move == "b4")
  || (player_move == "c3")  || (player_move == "c4")
  || (player_move == "d3")  || (player_move == "d4")
  || (player_move == "e3")  || (player_move == "e4")
  || (player_move == "f3")  || (player_move == "f4")
  || (player_move == "g3")  || (player_move == "g4")
  || (player_move == "h3")  || (player_move == "h4"))
     
   cout << "Thank you! Computer Player move is " << move_counter << "... " << from_valid_move_choices << endl;
else
   cout << "Illegal move." << endl << endl;

}

How to program a chess engine in C++ language compatible with Xboard/Winboard: Selection of player color


This is a function called by the main () function to let the player select the color he/she prefers. Options include 'w' for selecting the White pieces and 'b' for selecting the Black pieces. The program checks the user input with the expected letters w or b. If the user enters any other letters or characters, it will display the valid selection choices.

Source code:

/*
PROGRAM 8: Chess Engine Programming - Selection of player color
AUTHOR: eternaltreasures
DATE: 2010 September 26
TITLE: How to program a chess engine in C++ language compatible with Xboard/Winboard:
       Selection of player color
*/

#include <iostream>
#include <string>
using namespace std;

#define newline '\n'


void selectcolor ()
{
char playercolor = 'w';

cout << newline;

cout << "Please choose your color,  w or b: ";
cin >> playercolor;
if (playercolor == 'w')
{
cout << "playercolor w=" << playercolor;
}
else if (playercolor == 'b')
{
cout << "playercolor b=" << playercolor;
}
else
{
cout << newline;
cout << "Please select:";
cout << newline;
cout << "w for White";
cout << newline;
cout << "b for Black";
cout << newline;
cout << newline;
cout << "Wrong player color=" << playercolor;
}
}

int main ()
{
selectcolor ();

return 0;
}

How to program a chess engine in C++ language compatible with Xboard/Winboard: New Game or Board Setup


This function lets the user enter n for a new game or s for board setup for analysis, solve for mate, etc. If the user enters any other characters other than n or s, it will display "Invalid entry" and show the correct choices. If the user selects the expected letters n or s, it will just display "New game = n" or "Board Setup = s". If the user enters the correct letters, a series of functions and statements will follow further to proceed to the other validations of the program (which will not be covered in this article). I will try to cover each function in the chess engine program categorically as possible to make it clear and focused to only one topic at a time.

Source code:

/*
PROGRAM 7a: Chess Engine Programming - New Game or Board Setup
AUTHOR: eternaltreasures
DATE: 2010 September 26
TITLE: How to program a chess engine in C++ language compatible with Xboard/Winboard:
       New Game or Board Setup
*/

#include <iostream>
#include <string>
using namespace std;

#define newline '\n'

void newgame ()
{
char gamesetup = 'n';

cout << newline;

cout << "Enter n for New Game, s for Board Setup: ";
cin >> gamesetup;

if (gamesetup == 'n')
{
cout << "New Game = " << gamesetup;
}
else if (gamesetup == 's')
{
cout << "Board Setup = " << gamesetup;
}
else
{
cout << newline;
cout << "Invalid entry:";
cout << newline;
cout << newline;
cout << "Please Enter:";
cout << newline;
cout << "n for New Game";
cout << newline;
cout << "s for Board Setup";
cout << newline;
cout << newline;
cout << "Invalid entry = " << gamesetup;
cout << newline;
newgame ();
}
}

int main ()
{
newgame ();

return 0;
}

How to program a chess engine in C++ language compatible with Xboard/Winboard: Event, Site, Date, Game, Player info (pgn)


This function is called by the main () function to get the user input of his/her name and country of origin. An output pgn file is generated according to the standard chess pgn game file format. The date is obtained from the system date and the chess game result is yet unknown and so therefore '-' is placed.

Source code:

/*
PROGRAM 8: Chess Engine Programming - Event, Site, Date, Game, and Player information
AUTHOR: eternaltreasures
DATE: 2010 September 26
TITLE: How to program a chess engine in C++ language compatible with Xboard/Winboard:
       Event, Site, Date, Game, and Player information for output pgn file
*/

#include <iostream>
#include <time.h>
#include <fstream>
using namespace std;

#define newline '\n'

void eventgameinfo ()
{
string eventname = "Chess Game Match";
string eventsite = "International";
time_t systemdate;
string whiteplayer = "White Player";
string blackplayer = "Black Player";
string gameresult = " - ";
cout << newline;

//Capture system date and time
time(&systemdate);

//Open the output game.pgn file     
ofstream fout;    
fout.open ("game.pgn");

cout << "Please enter your name: "; cin >> whiteplayer;
cout << "Your country of origin: "; cin >> eventsite;
cout << newline;

//Information of the Event, Site, Date, Game, Player and Result (for game.pgn file format)
cout << "[Event " << "\"" << eventname << "\"]";
cout << newline;
cout << "[Site  " << "\"" << eventsite << "\"]";
cout << newline;
cout << "[Date  " << "\"" << ctime(&systemdate) << "\"]";
cout << newline;
cout << "[White  " << "\"" << whiteplayer << "\"]";
cout << newline;
cout << "[Black  " << "\"" << blackplayer << "\"]";
cout << newline;
cout << "[Result " << "\"" << gameresult << "\"]";
cout << newline;

//Write to the game.pgn file
fout << "[Event " << "\"" << eventname << "\"]";
fout << newline;
fout << "[Site  " << "\"" << eventsite << "\"]";
fout << newline;
fout << "[Date  " << "\"" << ctime(&systemdate) << "\"]";
fout << newline;
fout << "[White  " << "\"" << whiteplayer << "\"]";
fout << newline;
fout << "[Black  " << "\"" << blackplayer << "\"]";
fout << newline;
fout << "[Result " << "\"" << gameresult << "\"]";
fout << newline;

}

int main ()
{
eventgameinfo ();

return 0;
}

Chess Engine Programming - the 3 most important elements of a chess engine which enable it to think and decide the best


Legal Move Generator


This chess engine component checks whether the moves are valid or legal. There are certain movement rules for each piece of the board as well as special moves. There are 5 important pawn moves: Promotion, En passant (e.p.), Capture, Two-square move, and one-square move. Knights move in L-shaped squares and can move backwards. Bishops move along diagonals of the same color and can also move backwards. Rooks move any number of squares straight vertically or straight horizontally. Castling is a special rook movement in which it jumps over the King. The Queen moves like a Bishop and a Rook. It moves along diagonals, files, and ranks any number of squares forward or backward. The King can move any direction as long as it is one square only. The only exception to this rule is when it is castling wherein it moves two squares. The Legal Move Generator also checks Draws by three-fold repetition, Draw by 50-move rule, Draw by insufficient material to checkmate, White King checks, Black King checks, Checkmate and more.


Score Evaluation Function

This is the "brain" of the chess engine. It "thinks" and forms the basis for decision of the chess engine. It assigns values for any situation within the board. For every movement of the pieces there is a corresponding score computed. For example a move leading to a checkmate would have a high score, an exchange leading to a material advantage, a pawn promotion, a move making the opponent's pieces in a cramped position, centered pawns, centered Knights, centered Bishops, isolated pawns, rook-pawns, doubled pawns, discovered checks, rook battery, absolute pin, forks, regular pin, etc.


Search Algorithm

Chess engine programmers often use the Minimax algorithm to search the best move possible in a given particular board position and situation. It takes and tests moves from the Legal Move Generator and checks to find the minimum score for the opponent while maximum score for the engine. Minimax can also be understood as an algorithm to search for the best possible move in a given situation. The more move turns (plies) it searches, the deeper and better will be the move that will be generated. Time is also a function to bring out the best move. Transposition tables also provide a superior search return. Searches from a book of similar played games with known variations leading to a win is also a good supplement.

Thursday, December 13, 2012

Chess engine programming: Analysis of legal moves, plies, and total move combinations of chess pieces


Chess is one of the oldest classic games played on a board. The chess board is an 8 x 8 grid consisting a total of 64 equal squares. Chess is a game of perfect information because each player knows and sees all the moves and all the pieces in the board at all times. On the starting position of the game, White has 8 pawns, 2 rooks, 2 knights, 2 bishops, 1 queen, and 1 king for a total of 16 White pieces. Black on the other hand has exactly the same kinds and quantities of pieces but of the opposite color for a total of 16 Black pieces. With all the White and Black pieces combined, the total number of pieces at the start of the game of chess is 32.

On White's first move, there are a total of 20 legal or valid moves. On Black's first move, there are also a total of 20 legal or valid moves. There are a total of 400 possible move combinations (20 x 20) on each player's first moves. In chess engine programming terminologies, a player's turn is called a ply. Thus, 2 plies mean that White has made a move on his turn and Black has replied a move on Black's turn. Another way to understand a ply is to think that a pair of one White and one Black move equals 2 plies.

White's 20 legal moves on the first move:


Pawn moves
1. a3
2. a4
3. b3
4. b4
5. c3
6. c4
7. d3
8. d4
9. e3
10. e4
11. f3
12. f4
13. g3
14. g4
15. h3
16. h4

Knight moves
17. Nf3
18. Nh3
19. Nc3
20. Na3


Black's 20 legal moves on the first move:


Pawn moves
1. a6
2. a5
3. b6
4. b5
5. c6
6. c5
7. d6
8. d5
9. e6
10. e5
11. f6
12. f5
13. g6
14. g5
15. h6
16. h5

Knight moves
17. Nf6
18. Nh6
19. Nc6
20. Na6

Monday, December 10, 2012

How to Play Blindfold Chess: Basic Tips Tricks, Tactics, Techniques, Memory Trainer, Learning Methods to Visualize Board

Bb4 - Black's King Bishop checks the White King
Bb5 - White's King Bishop checks the Black King
Dividing the Board into 4 equal parts
Left diagonals
Nd5 - Centered Knight controls 8 critical squares on the Queen and King side
Ne4 - Centered Knight controls 8 critical squares on the King and Queen side
Nf5 - Control of the Kingside castling enemy territory
Qa4 - White's Queen checks Black's King on White territory (within 4th rank)
  
Qd5 - White's Queen forks Black's Rook and Knight
Qe4 - White's Queen delivers a forking check on the Black King and Rook
Qe5 - White's Queen checks Black's King and forks Black's Rook and Knight

Qh5 - White's Queen checks Black's King on enemy territory (5th rank)
Queen side (a-file to d-file), King side (e-file to h-file).
Ranks 1 to 4 is White's territory, Ranks 5 to 8 is Black's territory.
Right diagonals.
Two center diagonals - a1h8 and h1a8.
Upper left diagonals.
Upper right diagonals.

Sunday, November 18, 2012

Chess Strategies in the Opening, Middle Game and Endgame


Opening strategy:


- develop or place your pieces on useful squares where they will have superior mobility and maximum control

- control the central squares allowing you to move freely and making your pieces mobile while placing your enemy on a cramped position thereby restricting his piece mobility and delaying his development

- know where and when to castle and assess the overall situation before you even castle, ask yourself "Am I gonna be vulnerable to attack after I castle?", or "Will I castle later?" or "Is it safe not to castle at all?", this needs good judgment to examine the possibilities

- remember, pawns can not retreat or go back, so don't make weak pawn moves. Look for your opponent's weakness on pawn moves in the opening and utilize it to gain advantage or pace

- it pays to study the openings and its variations, sometimes your game is similar and if you happen to have studied or played combinations leading you to a win or gain in material, the better chances for you in winning the game

- if you are playing the White pieces, exploit the initiative and make good use of the advantage of "dictating" where you want the game to lead into



Middle game strategy:


- look for weak spots, exploit and attack it

- in a crowded position, if there's a way to open a file, do it and control it

- in a open position, setting up an attack on both the opponent's kingside and queenside can be a good strategy or focusing on one side can be better

- decoy strategies involve pretending to attack on one side but the overall impact or effect is really attacking the other side

- look for the overall situation on the opponent's kingside and queenside, if you find a weakness or opening, take advantage of it

- if you find a good spot to position your pieces to allow you to make way for a later attack, make good use of it

- if you are attacking, don't take your defense for granted, defensive aggression is the key

- make sure that your attacking forces are sufficient enough to overpower the opponent's defensive pieces, you may end up losing a piece and your attack leads to a failure

- if the opponent queen is restricted in mobility, setup a trap or attack on the side where the opponent queen is helpless

- if you can simplify or make exchanges such that you can predict an advantage on the endgame, do it

- sometimes a sacrifice would lead you to weaken the opponent's defense, thus, allowing your troops to gain mobility and setup for a decisive blow



Endgame strategy:


- pawns and pawn structure is crucial in the endgame, be careful of your pawns while looking for your opponent's weak pawns or pawn structure and exploiting it

- connected pawns are generally better than isolated pawns, but isolated pawns are also vital for a win

- find and exploit a way where you can win by means of a free and unobstructed pawn ready for a promotion

- the queen is generally the choice for a pawn promotion, but in some cases depending on the situation, other pieces than the queen could be better

- be careful of making exchanges, taking into consideration of what's left for the mating piece combinations

- the king is now a strong piece, position it in an advantageous square or on a profitable side

- some king moves and king positionings lead to a draw or a loss instead of a win, so carefully calculate and predict the final outcome

- know when and when not to move a pawn, sometimes the king or a piece should be moved first before a pawn to contribute to a winning strategy


Thursday, November 8, 2012

Chess Tactics part 2 - Undermining, Overloading, Deflection, Interference


UNDERMINING:

Undermining is a chess tactic in which the guard or defender of a piece is captured leaving the piece undefended or underdefended

Also called Removing the Guard or Removal of the Defender

Pieces used: Any piece



OVERLOADING:

Overloading is a chess tactic in which a defender is given another defensive job and thus leaving vulnerabilities

Pieces used: Any piece



DEFLECTION:

Deflection is a chess tactic forcing an enemy piece to leave the square, row or file

Pieces used: Any piece



INTERFERENCE:

Interference is a chess tactic accomplished by placing a piece to block the opponent's defending piece

Pieces used: Any piece except the King



Chess Tactics part 1 - Fork, Pin, Skewer, Battery, Discovered attack


FORK:

A fork is a chess tactic that employs one piece to attack two or more enemy pieces at the same time

Pieces used: Any piece


PIN:

A pin is a chess tactic which prevents the movement of an enemy piece because it exposes the king or another more valueble piece

Pieces used: bishop, rook, queen



SKEWER:

A skewer is a chess tactic that attacks two opponent pieces in a file, rank, or diagonal

Also called thrust, reverse pin

Pieces used: queen, rook, bishop



BATTERY:

A battery is a chess tactic that involves a formation consisting of two or more pieces on the same rank, file, or diagonal

Pieces used: queen, rook, bishop



DISCOVERED ATTACK:

A discovered attack is a chess tactic where in one piece is uncovered or moves out of the way of another attacking piece resulting in discovered check, discovered checkmate or with mate threat, discovered attack or check with capture, or double check

Pieces used: any combination of pieces

Wednesday, October 24, 2012

Black's best opening defence reply moves against White's first moves


This list has been the result of a research from professional competitive chess games which proves and recommends Black's best defense against any of the twenty possible first moves of White. The basis of Black's best reply moves comes from the fact that the games played successfully resulted with most wins by Black.

White's opening first moves ------------- Black's best defense reply moves

[1] 1. a3 (Anderssen's Opening) --------- 1... g6

[2] 1. a4 (Ware Opening) ---------------- 1... d5

[3] 1. b3 (Larsen's Defence) ------------ 1... d5

[4] 1. b4 (Polish Defence) -------------- 1... Nf6

[5] 1. c3 (Saragossa Opening) ----------- 1... d5

[6] 1. c4 (English Opening) ------------- 1... c5

[7] 1. d3 (Mieses Opening) -------------- 1... e5

[8] 1. d4 (Queen's Pawn Opening) -------- 1... Nf6

[9] 1. e3 (Van't Kruijs Opening) -------- 1... d5

[10] 1. e4 (King's Pawn Opening) -------- 1... c5

[11] 1. f3 (Barnes Opening) ------------- 1... d5

[12] 1. f4 (Bird's Opening) ------------- 1... d5

[13] 1. g3 (Benko's Opening) ------------ 1... d5

[14] 1. g4 (Grob Opening) --------------- 1... e5

[15] 1. h3 (Clemenz Opening) ------------ 1... d5

[16] 1. h4 (Desprez Opening) ------------ 1... d5

[17] 1. Na3 (Durkin Opening) ------------ 1... d5

[18] 1. Nc3 (Dunst Opening) ------------- 1... d5

[19] 1. Nf3 (Reti Opening) -------------- 1... g6

[20] 1. Nh3 (Amar Opening) -------------- 1... d5

White's best opening first moves - most successful first moves that result with most wins

Below are five of the most successful first moves for White as proven from played games by  chess professionals, chess masters, chess grandmasters, and chess champions. These opening first moves produced results with the most wins for White. The list also includes the ECO code (Encyclopaedia of Chess Openings) and the name of the chess openings.

    * 1. d4 - ECO A40 Queen's Pawn Game
    * 1. e4 - ECO B00 King's pawn Opening
    * 1. g3 - ECO A00 Benko's Opening
    * 1. Nf3 - ECO A04 Reti Opening
    * 1. c4 - ECO A10 English Opening


Black's Top 5 Best Defense Openings

Actual played chess games are the best sources to determine the best successful openings that will result with a win with either the White or Black pieces. Below are Black's top 5 best defense chess openings with their ECO (Encyclopaedia of Chess Openings) codes:

[1.] B20 Sicilian Defence
     1. e4 c5
     
[2.] E20 Nimzo-Indian Defence
     1. d4 Nf6
     2. c4 e6
     3. Nc3 Bb4

[3.] B06 Modern Defence (Robatsch Defense)
     1.e4 g6

[4.] B02 Alekhine's Defence
     1. e4 Nf6

[5.] B00 Nimzowitsch Defence
     1.e4 Nc6

White's Top 5 Best Openings

Actual played chess games are the best sources to determine the best successful openings that will result with a win with either the White or Black pieces. Below are White's top 5 best chess openings with their ECO (Encyclopaedia of Chess Openings) codes:

[1.] D06 Queen's Gambit
     1. d4 d5
     2. c4

[2.] D00 Blackmar Diemer Gambit
     1. d4 d5
     2. e4 dxe4
     3. Nc3

[3.] C70 Ruy Lopez
    1. e4 e5
    2. Nf3 Nc6
    3. Bb5

[4.] C23 Bishop's Opening
    1. e4 e5
    2. Bc4

[5.] A00 Benko Opening
     1. g3

Chess Tricks and Tactics

1. Battery

White assembles a triple battery with the two rooks and queen.



2. Deflection

White deflects the Black Knight by moving g5. The capture of h7 pawn will follow.


3. Discovered Attack

White moves the Bishop to f3 with a discovered check and then captures the black rook afterwards.


4. Fork

The White Knight forks the Black King, Queen, Rook and pawn.


5. Interference

White moves the Knight to d7 and interferes Black's Rook support to the Queen. If Black takes the Knight Rxd7, White's next move is to capture the Black Rook and wins in material.


6. Overloading

White will move to Kb3 to capture the b4 pawn.


Black will protect the b4 pawn by Rb8, this will remove the guard on the f7 pawn, White will then capture Rxf7. The Black rook in this scenario is said to be overloaded.


7. Pin

The White Bishop pins the Black Queen.


8. Skewer

The White Bishop skewers the Black King and Rook. This attacks both pieces. A skewer is also called Reverse Pin.

9. Undermining

White captures the guard on the Black Knight by Nxe6. If Black captures Rxe6, White will capture the Black Knight free in Bxd5 and at the same time pins the rook.



Tuesday, October 23, 2012

Major Active Chess Clubs in Toronto, Ontario, Canada


Below is a list of major chess clubs and schools in Toronto, Ontario, Canada. There are more chess clubs in Toronto that are not on this list because only the most active, most competitive, and most established (oldest) chess clubs, schools and institutes are included and listed here. Most of the chess clubs and schools have websites for more information and to see future coming events, schedules, and also tournament results and other postings. Links to Google maps to view the locations and places of the chess clubs and schools are also provided.


Scarborough Chess Club

Address: 1299 Ellesmere Rd., Toronto, ON M1P 2X9 (Birkdale Community Centre), closest major intersection [Brimley Road & Ellesmere]
Description: The Scarborough Chess Club is a volunteer-run chess club located in the Scarborough area of Toronto. Founded in 1960, the Scarborough Chess Club is proud to be one of the longest running community-based chess clubs in Canada. Affiliated with the Chess Federation of Canada, we welcome players of all ages and strengths. Open for casual play as well as regular Chess Federation of Canada-rated tournaments, the club provides chess pieces, boards and clocks for all games.
Age groups: Open to all ages
Tournaments: CFC Rated Swiss tournaments, Round Robin club championship
Winner award: Prize fund
Days open: Thursday evenings
Club opening time: 7 pm
Club play times: Tournament games start at 7:30 pm
Club play season: September to June
Contact email: info@ScarboroughChessClub.ca
Website: http://www.scarboroughchessclub.ca/
View the club place/location on Google map: Scarborough Chess Club
http://maps.google.ca/maps?f=q&source=s_q&hl=en&geocode=&q=1299+Ellesmere+Road,+Toronto,+Ontario&sll=43.753706,-79.43171&sspn=0.015127,0.027595&gl=ca&ie=UTF8&hq=&hnear=1299+Ellesmere+Rd,+Toronto,+Toronto+Division,+Ontario+M1P+2X9&ll=43.770877,-79.266057&spn=0.015123,0.027595&z=15



Willowdale Chess Club
Address: Earl Bales Park & Community Centre, Toronto, Ontario M3H 3P7, closest major intersection [Bathurst Street & Sheppard Avenue]
Description: The GREATER TORONTO CHESS LEAGUE (GTCL) is one of the member organizations in the OCA (Ontario Chess Association) whose mandate is to promote interest and participation in chess at all levels for the purpose of increasing the popularity of the game. GTCL co-ordinates and harmonizes chess activities in the league area. GTCL organizes local Championships including Toronto Closed, Toronto Women, Toronto Junior, Toronto Senior, Toronto Class and many open chess tournaments. The Willowdale Chess Club has been active continuously for more than 35 years.
Club days: Every Tuesday evenings
Club hours: 6:45 pm
Number of active members: Over 40 regular members
Annual membership: Costs only $10 per year
Contact person: Fred Kormendi
Contact telephone: (416) 223-0126 or (416) 630-6487
Contact email: Ybeer@rogers.com
Website: www.torontochess.org
View the place on Google map: Willowdale Chess Club
http://maps.google.ca/maps?hl=en&ie=UTF8&q=Earl+Bales+Park+%26+Community+Centre&fb=1&gl=ca&hq=Earl+Bales+Park+%26+Community+Centre&hnear=Toronto,+ON&cid=0,0,9018532928970033254&ei=5_jBTL-lBIXFnAe4-fXyCQ&ved=0CCAQnwIwAw&ll=43.753706,-79.43171&spn=0.015127,0.027595&z=15



Chess'n Math Association
Address: 701 Mt. Pleasant Rd. Toronto, Ontario, M4S 2N4, Canada, nearest major intersection [Mount Pleasant Road & Eglinton Avenue]
Description: The Chess'n Math Association (CMA) is a non-profit organization with provincial coordinators dedicated to bringing the game of chess to schools across Canada. The organization was founded in 1985 and now has three offices, 20 full-time staff and over 100 qualified chess instructors. Using our own 9-level instructional program, we teach chess as an extra-curricular activity to over 10,000 youngsters every week. The CMA is larger than all the other Canadian chess organizations combined. We provide a host of services for youngsters and schools in this country and now, through this web site, around the World.
Age groups accepted: Any
Playing days: Saturday mornings
Playing times: 10:00 am - 12:30 pm
Contact telephone number: (416) 488-5506
Fax number: (416) 486-4637
Website: http://www.chess-math.org/
View on Google map: Chess'n Math Association
http://maps.google.ca/maps?f=q&source=s_q&hl=en&geocode=&q=701+Mt.+Pleasant+Rd.+Toronto,+Ontario,+M4S+2N4&sll=43.753706,-79.43171&sspn=0.015127,0.027595&gl=ca&ie=UTF8&hq=&hnear=701+Mt+Pleasant+Rd,+Toronto,+Toronto+Division,+Ontario&z=16



Kingsview Chess Club
Address: 432 Horner Avenue, Etobicoke, ON M8W 2B2 (Franklin Horner Community Centre), closest major intersection [Gardiner Expressway and Kipling Avenue]
Description: Kingsview Chess Club in Toronto, Ontario, Canada has been around for over 30 years. It is a friendly chess club for all levels of chess players.
Age groups: Any
Club meeting days: Wednesday nights
Club meeting hours: 7 pm - 11 pm 
Club open season: 2nd week of September to end of May
Contact person: Kim Chelvan (416)259-1038 or (416) 252-6822
Website: http://darkwish2008.angelfire.com/
View Google Map and details: Kingsview Chess Club
http://maps.google.ca/maps?hl=en&ie=UTF8&q=franklin+horner+community+centre&fb=1&gl=ca&hq=franklin+horner+community+centre&cid=0,0,16868841541764696380&ei=18zBTNCJNMP38AbY7Kj-BQ&ved=0CBsQnwIwAQ&hnear=&ll=43.616287,-79.517927&spn=0.015162,0.027595&z=15



The Knights of Chess
Address/Location: 5635 Yonge Street, Suites 201-202, Toronto, ON, M2M 3S9, CA (close to Finch Subway station), nearest major intersections [Finch Avenue & Yonge St.]
Description: The Knights of Chess school of chess offers Master level professional chess instructors including, Yuri Lebedev, who has top qualifications, a lifelong experience teaching chess, and proven results. Among the school's students are prize winners of national championships as well as participants in international championships. The school is very active and competitive that it conducts Weekly Tournaments every Sunday. All tournament participants receive a Chess and Math Association (CMA) rating. Chess Federation of Canada (CFC) ratings are awarded to top players of the group.  
Age groups: Any
Schedule days: Every Sunday
Months/Season: September – December
Chess course program:
Sundays Children Chess Courses and Tournaments (12 weeks program)
Lesson start time: 2 pm            
Tournament time: 3 pm - 7 pm   
Participation Fee: $360 per student
Family Discount cost: 10% for second child, 50% for third, forth etc.
One day lesson and tournament cost: $33
One tournament only: $15
One day lesson cost: $20
Chess Tournament Program:
Instructional Chess Tournaments for Children and Youth on Sundays
Tournament Fee: $15 per student
Family Discount: second child pays $12, and third child pays $8
Registration time: 2:30 - 3:00 PM
Tournament Start Time: 3 P.M.                  
Contact person: Yuri Lebedev
Contact phone: (905) 370-2299 or (416) 319-2844
Contact email: lebedev@post.com
Website: http://sites.google.com/site/theknightsofchess/
View Google map and street details: The Knights of Chess
http://maps.google.ca/maps?f=q&source=s_q&hl=en&geocode=&q=5635+Yonge+Street.+toronto&sll=43.616287,-79.517927&sspn=0.015162,0.027595&gl=ca&ie=UTF8&hq=&hnear=5635+Yonge+St,+Toronto,+Toronto+Division,+Ontario&ll=43.7807,-79.415724&spn=0.00756,0.013797&z=16



Toronto City Chess Club
Address: 464 Sherbourne St., Toronto, ON M4X 1L1 (Millie's Place - Wellesley Restaurant), nearest major intersection [Sherbourne Street & Bloor Street]
Description: Casual chess for all age groups. Non-members (visitors) including beginners in chess are welcomed to play at this chess club in Toronto. Chess equipment freely offered for use.
Age groups: Any
Club days open: Sunday afternoons Club time open: 1 pm - 5 pm
Club seasons: Open on the months of September to May
Contact person: Ian Corkish
Contact phone: (416) 324-9989 ext. 111
View Google map: Toronto City Chess Club
http://maps.google.ca/maps?f=q&source=s_q&hl=en&geocode=&q=464+Sherbourne+St.&sll=43.666971,-79.374483&sspn=0.007575,0.013797&g=464+Sherbourne+St.&ie=UTF8&hq=&hnear=464+Sherbourne+St,+Toronto,+Toronto+Division,+Ontario&ll=43.667903,-79.374461&spn=0.015149,0.027595&z=15



Annex Chess Club
Address: 918 Bathurst St., Toronto, ON M5R 3G4 (near Bathurst Subway station), closest intersection [Bathurst St. & Bloor St.]
Description: The Annex Chess Club is operated by the Chess Institute of Canada, a not-for-profit organization that teaches life skills to children through chess. The club is affiliated with the Chess Federation of Canada.
Age groups: Any
Club date: Every Monday nights
Club hours: 6:30 pm - 11:00 pm
Contact telephone: (647)771-6911
Contact Email: info@annexchessclub.com
Website: http://www.annexchessclub.com
View Google Map: Annex Chess Club
http://maps.google.ca/maps?f=q&source=s_q&hl=en&geocode=&q=918+Bathurst+St.&sll=43.667608,-79.374736&sspn=0.007575,0.013797&g=495+Sherbourne+St.,+Toronto,+Ontario&ie=UTF8&hq=&hnear=918+Bathurst+St,+Toronto,+Toronto+Division,+Ontario+M5R+3G4&ll=43.66649,-79.41139&spn=0.007575,0.013797&z=16



Chess Institute of Canada
Address: Wellesley Community Centre, 495 Sherbourne St., Toronto, ON M4X 1L1, nearest major intersection [Sherbourne St. & Bloor St.]
Description: Chess Institute of Canada is a non-profit organization with the singular goal to use the game of chess to teach kids essential life skills and improve the world.
Age groups: Kids from Kindergarten to Grade 12
Schedule date: Every Saturday
Schedule time: 10 am - 12 pm
Contact telephone: (416) 537-2299
Website: http://www.chessinstitute.ca/
View Google map: Chess Institute of Canadahttp://maps.google.ca/maps?f=q&source=s_q&hl=en&geocode=&q=495+Sherbourne+St.,+Toronto,+Ontario&ie=UTF8&hq=&hnear=495+Sherbourne+St,+Toronto,+Toronto+Division,+Ontario+M4X+1L1&z=16



Mississauga Chess Club
Address: 3359 Mississauga Road North, Mississauga, ON L5L 1C6 (University of Toronto Mississauga - Erindale College), South building, Room 3141, nearest major intesection [Mississauga Road & Dundas St.]
Description: Located at University of Toronto Mississauga Campus, The Mississauga Chess Club is open for kids and regular club members alike.
Age groups: Children and adults accepted
Club days: Thursday nights
Club time: 7:45 PM - 11:00 PM for regular members; 6:45 PM - 7:45 PM for kids
Contact Telephone number: (905) 828-5279
Contact Email: chessking123@hotmail.com
Website: http://www.mississaugachessclub.ca/
View Google map: Mississauga Chess Club
http://maps.google.ca/maps?f=q&source=s_q&hl=en&geocode=&q=Erindale+College+mississauga+university+of+toronto&sll=43.7807,-79.415724&sspn=0.00756,0.013797&gl=ca&g=5635+Yonge+Street.+toronto&ie=UTF8&ll=43.544567,-79.655514&spn=0.028805,0.055189&z=14



Ajax Chess Club
Address: 115 Ritchie Ave., Ajax, ON L1S 7G5 (Ajax Alliance Church), closest intersection [Highway 401 & Westney Rd.; Kingston Rd. & Westney Rd.]
Description: Ajax Chess Club is a non-profit chess club. The Ajax Chess Club is the first official chess club in Ajax affiliated with the Chess Federation of Canada. The Ajax Chess Club was founded to bring the chess community together. The club fosters a friendly family atmosphere where chess enthusiasts can play & meet. Rated & Friendly tournaments.
Age groups: Any
Club days: Every Friday nights
Club time: 7 pm - 10 pm
Contact email: ajaxchessclub@gmail.com
Website: http://www.ajaxchessclub.com
View Google map: Ajax Chess Club
http://maps.google.ca/maps?f=q&source=s_q&hl=en&geocode=&q=115+Ritchie+Ave.+Ajax,+ON&sll=43.667608,-79.374736&sspn=0.007575,0.013797&ie=UTF8&hq=&hnear=115+Ritchie+Ave,+Ajax,+Durham+Regional+Municipality,+Ontario+L1S+7G5&z=16



Peel Chess Club
Address: Greater Toronto Area (GTA)
Description: Play casual or CFC rated chess anywhere in the GTA 7 days a week, all year round.
Age groups: Open to all ages and all chess player levels
Club date: 7 days a week
Club seasons: All seasons, all months, all year round
Membership fee: Costs $25 per year
Contact person: John Brown
Contact number: (905) 458-6791
Contact email: peelchessclub@canada.com