helpingstar/gym-game2048

Increasing execution speed when selecting random numbers

Closed this issue · 0 comments

number = self.np_random.choice([1, 2], 1, p=(0.8, 0.2)).item()

image

np_random.choice can be optimized in speed through np_random.random().