En-passant and castling

About once a week, I get an email from a user who claims that Chess for Android makes an illegal move with the pawn or king. Invariably the user is not familiar with en-passant or castling. Therefore, I decided to post a brief summary of these rules.

In the en-passant capture (click for more details), a pawn that just moved two squares can be taken by an opposing pawn as if it only moved one. To perform this move in Chess for Android simply move the pawn as if making the capture, as illustrated below.

The castling move (again, click for more details) involves the king and one of the rooks. The king moves two squares to the left or right while the rook jumps over the king to the adjacent square. The move is only allowed if neither piece has moved before, the path between the pieces is clear, and the king is not in check or crosses a square where it would be in check. To perform castling in Chess for Android, simply move the king two squares to the left or right, as illustrated below.

New Game and Undo

I just posted version 2.1.1 of Chess, Checkers, and Reversi for Android at the Android Market that allows starting a new game or undoing the last played human move while the computer is thinking. In the older versions, this could only happen during the human player's turn. The latest releases remove that unnecessary restriction.

As before, keep in mind that each undo takes back only one half-move (ply). This means that each undo effectively switches the side-to-move. Either use "Switch Side" or make your move on the board to start the engine again.

Status Bar Back!

Although many users seem to like the new full screen, some users really want to see the status bar at all times. Therefore, I just released versions of all my Android games that give the choice between hiding or showing the status bar (in both cases, the screen is still used more efficiently than in the older versions).

This is how a screen without status bar looks.

To enable the toolbar, press the menu button and select "Options".

Then de-select the "Full Screen" option to get the status bar back.

Changing the Board or Pieces

The new release of Chess for Android gives a choice in board style and chess piece sets (others may be added later). To change, press the menu button, which will give you the following screen.

Then, select "Options", which will show you the following choices.

To switch from a wooden board to a more classic board, de-select the "Wooden Board" button. The piece set can be changed similarly. After this, the chess board has a completely different appearance, as illustrated below.

Checkers for Android supports the same choice in board styles.

Android Updates

I just posted v2.0 of Chess, Checkers, and Reversi for Android at the Android Market with the following improvements:

=> Small, normal, and large screen size support.
=> Full screen board layout.
=> On screen buttons moved to menu.
=> Unified trackball cursor.
=> More levels of strength.

In addition, chess has been improved with:

=> Choice of two chess piece sets.
=> Rotating board.

Full Screen Chess

Her is a preview of the upcoming Chess for Android on a small, normal, and large screen. The full screen is used for the board layout. It also uses a new chess set, designed by my sister Elisabeth (awesome job, thanks!). Other upcoming improvements include board rotation (so that the player can see the pieces from the perspective of either white or black), a choice in chess sets, and an enhanced menu (rather than mixed on-screen and menu buttons).

Full Screen Android

While preparing my applications for the wider variety of screen sizes, I also eliminated the title bar and "wooden" border in favor of a larger board size. Especially in landscape mode and for the upcoming smaller screens, this will hopefully enhance the playing experience.

As a preview, a screenshot of Reversi for Android before and after shown below (ignore the stuff on the right for now; that is subject to change too). Checkers and Chess for Android will change similarly.

Vectorization Code Samples

It has been a long while since I published The Software Vectorization Handbook but occasionally I get an email on the topic. Recently someone asked me whether I could make the examples in the book available electronically. Luckily, I found all examples in my older archives, and I posted code samples on my website.

Multiple Screen Sizes

Up to now, my Android applications assume a fixed screen size (HVGA 320x480) and, although portrait and landscape views are supported, the code that implements board layout is not general enough to deal with all sorts of screen sizes.

Android is designed to run on a variety of devices with different screen sizes and resolutions, however, and starting with version 1.6, multiple screen sizes should be handled.

Just for fun, I tested how my applications would run on various screen sizes. The screen shot for reversi is shown below. As expected, I have some work to do to make my applications more compliant with the latest extensions. This also may give me an excuse to implement some of the other requested features (such as rotating the board when playing black in chess).

Back to BikJump

November last year, I posted a blog entry on my progress with "Deep" BikJump, i.e. adding multi-threading to my engine to speedup the search. Due to many distractions, I have not worked on that feature since that posting....

The chess engine bug is starting to itch again, however, so I decided to pick this up. Hopefully I can release a SMP version of BikJump soon!