Add a OneOf space for exclusive unions (#812)

Co-authored-by: pseudo-rnd-thoughts <mark.m.towers@gmail.com>
This commit is contained in:
Ariel Kwiatkowski
2024-03-11 13:30:50 +01:00
committed by GitHub
parent fd4ae52045
commit 2b2e853536
12 changed files with 353 additions and 5 deletions

View File

@@ -534,6 +534,7 @@ SPACE_KWARGS = [
{"spaces": {"a": Discrete(3), "b": Discrete(2)}}, # Dict
{"node_space": Discrete(4), "edge_space": Discrete(3)}, # Graph
{"space": Discrete(4)}, # Sequence
{"spaces": (Discrete(3), Discrete(5))}, # OneOf
]
assert len(SPACE_CLS) == len(SPACE_KWARGS)