This is my Connect 4 game for the PDA running Windows Mobile. The current version is designed for screen resolutions of 240x320 pixels. It also works with higher resolutions, but then it only uses a 240x320 portion of the screen. Connect 4 Mobile offers loading/saving games and 3 difficulty levels. Human players with average playing strength will find an interesting opponent.
My program doesn't come with an installer. To install the game on your Pocket PC, just unpack the archive to your desktop PC and use ActiveSync or a similar technology to copy the program file ("ppcConnect4.exe") into a directory on your Pocket PC. Then run it from the File Explorer.
The archive also contains a file called "connect4.exe". This is a Win32 version of the game that runs in the console without graphical interface. It plays a bit stronger in experienced mode and offers a "human mode" as explained below.
Since my school days I'm interested in artifical intelligence, and after having written Magic Chess using PHP in 2005, this interest resulted also in writing a little Connect 4 game (this time using C++ instead of good ol' Delphi) in April 2006. It offers 3 difficulty levels (beginner, advanced, experienced) and a "human mode" in which the CPU plays less precise and thinks longer -- no kidding. I didn't want the CPU to take more time in human mode, but this was a consequence of the less precise evaluation results. (Making a CPU opponent more humanlike is not as easy as one may think at first glance.)
My program does not care about thinking time, it just thinks until it reaches a certain search depth. Furthermore, it implements a big evaluation function that does 126 loop cycles with many memory accesses every time it is called. Therefore, my game is far from playing as good as the more advanced programs out there. (The evaluation is not to blame for this, because despite being slow, it is quite exact. The game lacks iterative deepening.) But then, why did I write it? Because I wanted to -- just for fun.
Then I ported the program to the Pocket PC and added a graphical interface and loading/saving of games. Now, the mobile version is my preferred version of the game. (The human mode is not available here.)
Sometimes it can happen that the CPU makes a move that appears senseless because it will lose in one or two moves. This behavior results from the fact that the CPU is "emotionless": it has very well discovered that it will lose, so it now doesn't matter what move it makes. It just makes the next best one. A human would play differently: if he/she discovers that he/she will lose, he/she will nevertheless make a move that "fights".
This circumstance can lead to situations that appear strange to a human: the CPU makes a "stupid" move and the human player wonders whether the CPU has forgotten the rules because this move leads to its early defeat. The answer is: no, the CPU doesn't forget anything. It just has discovered that it will lose the game inevitably in the future, so it now sees now "reason" to try to win the game. I know that this behavior is kind of incomprehensible for a human player, because a human always assumes the possibility that the opponent makes a "mistake" so that the game still can be won. Unfortunately, this is a strategy that is not so easy to teach the CPU.
Connect 4 Mobile is freeware. That means, you may distribute it freely, but only in "complete and unchanged state". Connect 4 is "complete" with the three files ppcConnect4.exe, connect4.exe and readme.txt, bundled in the original ppcconnect4.zip file. FREEWARE DOES NOT MEAN PUBLIC DOMAIN OR OPEN SOURCE. I hold all rights.
If you find any bugs, please mail me!