The GVG-AI Framework

Looking for sample controllers? Have a look at our Sample Controllers for inspiration.

Creating a Controller

You can create a controller for the GVG-AI competition just by creating a Java class that inherits from This class must be named and its package must be the same as the username you used to register to this website (this is in order to allow the server to run your controller when you submit). This class must implement two public methods:

As you can see, both methods receive two parameters:

Finally, the method act returns an action of the enum type Types.ACTIONS. The typical values for this type are: ACTION_NIL, ACTION_UP, ACTION_LEFT, ACTION_DOWN, ACTION_RIGHT and ACTION_USE. The first element indicates no action, the next four indicate movement actions, and the last one is used to execute an action (depending on the game, this could mean different things).

Be aware that not all games will allow the agent to execute all actions of the type Types.ACTIONS. It is the agent's responsibility to return an action that is allowed for the game being played at the moment. The list of available actions for the given game can be obtained calling the StateObservation method getAvailableActions(), that returns an object of type ArrayList<Types.ACTIONS>.

- Go Home -