beyretb / AnimalAI-Olympics

Code repository for the Animal AI Olympics competition
Apache License 2.0
573 stars 84 forks source link

fix curriculum order #71

Closed susumuota closed 5 years ago

susumuota commented 5 years ago

Hi! I think I found a minor bug.

List items in yaml_files are ordered by os.listdir(curriculum_folder) but I think they should be ordered by user settings in Learner.json (self.data['configuration_files']). So I fixed yaml_files to configuration_files.

Fortunately, in example curriculum settings, os.listdir(curriculum_folder) and self.data['configuration_files'] are same but you can confirm this bug by Learner.json like,

{
  "measure": "reward",
  "thresholds": [
    -1.0,
    -1.0,
    -1.0,
    -1.0,
    -1.0
  ],
  "min_lesson_length": 1,
  "signal_smoothing": true,
  "configuration_files": [
    "5.yaml",
    "4.yaml",
    "3.yaml",
    "2.yaml",
    "1.yaml",
    "0.yaml"
  ]
}

It's expected to run from 5.yaml to 0.yaml but actually it runs from 0.yaml to 5.yaml. This patch should fix it. I also added a log item that shows configuration filename for convenience.

I'm really enjoying this competition! Thank you for organizing! Susumu

beyretb commented 5 years ago

You're right, thanks for catching the issue! I will put this in a v1.1.1 release then