Welcome to the repository for the Animal-AI Olympics competition where you will find all the code needed to compete in this new challenge. Note that for the moment this repo contains only the training environment (v0.5) that will be used for the competition and does not contain any competition tests or information for entering. If everything goes well the competition will be live on July 1st. Until then we will be continually updating with bug fixes and small changes to the environment. However, the general structure will stay the same so it's not too early to start working with the environment. For more information on the competition itself and to stay updated with any developments, head to the Competition Website and follow @MacroPhilosophy and @BenBeyret on twitter.
The environment contains an agent enclosed in a fixed sized arena. Objects can spawn in this arena, including positive and negative rewards (green, yellow and red spheres). All of the hidden tests that will appear in the competition are made using the objects in the training environment. We have provided some sample environment configurations that should be useful for training, but part of the challenge will be experimenting and designing new configurations.
The goal of this first release is to seek feedback from the community as well as to provide the environment for
research prior to the launch of the competition itself. The competition version of the environment will be similar to
this one, however we are open to suggestion (for minor changes) and especially bug reports! Head over to the
issues page and open a ticket using the suggestion
or bug
labels respectively.
To get started install the requirements below, and then follow the Quick Start Guide. A more in depth documentation can be found on the Documentation Page.
You can read the development blog here. It covers further details about the competition as well as part of the development process.
The Animal-AI package works on Linux, Mac and Windows, as well as most Cloud providers.
First of all your will need python3.6
installed. We recommend using a virtual environment specifically for the competition. Clone this repository to run the examples we provide you with. We offer two packages for
this competition:
-
The main one is an API for interfacing with the Unity environment. It contains both a gym environment as well as an extension of Unity's ml-agents environments. You can install it via pip:
pip install animalai
Or you can install it from the source, head to
animalai/
folder and runpip install -e .
-
We also provide a package that can be used as a starting point for training, and which is required to run most of the example scripts found in the
examples/
folder. It contains an extension of ml-agents' training environment that relies on OpenAI's PPO, as well as Google's dopamine which implements Rainbow (among others). You can also install this package using pip:pip install animalai-train
Or you can install it from source, head to
examples/animalai_train
and runpip install -e .
Finally download the environment for your system:
OS | Environment link |
---|---|
Linux | download v0.5 |
MacOS | download v0.5 |
Windows | download v0.5 |
You can now unzip the content of the archive to the env
folder and you're ready to go! Make sure the executable
AnimalAI.*
is in env/
. On linux you may have to make the file executable by running chmod +x env/AnimalAI.x86_64
.
Head over to Quick Start Guide for a quick overview of how the environment works.
If you launch the environment directly from the executable or through the VisualizeArena script it will launch in player mode. Here you can control the agent with the following:
Keyboard Key | Action |
---|---|
W | move agent forwards |
S | move agent backwards |
A | turn agent left |
D | turn agent right |
C | switch camera |
R | reset environment |
We will be releasing further details about the tests in the competition over the coming weeks. The tests will be split into multiple categories from the very simple (e.g. food retrieval, preferences, and basic obstacles) to the more complex (e.g. working memory, spatial memory, object permanence, and object manipulation). For now we have included multiple example config files that each relate to a different category. As we release further details we will also specify the rules for the type of tests that can appear in each category. Note that the example config files are just simple examples to be used as a guide. An agent that solves even all of these perfectly may still not be able to solve all the tests in the categories but it would be off to a very good start.
For now please cite the Nature: Machine Intelligence piece for any work involving the competition environment:
Crosby, M., Beyret, B., Halina M. The Animal-AI Olympics Nature Machine Intelligence 1 (5) p257 2019.
The Animal-AI Olympics was built using Unity's ML-Agents Toolkit.
The Python library located in animalai is almost identical to ml-agents v0.7. We only added the possibility to change the configuration of arenas between episodes. The documentation for ML-Agents can be found here.
Juliani, A., Berges, V., Vckay, E., Gao, Y., Henry, H., Mattar, M., Lange, D. (2018). Unity: A General Platform for Intelligent Agents. arXiv preprint arXiv:1809.02627
On virtual machines the Unity window stays black, observations do get sent to Python however (training is therefore still possible).
- Add protobuf for arena spawning feedback
- Offer a gym wrapper for training
- Improve the way the agent spawns
- Add lights out configurations.
- Improve environment framerates
- Add moving food
-
v0.5 Package
animalai
, gym compatible, dopamine example, bug fixes- Separate environment API and training API in Python
- Release both as
animalai
andanimalai-train
PyPI packages (forpip
installs) - Agent speed in play-mode constant across various platforms
- Provide Gym environment
- Add
trainBaselines,py
to train usingdopamine
and the Gym wrapper - Create the
agent.py
interface for agents submission - Add the
HotZone
object (equivalent to the red zone but without death)
-
v0.4 - Lights off moved to Unity, colors configurations, proportional goals, bugs fixes
- The light is now directly switched on/off within Unity, configuration files stay the same
- Blackouts now work with infinite episodes (
t=0
) - The
rand_colors
configurations have been removed and the user can now passRGB
values, see here - Rewards for goals are now proportional to their size (except for the
DeathZone
), see here - The agent is now a ball rather than a cube
- Increased safety for spawning the agent to avoid infinite loops
- Bugs fixes
-
v0.3 - Lights off, remove Beams and add cylinder
- We added the possibility to switch the lights off at given intervals, see here
- visualizeLightsOff.py displays an example of lights off, from the agent's point of view
- Beams objects have been removed
- A
Cylinder
object has been added (similar behaviour to theWoodlog
) - The immovable
Cylinder
tunnel has been renamedCylinderTunnel
UnityEnvironment.reset()
parameterconfig
renamed toarenas_configurations_input
-
v0.2 - New moving food rewards, improved Unity performance and bug fixes
- Moving rewards have been added, two for each type of reward, see the details here.
- Added details for the maze generator.
- Environment performance improved.
- Issue #7 (
-inf
rewards fort: 0
configuration) is fixed.
-
v0.1 - Initial Release