This is a illustration of how to extend OpenAI with a simple environment.
Import the evnvironment like this:
import gym import gym_game_nim # custom environment
env = gym.make('game_nim-v0')
For more information see accompanying blogpost: https://arthought.com/game-of-nim