Artificial Intelligence (AI) is an infinitely, complicated subject. Much like the hole that Alice in Wonderland fell down, “How deep do you want to go?” AI requires a specific area in which to function. Relating to videogames, an AI that simulates driving a car is different that an AI that plays tennis. In order to program a decent AI you have to understand the problem (trying to drive a car or play tennis) and be able to program that logic into the computer.
There are many problems when trying to adapt AI routines to MTG Forge. One, MTG Forge’s architecture does not support different AI algorithms. I can’t simply apply min-max and get a better/different AI. (The initial problem I had when trying to apply min-max and other “look ahead” algorithms is that I had an impossible task for copying all of the game data. In theory copying everything is simple, but in practice it is very hard.)
Min-max is an algorithm for two player games that allows the computer to maximize his turn while minimizing his opponent’s. Min-max should be able to answer questions like, “Which creatures should the computer attack with?” but programming it can be very complicated.
Two, even if MTG Forge’s architecture supported different pluggable AI’s they would probably be very complicated. Obviously there could be some “helper” functions so that the new AI wouldn’t have to write everything from scratch. Maybe trying to develop an AI interface for just combat would be a good first step. Creature combat is simple enough to understand and yet complicated enough to be tough. Just answering the question, “When should the computer race?” is hard. (Racing is when you attack each other back and forth.)
I love the idea of AI even though I only know a tiny bit about it. I do know about genetic algorithms and a few other AI algorithms like random hill climbing. I’ve tried to apply min-max to combat, but it is pretty complicated. I like the idea of giving the computer simple plans like “Destroy that big creature” or “Attack and then bounce my creature.” I think even these simple plans would give the AI more depth and personality.
As a side note, not all videogames have sophisticated AI routines. Mario’s enemies tend to be basically brain-dead.