hardbyte / hardbyte/sorting-gym
Tools expect samples from a space to be a consistent size
- Dominant language
- Python
- Stars
- 8
- Forks
- 0
- Avg merge
- 8h 7m
- Merged PRs (30d)
- 1
Description
Initially for actions I've introduced and used the `DiscreteParametric(space)` type, but samples from this space
are not constant sized which means ML/RL frameworks have a hard time when trying to allocate tensors/arrays for rollouts.
```python
>>> space = DiscreteParametric(3, ([Discrete(2), Discrete(3), Tuple([Discrete(2), MultiBinary(4), Discrete(2)])]))
>>> for i in range(10):
... print(space.sample())
(0, 1)
(0, 0)
(0, 1)
(0, 0)
(1, 2)
(2, (1, array([0, 1, 1, 0], dtype=int8), 0))
(2, (1, array([1, 1, 0, 1], dtype=int8), 0))
(0, 0)
(1, 2)
(2, (1, array([1, 1, 1, 1], dtype=int8), 0))
```
Perhaps a better idea is a constant sized, zero padded action space.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.