  OpenAI Gym is a toolkit for reinforcement learning (RL) research. It includes
a large number of well-known problems that expose a common interface allowing
to directly compare the performance results of different RL algorithms. Since
many years, the ns-3 network simulation tool is the de-facto standard for
academic and industry research into networking protocols and communications
technology. Numerous scientific papers were written reporting results obtained
using ns-3, and hundreds of models and modules were written and contributed to
the ns-3 code base. Today as a major trend in network research we see the use
of machine learning tools like RL. What is missing is the integration of a RL
framework like OpenAI Gym into the network simulator ns-3. This paper presents
the ns3-gym framework. First, we discuss design decisions that went into the
software. Second, two illustrative examples implemented using ns3-gym are
presented. Our software package is provided to the community as open source
under a GPL license and hence can be easily extended.
