Out of sheer curiosity, what do you mean when you mention ‘from scratch’?
Ioannis Kourouklides

Without using a higher level framework such as TF, PyTorch, etc. Numpy could be trivially replaced, Gym less so (but still doable).

Arguably even using Python isn’t truly from “scratch” but we should keep in the realm of practical rather than philosophical 😉