Self-playing games ought to be newer generation's Logo's turtle!
But I think military and other more "physical" simulations likely pre-date all of this; these systems have their own rule systems for the various "pieces" on the "board", and use things like dice and other random number generators to determine how things progress.
There's also probably more than a few fictional stories which set up this idea as well.