Emergent behavior in the game AI war

I just finished reading a really good 6-part blog post about game design, emergent behavior, and artificial intelligence by the creator of the game AI War.

A quick overview of AI War stolen from the wiki for the game:

  • Cooperative RTS (real time strategy)  game (1-8 players) with numerous unique ship types.
  • Challenging AI in 26 styles, 20 additional with the first two expansions; many with unique superweapons.
  • Insanely high unit counts: 30,000+ ships in most games.
  • Lengthy campaigns featuring up to 120 simultaneous planetary battlefields.
  • Different Every Time: 16 billion procedural maps, each with specific units.
  • A focus on deep strategy that you don’t get in most RTS games.
The blog goes into his general design approach which is different from many other RTS games on the market. Most AI in this genre seeks to imitate how a human player would act, and is usually easily exploited or has to cheat to offer experienced human players any challenge. The developer of AI war took a different approach, instead of trying to imitate human players he just tried to create a challenging adversary. Instead of fighting a poor imitation of a human player, its like fighting skynet.One of the most interesting parts of the blog series was the type of AI he used for individual units. He explains in the post that the traditional mechanism for creating AI is to use branching decision trees. So if situation A occurs do action C, if situation B occurs do action D.

In AI war when enemy ships jump into a solar system they have to determine which targets they want to attack. Instead of using branching decision trees, he created a preference system for targets. (what follows is a general idea of how it works, but the creator would probably cringe if he read my description) For example an expensive player factory may be worth 5 points while a cheap one might be worth 3 points. If the expensive one is defended, that is minus 2 points. If the cheap one is vulnerable to the type of damage that a ship does, that is plus 1 point. Add in a bit of randomization and fuzzy logic (changing how many points get added or subtracted) and you get a fleet of ships that is very responsive to a situation.Reading the blog gave me a little more hope for my own project of making economic simulation games. My first introduction to programming had me looking at decision trees, and that had me very worried. It has also made me re-think exactly how I should approach a game. Trying to predict humans is the fatal flaw of any policy maker, and perhaps trying to imitate them is the fatal flaw of game AI programmers.

Introducing Economics

How should we introduce economics to the interested public?

This year I have the privilege of helping to run ICES’ High School Economics Workshops.  In doing so, I get to introduce interested students to the economic way of thinking, and take them on a romp through all the various sub-fields, and analyze all the classic economic & policy problems from minimum wages to rule of law.  But the most important and most difficult (at least in my view) lecture is the first one – a cold introduction economics.

I’ve always thought that Principles courses are the most important in undergraduate economics departments – they’re the classes that most students will take (by requirement) and it will be their only exposure to [good] economics, quite possibly in their lives.  Don’t worry about the actual Econ majors – sure they’re important too, but there’s several courses in Micro, Macro, and 3 or 4 field courses for them to hone their skills and beliefs.  I’ve learned from some of my mentors and professors that Econ 101 is really the chance to correct all of the fallacious beliefs that today’s youth have about the world, and replace them with solid, economic thinking.

If we’re being honest, in Econ 101 we’re spreading “good” propaganda to counter all the “bad” propaganda that students have been exposed to their whole lives (and will continue to be overwhelmingly exposed to).  It’s Econ 101 that correctly teaches that protectionism, tariffs, minimum wages, & government regulation tend to be bad, decentralized markets & voluntary cooperation tend to be good, and that we need to restrain ourselves from our overconfidence in forseeing unintended consequences.  It is often the first course (maybe the only course, other than those in philosophy) that actually teaches people to critically analyze their sincerely-held beliefs.

So how do you teach it?  What do you focus on?  What’s the style?   Continue reading