Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ozan Catal
Animal Ai Env
Commits
e5636bc0
Commit
e5636bc0
authored
Sep 11, 2019
by
Benjamin
Browse files
fix bugs curriculum & meta-curriculum
parent
381cd367
Changes
4
Hide whitespace changes
Inline
Side-by-side
examples/animalai_train/animalai_train/trainers/curriculum.py
View file @
e5636bc0
...
...
@@ -57,12 +57,13 @@ class Curriculum(object):
'but {3} were found'
.
format
(
key
,
location
,
self
.
max_lesson_num
+
1
,
len
(
configuration_files
)))
folder_yaml_files
=
os
.
listdir
(
location
)
folder
=
os
.
path
.
dirname
(
location
)
folder_yaml_files
=
os
.
listdir
(
folder
)
if
not
all
([
file
in
folder_yaml_files
for
file
in
configuration_files
]):
raise
Curriculum
(
'One or more configuration file(s) in curriculum {0} could not be found'
.
format
(
location
)
)
self
.
configurations
=
[
ArenaConfig
(
os
.
path
.
join
(
location
,
file
)
for
file
in
yaml_files
)
]
self
.
configurations
=
[
ArenaConfig
(
os
.
path
.
join
(
folder
,
file
)
)
for
file
in
yaml_files
]
@
property
def
lesson_num
(
self
):
...
...
examples/animalai_train/animalai_train/trainers/meta_curriculum.py
View file @
e5636bc0
...
...
@@ -34,7 +34,7 @@ class MetaCurriculum(object):
yaml_files
=
[
file
for
file
in
os
.
listdir
(
curriculum_folder
)
if
(
'.yaml'
in
file
.
lower
()
or
'.yml'
in
file
.
lower
())]
for
curriculum_filename
in
json_files
:
brain_name
=
curriculum_filename
.
split
(
'.'
)[
0
]
brain_name
=
curriculum_filename
.
split
(
'.'
)[
0
]
curriculum_filepath
=
\
os
.
path
.
join
(
curriculum_folder
,
curriculum_filename
)
curriculum
=
Curriculum
(
curriculum_filepath
,
yaml_files
)
...
...
examples/configs/curriculum/5.yaml
0 → 100644
View file @
e5636bc0
!ArenaConfig
arenas
:
0
:
!Arena
t
:
500
items
:
-
!Item
name
:
Wall
positions
:
-
!Vector3
{
x
:
-1
,
y
:
0
,
z
:
10
}
-
!Vector3
{
x
:
-1
,
y
:
0
,
z
:
20
}
-
!Vector3
{
x
:
-1
,
y
:
0
,
z
:
30
}
-
!Vector3
{
x
:
10
,
y
:
0
,
z
:
-1
}
-
!Vector3
{
x
:
20
,
y
:
0
,
z
:
-1
}
-
!Vector3
{
x
:
30
,
y
:
0
,
z
:
-1
}
colors
:
rotations
:
[
90
,
90
,
90
,
0
,
0
,
0
]
sizes
:
-
!Vector3
{
x
:
1
,
y
:
5
,
z
:
9
}
-
!Vector3
{
x
:
1
,
y
:
5
,
z
:
9
}
-
!Vector3
{
x
:
1
,
y
:
5
,
z
:
9
}
-
!Vector3
{
x
:
1
,
y
:
5
,
z
:
9
}
-
!Vector3
{
x
:
1
,
y
:
5
,
z
:
9
}
-
!Vector3
{
x
:
1
,
y
:
5
,
z
:
9
}
-
!Item
name
:
GoodGoal
positions
:
-
!Vector3
{
x
:
-1
,
y
:
0
,
z
:
35
}
sizes
:
-
!Vector3
{
x
:
2
,
y
:
2
,
z
:
2
}
-
!Item
name
:
Agent
positions
:
-
!Vector3
{
x
:
-1
,
y
:
1
,
z
:
5
}
\ No newline at end of file
examples/configs/curriculum/Learner.json
View file @
e5636bc0
...
...
@@ -3,11 +3,14 @@
"thresholds"
:
[
0.1
,
0.3
,
0.5
0.5
,
0.6
,
0.7
],
"min_lesson_length"
:
100
,
"signal_smoothing"
:
true
,
"configuration_files"
:
[
"0.yaml"
,
"1.yaml"
,
"2.yaml"
,
"3.yaml"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment