Here's an Extended Basic version of the classic board game Stratego where your opponent is the computer. The theme is the battle of Waterloo pitting Napoleon Bonaparte (you, with the blue units), Emperor of France, against the coalition forces led by the Duke of Wellington (the computer, with the red units).
While the AI will put up a stiff defense, its success, or yours, will depend heavily on the initial setup of the forces on the field. The computer will vary its setup from game to game in order to avoid predictability.
Designing the AI was pretty challenging because this is a game of incomplete information, and actually zero information at the start, and so the usual tree searches fail spectacularly. It turns out that programming common sense and strategic acumen is ridiculously difficult, particularly when memory is limited. There is definitely room for improvement, but with under 30 bytes of RAM left I had to make some tough choices, although I think the overall AI strength is pretty decent. At the very least it will not make idiotic mistakes
Being an XB game fitted into 2 separate but linked programs, one for the initial setup and another for the main gameplay, it is pretty slow, so joystick jockeys need not apply. Average response time during the early and late game is about 55 seconds but can take several minutes during the middle game, and a complete game can easily take a couple of hours.
With the help of Senior Falcon and his outstanding XB compiler, we were able to get Stratego to compile! Along the way, both the game and the compiler were enhanced, so make sure you check out the latest version of the latter, ISABELLA 2.0, under the XB development thread.
Now, Stratego runs over 6x faster, with an average response time of 10 seconds only, and it gets shorter as the number of units dwindles! The AI has been beefed up as well since compilation freed up more memory, and I even managed to uncover a couple of deep bugs within the depth of that complex code.
The game is now far more playable from a time-requirement standpoint, and I'm very pleased with the end-product.
This last update does not make any enhancements to the gameplay. It combines the 2 parts of Stratego into one large program that is compiled, thus eliminating the need to save/load data from disk when transitioning between the 2 parts, and in the process reducing the loading delay by a couple of minutes. This is mostly apparent for real hardware users however. Oh and the program now autoloads from XB. The manual has also been updated with the addition of a back cover as well. I think I'm going to officially sign off on this project at this point and call it done.
Stratego Splash.gif 80.95KB 2 downloads
Setup.gif 43.69KB 0 downloads
Setting up the forces
Prepare for battle.gif 40.45KB 0 downloads
Ready for battle!
Attacker wins.gif 42.44KB 0 downloads
Issue orders Emperor.gif 42.42KB 1 downloads
Wellington issuing orders.gif 43.01KB 0 downloads
Napoleon ravaging Wellington's deep lines
Wellington leading counter attack.gif 42.23KB 0 downloads
Wellington attempting a desperate right flank counter-attack
I know where the flag is.gif 42.23KB 0 downloads
Can you guess where the flag is?
Napoleon wins.gif 44.17KB 0 downloads
Napoleon wins the day!
Here's the disk label courtesy of Omega. I do plan on creating a printed manual and disk package in very limited quantities hopefully in the next month or so.
Stratego disk label.png 1.43MB 0 downloads