MarioArgAI is a project mainly written in Java, it's free.
Ai for a competition
To run the current agent in development: from the ./build/classes directory type:
java ch.idsia.scenarios.Play ch.idsia.ai.agents.ai.mine.BasicMineAI