Hide

Problem B
Duck hunt in Flatland

Game Concept

Though this is a one person version of the game, the game was originally meant for 2-6 players and was designed as a Nintendo TV-video game. The controllers were plastic guns with light sensors that could be aimed at the television to "shoot" the ducks on the TV screen.

This version of Duck Hunt is a very simplified version of the original game, the notable difference being that it takes place in the two-dimensional realm of Flatland: There is only one bird, which can fly in three different directions from the perspective of the player (Tip: Construct the HMM you want to train with 3 as the number of emissions and states). The player has to observe the flight pattern of the bird and predict the next move in order to shoot it down. If the prediction is correct, the player will hit the bird and gain one point. If the prediction is wrong the player will miss the bird and lose one point. The round is over when the bird is shot or when the time runs out.

AI Perspective

This simplified version of the game can be broken down into two main, dependent, topics:

  • Predicting the flight trajectory of the birds so that they can be shot down.

  • Make decisions to shoot or not based on the confidence of prediction of bird species and flight trajectory.

Provided code

A basic program will be provided for you in each of the supported programming languages. The program, as it is provided, is fully functional, but never shoots.

You should modify the player class and you may also create new classes and files. The files included in the skeleton may be modified locally but keep in mind that they will be overwritten on Kattis (except for Player.cpp/hpp/java). You only need to upload the player class, and of course any additional files you have created.

In addition to this, you will receive a HMM class along with the skeleton which already contains solutions to some HMM-related problems. If you use it, you must also upload the HMM class to Kattis - it will not be overwritten and so you can also change it if you want.

C++ code skeleton: http://www.csc.kth.se/utbildning/kth/kurser/DD2380/ai15/duckhunt_skeleton_cpp.zip Java code skeleton: http://www.csc.kth.se/utbildning/kth/kurser/DD2380/ai15/duckhunt_skeleton_java.zip

Input

Your interface with the judge is the player class.

The shoot method of the player class will be called for each time step. The guess method will be called after a round ends. The game state and a deadline are passed as parameters to these functions. The game state contains the birds and their movements so far. The deadline can be used to avoid timeouts.

The guess method of the player class is called after each round. The final game state of a round is passed as a parameter along with a deadline.

The reveal function of the player class is called after guessing, and will reveal the species for the birds you made guesses for.

Note that you may guess the species of the bird in this particular assignment, but you will not gain or lose any points for doing so (that would also be silly, since there is only one species in this version).

Output

The skeleton handles all the output for you. Avoid using stdin and stdout. (Use stderr for debugging.)

Please log in to submit a solution to this problem

Log in