Homework Assignment 4: Project (This page is still being updated)

The project is the central part of this course. Much of your grade (50% of the grade or more) depends on this project.

The thrust of your project(s) is the following. Each of you should explore how to create believable software agents that can play a game. Our emphasis is not so much on creating a new game; rather our interest is in introducing AI ideas in creating players that play games.

To give you some idea, I am thinking loud here on the types of ideas that I want you to explore.

(a) How can we incorporate ideas from AI (classical and connectionist) in computer games?
(b) How do we handle incomplete information? During seaching?
(c) How do we factor in emotion/stress on the part of the agent playing the game? My assumption here is not that stress will necessarily lead to bad decisions. Perhaps, stress may prevent us from making an exhaustive search.
(d) How can we incorporate ideas from neural networks and genetic algorithms in computer games?
(e) How can we incorporate ideas from computational ecology in computer games?
(f) How can we incorporate ideas from game theory in computer games?
(g) How to build game playing agents? Is it a good idea to use a common language like C++ or go for something like SOAR?

Let us explore a little further.

1. Searching. Searching is an important general task in CS. We resort to searching when there is no other general method of solving a problem. Suppose we are choosing a game playing strategy by searching. But the search space is too big. How do we handle the problem? Search problems can quickly get out of hand. Often we resort to heuristics to guide the search process - that is to select the next state. Most heuristics help in improving individual searches. Can we develop cooperative heuristics where the work done by one agent can help simplify the search by another agent. This can be thought of as distributed AI problem.

Some Ideas:

1. Cooperative Search: There are two types of cooperation. One is the type where several agents divide the problem and solve it in parallel, very much like a parallel computer solving a large problem.

Another way of looking at this is to think in terms of asynchronous independent agents that can solve problems from their local perspectives -  involving uncertain and incomplete information.

In a game context, cooperation involves a collection of agents (or advisors) that solve a problem in a restricted domain while
communicating information or hints.

Another way of looking at cooperating processes is to think in terms of genetic algorithms. Here members of a population exchange information through crossover (transmission of genetic material from parents to offspring).

Another way of looking at cooperating processes is to think in terms of neural networks. Here the output of a neuron affects the behavior of another neuron receiving information from it.

Cooperative searches are based on modifying individual search methods. For example, we can look at methods that are complete and incomplete. Complete methods systematically examine states until they eventually find a solution or terminate when no solution exists. Incomplete methods search opportunistically and may miss some states; hence they can never guarantee that a solution does not exist.

2. Can we build games by incorporating mathematical models of interaction between individual agents, such as formation of coalitions to play a game?

Spin glass models (Or equivalently, Hopfield Net in neural nets) can come in handy. Actually, one can think of a lattice and a player sitting at each lattice point. Then we can generalize the Prisoner's dilemma to many players and study the formation of coalitions among players.

3. Can we introduce fuzzy logic and probability ideas?

4. How can we use State Machines

The state machine allows us build-in some memory. When we use state transition diagrams we can use each state to represent, say, a mode of operation of the machine.

The next state is typically dependent upon the current state and the input. Suppose wedefine three states for a creature: Alive, dead, in the process of dying.

We can now create some code that looks like this.

#define ALIVE 0
#define DEAD 1
#d3fine DYING 2

int alien_state = ALIVE;

//begin main loop

while (!done)
        {
        if (alien_state =ALIVE)
            {
        do some thing(s) with the alien creature
        if (alien has been shot by a player)
                {
                //change the alien state to DYING
                alien_state = DYING;
                }//endif
            } endif alive
        else
        if (alien_state =DYING)
            {
            show death sequence
           //test if death sequence is over
            if (death sequence is done)
            {
                //change the alien state to DEAD
                alien_state = DEAD;
                }//endif death is done
            } endif dying
        else //alien must be dead
        {
        //alien is dead
kill alien datastructure and take alien out of the game

Imparting Personalities to Creatures