Duck Hunt AI
Posted on 2011-09-23
Good day everyone. I have a bit of a longer question.
First I should tell you the context of the problem briefly. I have to implement an intelligent agent that shoots "ducks" in the sky (using Java). The sky is just a 2D matrix and the birds can move NORTH, SOUTH, WEST,EAST or STOP. Also, they can change their speeds in any of these directions. For example, at a give time step, a bird could STOP horizontally and accelerate vertically. There are hundreds of birds of 6 different colors (species). The WHITE are the most common (exactly half of all birds) and worth the fewest points, there is only one BLACK that is endangered and if I shoot it i lose the game and there can be other colors as well, or not, depends on the initial random layout. I cannot see the birds' species, I can only observe their movement patters. I also know that birds have habits: MIGRATING means that a bird will fly in the same direction (EAST,WEST, NORTH, SOUTH) more or less along the same line, QUACKING means that a bird will move slowly and erratically and so on, you get the gist. I know that the habits are tied somehow to the species, but I can't see the species, I can only observe the movements, i.e the habits, so this leads me to believe that HMMs would be a solution.
What I have: I have Duck, State and Action classes which basically tell me everything about the past of every duck. I can ask "What was the i-th movement of this duck?", I can ask how many ducks there are, if a duck is dead and anything else I'd need to know.
What I have to do: I need to write a function that says "At t+1 bird X will be doing this: MOVEMENT, VerticalSPEED, HorizontalSPEED", based on what that bird did in the prior turns.. If i get it right, that bird dies and I find out the species. In 240 turns I have to kill as many ducks (EXCEPT the black one) and get as many points as possible. Each time the game starts fresh the patterns change and the habits belong to different birds, so I have to learn by hunting what habit belongs to each bird.
What would be a good place to start? A pseudocode suggestion would be appreciated.
(No ducks will be harmed in the making of this program)