mobile-env: A minimalist environment for decision making in wireless mobile networks.
Project description
Try Mobile-Env on Google Colab! ![Open in colab](https://pypi-camo.freetls.fastly.net/74d996556a82b2f1dd5252d2fd8bead60f9e9d21/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667)
Mobile-Env is a minimalist OpenAI-Gym environment for training and evaluating intelligent coordination algorithms in wireless mobile networks. At each time step, it must be decided what connections should be established among user equipments (UEs) and basestations (BSs) in order to maximize Quality of Experience (QoE) globally. To maximize the QoE of single UEs, the UE intends to connect to as many BSs as possible, which yields higher (macro) data rates. However, BSs multiplex resources among connected UEs (e.g. schedule physical resource blocks) and, therefore, UEs compete for limited resources (conflicting goals). To maximize QoE globally, the policy must recognize that (1) the data rate of any connection is governed by the channel (e.g. SNR) between UE and BS and (2) QoE of single UEs not necessarily grows linearly with increasing data rate.
Mobile-Env supports multi-agent and centralized reinforcement learning policies. It provides various choices for rewards and observations. Mobile-Env is also easily extendable, so that anyone may add another channel models (e.g. path loss), movement patterns, utility functions, etc.
Installation
pip install mobile-env
Example Usage
import gym
import mobile_env
env = gym.make("mobile-medium-central-v0")
obs = env.reset()
done = False
while not done:
action = ... # Your agent code here
obs, reward, done, info = env.step(action)
env.render()
Customizability
Mobile-Env supports custom channel models, movement patterns, arrival & departure models, resource multiplexing schemes and utility functions. For example, replacing the default Okumura–Hata channel model by a (simplified) path loss model can be as easy as this:
import numpy as np
from mobile_env.core.base import MComCore
from mobile_env.core.channel import Channel
class PathLoss(Channel):
def __init__(self, gamma, **kwargs):
super().__init__(**kwargs)
# path loss exponent
self.gamma = gamma
def power_loss(self, bs, ue):
"""Computes power loss between BS and UE."""
dist = bs.point.distance(ue.point)
loss = 10 * self.gamma * np.log10(4 * np.pi * dist * bs.frequency)
return loss
# replace default channel model in configuration
config = MComCore.default_config()
config['channel'] = PathLoss
# pass init parameters to custom channel class!
config['channel_params'].update({'gamma': 2.0})
# create environment with custom channel model
env = gym.make('mobile-small-central-v0', config=config)
...
Documentation
Read the documentation online.
DeepCoMP
Mobile-Env builds on DeepCoMP and makes its simulation accessible via an OpenAI Gym interface that is independent of any specific reinforcement learning framework.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mobile_env-0.2.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb14cfcfaaefa34c46c064583f95d856871d93d70912c56816320f2bd877adab |
|
MD5 | e127c0089d2ee914f6dd9946913a1068 |
|
BLAKE2b-256 | 394b6abdc86eee9923035e5277f208b761b2e2fd5a0a7a9046ad9bd5f91d5321 |