Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Angry-HEX is an artificial player for the popular video game Angry Birds; it participated in the 2013, 2014, 2015, 2016, 2017, and 2018 Angry Birds AI Competition.

The agent is based on declarative knowledge bases, and features a combination of traditional imperative programming and declarative programming that allows to achieve high flexibility in strategy design and knowledge modelling. In particular, it relies on the use of Answer Set Programming (ASP) and HEX programs.

Logic programming is used for decision tasks such as which target to hit at each shot (tactic gameplay) or which level to play at each turn, and which way (strategic gameplay).

Running the agent (if you have not changed anything and you have installed everything)

  1. Open Chrome on the webpage and make sure you are using the SD version of the game
  2. $ ./ run server
  3. Open another instance of the terminal
  4. $ ./ run client

Running the agent while you are developing

  1. $ ./ set develop (you have to do this only once)
  2. $ ./ install agent
  • you can also reinstall only the Java agent: $ ./ install agent-java
  • you can also reinstall only the dlvhex plugin: $ ./ install agent-plugin
  1. Follow the steps of the above section (Running the agent)

Create a file which contains all files necessary for playing

  1. $ ./ set release
  2. $ ./ archive

How to use the bash scripts



./ command [argument]


install  [all,dlv,dlvhex,box2d,agent,agent-java,agent-plugin]

run      [client,server]

set      [release,develop]

  • install

    • all is the default argument; the parts of the installation (dlv, dlvhex, etc.) will only be installed if they are not present on the system
    • when using another argument (dlv, dlvhex, box2d, agent, agent-java, agent-plugin), a reinstallation of the component is forced
  • run

    • client is the default argument
  • set

    • release is set by default (because this script is implicitly used by the organisers)
    • IMPORTANT you have to set develop once if you want to develop ;)
  • archive

    • creates a file which contains all files necessary for playing



./ command [argument]


install  [all,dlv,dlvhex,box2d,agent]


  • install

    • all is the default argument
    • if no agent is present, a ZIP file will be downloaded (the result of ./ archive)
    • the invocation will be redirected to (the script is part of the ZIP file)
  • run

    • the invocation will be redirected to
  • update

    • the (possibly) new agent will be downloaded and ./ install will be invoked

Detailed description of files and folders

It contains the following folders:

  • dlv
    • Contains the logic programs for the Tactic and the Strategy of the Angry-HEX agent
  • docs
    • Contains the website (GitHub Pages) of Angry-HEX
  • framework
    • Contains the framework provided by the organizers
  • src
    • Contains the main source code of the Angry-HEX agent

It contains the following files:

    • Main installation instructions
    • Scripts to install, run, update and package the agent (the first is for users the second is for developers)
    • Properties files (the second one is specific for the Competition)
  • Makefile, build.xml
    • Files needed for build automation
  • .gitignore, LICENSE,
    • Self-explanatory files