Thursday, April 5, 2012

Thought experiments for Automated Starcraft Players

http://graphics.stanford.edu/~mdfisher/GameAIs.html
Starcraft 2 Automated Player

This is a brilliant writeup of both the architecture and some of the issues to consider when building an automated player for a game.

There are so many little bits of wisdom in this article that I want to spend time thinking about and hacking on.

First thoughts.

Interesting AI architecture. It (if I read it correctly) seems to use a kind of switched swarm intelligence for some of the decision making.  Which makes sense when you consider the intricacy of trying to build a single unified decision making engine that could handle all the different individual units, their micro objectives and integrate that into a macro plan.  (I would do that for a Phd with bells on...) kind of skynet for Starcraft....

The emergent strategies that have been implemented to deal with chaotic and imprecise events within the environment are interesting.  Kind of obvious now its been pointed out.  Again this moves a solution more toward a swam model where each agent/thread/program/entity deals with a small part of the map or a small objective as opposed to a large monolithic algorithm that would be a monster to debug. The tradeoff being that each of these small programs has loose coupling with all the others. They cannot share their internal micro state and need to implement some form of inter-entity communication if they need to cooperate.  Which gets us back to resource competition, group decision making and all the other fun of peer agent models. 

It's interesting to note that there are some higher level constructs in the architecture that are delegated to task switching and managing the stream of data comming in about the game state.  Currently these are very single purpose; making debugging much simpler.  But another task could be developed to run above the agents to implement a coordinating role and implement the "master plan" for the play session. (yet another Phd...)

The mirror driver implements the equivilent of a "sense" mechanism. We could describe it as "sight", but it does not share the same type of information stream as we understand "sight" in a biological form.  Still its a fairly wide channel of information that is then internalised and used to generate a state represenation of the AI's environmental reality. 
This state represeation will also include (expliclty or implicitly) some encoded knowledge about the artifacts in that environment.  The number of different possible states that each individual artifact can exist in, the inter-artifact relationships, communications and inter-actions etc.  It would be an interesting datascape to look at (yet another Phd...)

Dealing with the scene perception and understanding is interesting. It would be fun to offload this information to a different processor(or network) and see exactly how rich an internal representation could be generated from the information stream. 

Dealing with the chaotic nature of the interaction with the opposing player, the state changes of the particular units and the static and dynamic elements of the environment is an interesting set of problems. (Called housekeeping in the article) Which again would generate an interesting set of rules and emergent behaviours in a good learning system.

It would be an interesting exercise to run a few hundred games on the same map and build up an understanding of the potential of each map.  This may be an effective mechanism for debugging maps. Both the functional level debugging( finding holes and bugs ) and the logical debugging (balancing, removing or adding choke points, tuning difficulty etc).   This is something I have been wanting to do for Chess for a while, is to calculate the true value of every square on the board. Probably someone has already done it... I just want to do it in as a multi-dimensional analysis, to see how many hidden variables I can tie to simple positional space, then to particular pieces and finally to particular strategic choices.  Since there are only 32 peices, it should not take too long.  Just have to raid a couple of databases for some game records.  (yet another Phd...)

There is a fun little element mentioned called "Personas" which seems to be an undeveloped mechanism to mess with opponent players minds during the game.  Its a simple blind system that uses a strategy of tying complex chat sentences during play....
Not sure who effective this would be but its an interesting strategic possibility.  Attack the players outside the game environment. 

Using a console overlay seems to be cute but wasteful.  I would build a whole seperate GUI for monitoring the AI. (Benefit of multiple monitors I guess. )

At the end of the day, this is a great framework to build on, but seems to consist of a lot of fairly hard coded routines and strategies that are played out by a quite rigid system.  Yes its fast, yes its beyond human capacity... but I don't feel like its moving beyond being a very complex script.  I want to see my artifical children grow beyond my capacity.... not just leaverage hardward speed as a blunt instrument.





No comments:

Post a Comment