This reminds me of the excellent shareware game for the Mac called RoboWar [1] by David Harris. In it, you programmed a robot to destroy other programmed robots in an arena. You could spend points on different weapons, shields, and processor speed.
The programming language was a custom stack-based language like Forth. It worked quite well for its purpose, as you could easily count instructions.