Commit 53fda1fe authored by Benjamin Beyret's avatar Benjamin Beyret
Browse files

add documentation curriculum

parent 639d67e6
......@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='animalai',
version='1.0.5',
version='1.1.0',
description='Animal AI competition interface',
url='https://github.com/beyretb/AnimalAI-Olympics',
author='Benjamin Beyret',
......
......@@ -20,7 +20,17 @@ a meta-curriculum.
## Example
An example is provided in [the example folder](../examples/configs/curriculum). The `json` file contains:
An example is provided in [the example folder](../examples/configs/curriculum). The idea of this curriculum is to train
an agent to navigate a maze by creating maze like structures of perpendicular walls, starting with a single wall and food,
adding one more wall at each level. Below are samples from the 6 different levels.
:--------------------:|:-------------------:|:-------------------:
![](Curriculum/0.png) |![](Curriculum/1.png)|![](Curriculum/2.png)|
:--------------------:|:-------------------:|:-------------------:
![](Curriculum/3.png) |![](Curriculum/4.png)|![](Curriculum/5.png)|
To produce such a curriculum, we define the meta-curriculum as the following `json` file:
```
{
......@@ -71,9 +81,15 @@ except for the `configuration_files`. From the ml-agents documentation:
The `configuration_files` parameter is simply a list of files names which contain the lessons in the order they should be loaded.
Note that if you have `n` lessons, you need to define `n-1` thresholds.
## Training
Once the folder created, training is done in the same way as before but now we pass a `MetaCurriculum` object to the
`meta_curriculum` argument of a `TrainerController`.
We provide an example using the above curriculum in [examples/trainCurriculum.py](../examples/trainCurriculum.py).
Training this agent, you can see the lessons switch using tensorboard:
![](Curriculum/learning.png)
![](Curriculum/lessons.png)
......@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='animalai_train',
version='1.0.5',
version='1.1.0',
description='Animal AI competition training library',
url='https://github.com/beyretb/AnimalAI-Olympics',
author='Benjamin Beyret',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment