Friday, November 25, 2022

King, Bishop and Knight against King Endgame

The purpose of this post is to put together some resources about this particular endgame.

I think every chess player should learn this checkmate, it requires several techniques that are present in every day chess play like piece coordination, kings opposition, value of waiting moves, etc.

Although this checkmate is consider as a basic checkmate I think it is the trickiest one, in particular because of the 50 moves rule that will help the defender in case the attacker makes a few mistakes.

The best explanation I found about this checkmate is in the book "Fundamental Chess Endings" by Karsten Muller and Frank Lamprecht. There is an Amazon paperback version and a cheaper Kindle one.

This is a very well explained YouTube video about the KBNK checkmate

The following link will allow you to practice against the lichess engine. The method they explain is called Deletang's triangles, from the name of the person that formalized it.

Personally I prefer Phillidor's method using the Knight's W route.

At I use the following link to create a custom position and challenge people to play, that way I use the randomness that humans introduce in the game, it is amazing to see how many players don't know how to deliver checkmate,

When perfectioning your endgame technique I found the following link to tablebases online very useful:

For example the following endgame requires 30 moves with perfect play:

Since August 2021 also provide the tablebase feature, see announcement:

(This is a work in progress)

Thursday, May 5, 2022

2022 Holiday Schedule

Date Holiday
Friday, December 31 *         New Year's Day
Monday, January 17         Birthday of Martin Luther King, Jr.
Monday, February 21 **         Washington’s Birthday
Monday, May 30         Memorial Day
Monday, June 20 *         Juneteenth National Independence Day
Monday, July 04         Independence Day
Monday, September 05         Labor Day
Monday, October 10         Columbus Day
Friday, November 11         Veterans Day
Thursday, November 24         Thanksgiving Day
Monday, December 26 *         Christmas Day

*If a holiday falls on a Saturday, for most Federal employees, the preceding Friday will be treated as a holiday for pay and leave purposes. (See 5 U.S.C. 6103(b).) If a holiday falls on a Sunday, for most Federal employees, the following Monday will be treated as a holiday for pay and leave purposes. (See Section 3(a) of Executive Order 11582, February 11, 1971.) See also our Federal Holidays – "In Lieu Of" Determination Fact Sheet at

**This holiday is designated as "Washington’s Birthday" in section 6103(a) of title 5 of the United States Code, which is the law that specifies holidays for Federal employees. Though other institutions such as state and local governments and private businesses may use other names, it is our policy to always refer to holidays by the names designated in the law.

Wednesday, December 29, 2021

Chess 960 posible starting positions

Examples in several programming languages

All the positions with the standard ID number

Very good explanation of the rules

B   B   Q   N   N   R K R
4 * 4 * 6 * 5 * 4 * 1     = 1920

Bishops have to be of different colors (4 black squares, 4 whites squares).

There is only 1 possible position for the King and Rooks because it has to go
between the Rooks and there are only 3 squares available at that time.

Because the Knights change color when they move they could be interchanged
without any difference then 5 * 4 should be divided by 2 then
total number of positions = 960.

Tmux commands

# List sessions
# Alias ls
tmux list-sessions
tmux ls

# Create new session
# It is good practice to name sessions
tmux new -s right_window

# Detach a session
Ctrl-b d

# Attach a session using name
tmux a -t right_window

# Use mouse to select pane
Ctrl-b :
# then type
set -g mouse on

# Zoom a pane
Ctrl-b z

# Scroll
Ctrl-b [
# Quit

Backup bash script


Perl sort example

Sorting in Perl with user defined subroutines.

Perl Getopt::Std example

Example of using Getopt::Std module.