Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

Controller Limitations

Finn edited this page May 21, 2018 · 4 revisions

The player controllers that competitors write for the competition are limited in three important ways: time, memory, and access.

Time

A controller is limited to 60 seconds in a single match. However, there is no per-turn time limit. In other words, it is like a chess timer, and competitors can choose to divide the given time as they see fit.

Memory

In the competition, controllers will be run within a separate JVM from the actual game engine. This JVM will be limited to 32 MB of heap space.

Access

There are some methods within the Java libraries that you are allowed to call (for example, creating a new LinkedList) but there are other methods that you are not allowed to call (for example, writing to a File). A full list of allowed and disallowed classes and methods is available in the runner source code. Any method listed in allowed-methods.txt is allowed, and any method listed in disallowed-methods.txt is disallowed. If a method is not listed in either, it is judged by its class, whether it's in allowed-classes.txt or disallowed-classes.txt. If its class is also not listed, it is judged by its package, whether it's in allowed-packages.txt or not. These restrictions apply only to classes in the java libraries, not classes that you write.

Because we use stdout to communicate with the game engine, we don't allow your code to call System.out.println. Instead, you can use the logger provided to your Controller class. See the Logging page to see how to use the logger.

Note that the allowed methods are subject to change. If a method is allowed that makes an unfair exploit possible, please tell us so that we can disallow it. If a method is disallowed that is harmless and you would like to use, please let us know.