Oops, sorry, I posted a link to the jar file. Here is the correct source code:
http://aibirds.org/2016-papers/BamBird_2016_source.zipThe 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 is
playing). The scene representation is a Prolog file which is then read in by
Prolog and a shallow planning (only first step ist performed) is done to find
the 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 its
estimated score, ie, shots believed to be best are most likely chosen. Last but not
least, we have a random level selection method. Once every level has been tried, we
choose a level with a probability according to the estimated increase in the overall
score possible. The estimation score is countered with the number of attempts we
already 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 scene
and the number of birds ready to shoot.