Farama-Foundation/Gymnasium

[Proposal] Allow to specify dtype for Discrete

Open

#1,118 opened on Jul 13, 2024

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Python (567 forks)batch import
enhancementgood first issue

Repository metrics

Stars
 (4,712 stars)
PR merge metrics
 (Avg merge 1d 9h) (10 merged PRs in 30d)

Description

Proposal

Add dtype argument to spaces.Discrete (similar to MultiDiscrete and Box).

Motivation

Currently the dtype is fixed to numpy.int64. However, often Discrete spaces are much smaller, resulting in a waste of memory.

Pitch

No response

Alternatives

No response

Additional context

No response

Checklist

  • I have checked that there is no similar issue in the repo

Contributor guide