The code requires Prolog and must have swipl installed. Here is a description of what the agent does:

From the computer vision output we abstract to a qualitative scene representation(for examples see Prolog/level directory, files are generated when agent isplaying). The scene representation is a Prolog file which is then read in byProlog and a shallow planning (only first step ist performed) is done to findthe best strategy/shot combinations. Strategies are something like "max damage","deepest penetration into some structure". Essentially, we run a "affordance-based"approach of destruction implemented as rules: if there's TNT, we want to make it explode,if there's a structure that can be tipped over, we go for that, ...From the list of best shots, a random selection method picks a shot based on itsestimated score, ie, shots believed to be best are most likely chosen. Last but notleast, we have a random level selection method. Once every level has been tried, wechoose a level with a probability according to the estimated increase in the overallscore possible. The estimation score is countered with the number of attempts wealready spent on that level, so we lower expectations if we try over an over.For computing estimated score we just count number of objects and pigs in sceneand the number of birds ready to shoot.