Image 01

21st Century AI

A blog about achieving meaningful Artificial Intelligence

Posts Tagged ‘Chris Crawford’

Bad Game AI / Good Game AI (Part 1)

Thursday, June 9th, 2011

Most game AI is bad AI. Let’s be honest; it’s not just bad, it sucks.

I’ve been writing and playing computer games since the early 1980s and I haven’t seen even a modest improvement in the quality of computer opponents. There are a few notable exceptions – and we’ll get to them shortly – but, the vast majority of commercial games that are released were developed with little thought, or budget, given to AI.

So, since it’s such a short list, let’s start with a few computer games that have good AI:

Computer Chess. Any computer chess program that is available today, including ‘freebie’ online Java applets will kick your ass. Back in the ‘70s I had an ‘electronic chess game’ that played as well as I did (I was about a 1600 level player at the time). The game had various levels of AI; but all that changed was how much time the machine was given to make a move. If you put it on the top level it would take forever contemplating the all the responses to the opening P-K4.

So, why was chess AI pretty good thirty-five years ago and even better now? There are a couple of reasons, the first being that chess can be divided into three ‘phases’: the opening, the middle and the endgame. Chess openings are very well understood and there are number of ‘standard’ texts on the subject such as Batsford Chess Openings Volume 1 and 2. These chess openings are available in various file formats and are easily integrated into a chess engine. So, until the program is ‘out of book’ the most important moves, the opening moves, are expertly played by the program without any AI at all. There are also books for endgame positions. So, really, the only difficult area for chess programs is the middlegame.

1st Chess problem solved by computer

1st Chess problem solved by computer by Dr. Dietrich Prinz with the Manchester Mark 1 in 1951 (White to mate in two. The solution is: R - R6, PxR. P - N7 Mate.)

There are dozens of very good articles, papers and books on evaluating chess positions using heuristic evaluation function. Here’s a pretty good page on the subject, even though it looks like all the picture links are broken: http://www.cs.cornell.edu/boom/2004sp/ProjectArch/Chess/algorithms.html ). And here’s a link to a series on building a chess engine: http://www.gamedev.net/page/resources/_/reference/programming/artificial-intelligence/gaming/c

hess-programming-part-vi-evaluation-functions-r1208 .

Chess was one of the first games to be implemented on computers. The first chess problem solved by a computer see picture) was done by Dr. Dietrich Prinz with the Manchester Mark 1 in 1951 (see picture, right).

Though I could be wrong, I think Dr. Prinz’s program simply employed brute force to solve the problem.

So, why is it comparatively easy to find/write good chess AI? Opening and endgame databases are readily available, evaluation functions for board positions are well understood and (I suspect I’ll get some flak for saying this) it’s a relatively easy game (at least to program, not to master). Also, there are not a lot of pieces, their moves are restricted, the rules of the game are simple and the board size is fixed.

Chris Crawford’s Patton vs. Rommel. Crawford’s Patton vs. Rommel was a wargame that came out in 1987. On the PC (remember this was before Windows) it ran in 640kb (and that included the operating system). The display was 640 x 200 x 2, if I remember correctly (see screen shot).

Chris Crawford's Patton vs. Rommel

Chris Crawford's Patton vs. Rommel (1987)

I haven’t played the game in over 20 years, but I remember being very impressed by the AI, specifically how the program had a ‘feel’ for the tactical situation. A very important part of the game was the ‘road net’. Units moved much faster on roads and it was easy to get your units caught up in traffic jams. When that happened the AI would warn the user. This really shocked me when I first played the game. Chris employed what he called ‘geometric AI’ in Patton vs. Rommel. He goes into more details in his book, “Chris Crawford on Game Design,” (http://www.amazon.com/Chris-Crawford-Game-Design/dp/0131460994).

 

There are plenty of great games out there, but that’s not what this post is about. The question is what games have good AI? I’m going to need to think about this and see if I can add some more titles to the ‘good AI’ list, because I sure have a ton for the ‘bad AI’ list.