Posts

Cacti

Image
With an eye on California's water shortage, we decided to do some water-efficient landscaping. With enormous help of my sister, we converted a corner of our front lawn into a mini cacti corner. In another corner, far away from playing children, we decided to put some larger, more thorny cacti. Hopefully this way we can keep the garden green with less water!

A Fallen Tree

Image
This weekend a large branch of my neighbor's tree broke and fell into our garden, right on top of our swing and patio furniture. Luckily nobody was hurt, since we all just came back from church when it happened. The swing broke most of the fall and even the solar panels survived! Needless to say I spend the rest of the day cutting wood, very kindly assisted by neighbors from all sides!

Thanks Android Game Users!

The last few weeks, I received many very kind emails as well as positive comments at the Android Market about my games. This has been a very nice contrast with the sometimes rough comments or emails I also get (constructive feedback is always welcome, but please study the rules of the game before you complain :-)). So I just wanted to say thank you to all that took the time to write a nice email or comment!

Trackball Input

Image
By popular request, I have changed the trackball input of Chess for Android slightly. When the trackball cursor hovers over the chessboard, it is displayed as a rectangle that moves one square at the time. When the trackball cursor leaves the chessboard, it changes into the "old-style" cursor that moves several pixels at the time. Please let me know if you like this new input mechanism better.

Are You Really Sure?

Image
Several users requested a confirmation dialog when starting a new game in Chess for Android to avoid resetting a game in progress by accidentally hitting the new game button. Therefore, I just posted v1.5.5 at the Android Market that adds this feature, illustrated below. Although not directly requested, I have added this feature to both Checkers and Reversi for Android as well.

Math Worksheet Generator

Image
My daughter just started to learn addition and subtraction in school. Like a true nerd, I wrote a Java applet to generate math worksheets, so that I no longer have to write out exercises by hand. To try it out, go to math worksheet generator . Click on the top-right +/- buttons to increase and decrease the level of difficulty, click on the ADD/SUBTRACT button to toggle between additions and subtractions, or click anywhere to generate new exercises. Feel free to print the math worksheets for your own use (unfortunately, this may not work for some browsers).

Reversi for Android Update

I made minor improvements to the reversi move generator and evaluation function in version 1.5.5, hopefully resulting in stronger play. Unfortunately, in my excitement I forgot to add a new internal state to the save/restore functionality, which could introduce wrong play if a game was exited and later resumed. This has been fixed in version 1.6 of Reversi for Android. Many thanks to Patrick Barnes for reporting the bug (with a screen shot as illustration!).

Android Updates: Save on Exit

Image
I just posted version 1.5 of Chess, Checkers, and Reversi for Android at the Android Market , all with the much requested "save on exit" feature. If a user exits a game in progress, the game is automatically saved and later restored when the application is restarted. Even if the interrupt happened while the engine was thinking about its move, the game will restart in that state (albeit taking the full allocated time again). Apologies to all users who have been requesting this feature for a while, I just needed to find some time for it.

Dutch Royal Attack

With tears in my eyes I read the news and watched the pictures of the senseless attack on the Dutch royal family by a man who crashed his car through the crowd during the annual Queen's Day celebration. I pray for the victims and those who mourn.

Chess for Android Update

Image
Version 1.4 of Chess for Android is now available at the Android Market with the following new features: Two improvements in the engine: removed unnecessary restriction on search depth and fixed bug that could cause an out-of-bounds exception. The engine now detects draw by a simplified form of three fold repetition. The detection is not complete, since only limited game history is kept; but at least this new feature avoids some very annoying repetitions. Draw by the fifty move was already implemented. A new level "Auto-play" has been added (press the Menu button). If this level is selected, then the next time the engine takes control (make either a move or touch "Reverse sides"), the game is played automatically.

ChessWar and WBEC Ridderkerk

Due to all Android distractions, it has been a while since I posted on BikJump. It recently ended at a somewhat disappointing 54th place in OpenWar 5th Edition . Version 2.01 is now playing in the final of the 5th Division WBEC Ridderkerk edition 16 .

A New Checkers Engine: BikMove

I ported the Java source code of the engine in Checkers for Android into C++ and implemented the parts required to form a plug-in engine for Martin Fierz' CheckerBoard application. The result is BikMove (with an obvious wink to my UCI chess engine BikJump). I also added the ability to query checkers endgame databases based on Martin Fierz' probing code (used with his kind permission). The main features of BikMove are listed below: Checkerboard compliant checkers engine. Iterative deepening, alpha-beta pruning. Queries endgame databases during search. The engine needs some more work to become competitive with others checkers engines, but it already plays what looks to me like decent checkers. Give it a try if you are interested!

Perft for Reversi

As can be seen in previous postings, the perft method is useful to verify the correctness of a move generator. The method traverses the game tree up to various, increasing depths to count all leaf nodes. The results are compared with pre-computed values to isolate bugs. Although the method originated in the chess programming community, the same debugging principle can be used for any board game with deterministic rules. So far, I have used perft to verify the move generation of Chess for Android and, thanks to Martin Fierz , also for Checkers for Android. I was unable to find pre-computed perft numbers for reversi, however. Therefore, here is what is probably the debut of perft for reversi from the initial position, hopefully useful data for aspirant reversi programmers (at depths 9 and up, "passing" moves start to occur; at depths 11 and up, higher leaf nodes in which neither player can move start to occur). DEPTH #LEAF NODES ======================== 1

Checkers Move Generation

I was able to make a small improvement in the checkers move generator (written in Java for the Android SDK). The following table shows run times of several perft depths before and after optimization when run on the emulator (which should mimic actual run times on the phone quite well). DEPTH #LEAF NODES ORIGINAL OPTIMIZED TIME TIME ==================================== 7 179740 2.9s 1.9s 8 845931 14.2s 9.7s 9 3963680 66.3s 45.6s 10 18391564 294.6s 208.7s P.S. Runtimes for a C++ checkers move generator on a 2.2 GHz Core 2 Duo are given at my checkers page .

Perft for Checkers

Martin Fierz kindly extended his engine Cake with a perft feature. Luckily the numbers reported by Cake match the numbers reported by Checkers for Android exactly. Below the numbers from the start position are shown, hopefully useful data for aspirant checkers programmers. DEPTH #LEAF NODES ======================= 1 7 2 49 3 302 4 1469 5 7361 6 36768 7 179740 8 845931 9 3963680 10 18391564 11 85242128 12 388623673