Table of Contents
Fetching ...

PeersimGym: An Environment for Solving the Task Offloading Problem with Reinforcement Learning

Frederico Metelo, Stevo Racković, Pedro Ákos Costa, Cláudia Soares

TL;DR

This work addresses the challenge of efficiently offloading tasks in large-scale edge computing environments by leveraging multi-agent reinforcement learning (MARL). It introduces PeersimGym, an open-source, PettingZoo-compatible environment that couples the Java-based Peersim edge simulator with a Python MARL interface, enabling configurable topologies, tasks, and reward structures. The authors model task offloading as a Markov Game and demonstrate DRL methods (DDQN and A2C) for both centralized and decentralized learning, validated against multiple baselines on Ether-generated Topologies with realistic workloads. The results show MARL agents achieving superior or competitive latency performance and robustness across varying workloads and network sizes, highlighting PeersimGym’s potential to accelerate practical MARL research in edge computing. The work also provides mechanisms to reduce the reality gap via trace-based workload generation and topology realism, and it releases the codebase to foster broader adoption and collaboration.

Abstract

Task offloading, crucial for balancing computational loads across devices in networks such as the Internet of Things, poses significant optimization challenges, including minimizing latency and energy usage under strict communication and storage constraints. While traditional optimization falls short in scalability; and heuristic approaches lack in achieving optimal outcomes, Reinforcement Learning (RL) offers a promising avenue by enabling the learning of optimal offloading strategies through iterative interactions. However, the efficacy of RL hinges on access to rich datasets and custom-tailored, realistic training environments. To address this, we introduce PeersimGym, an open-source, customizable simulation environment tailored for developing and optimizing task offloading strategies within computational networks. PeersimGym supports a wide range of network topologies and computational constraints and integrates a \textit{PettingZoo}-based interface for RL agent deployment in both solo and multi-agent setups. Furthermore, we demonstrate the utility of the environment through experiments with Deep Reinforcement Learning agents, showcasing the potential of RL-based approaches to significantly enhance offloading strategies in distributed computing settings. PeersimGym thus bridges the gap between theoretical RL models and their practical applications, paving the way for advancements in efficient task offloading methodologies.

PeersimGym: An Environment for Solving the Task Offloading Problem with Reinforcement Learning

TL;DR

This work addresses the challenge of efficiently offloading tasks in large-scale edge computing environments by leveraging multi-agent reinforcement learning (MARL). It introduces PeersimGym, an open-source, PettingZoo-compatible environment that couples the Java-based Peersim edge simulator with a Python MARL interface, enabling configurable topologies, tasks, and reward structures. The authors model task offloading as a Markov Game and demonstrate DRL methods (DDQN and A2C) for both centralized and decentralized learning, validated against multiple baselines on Ether-generated Topologies with realistic workloads. The results show MARL agents achieving superior or competitive latency performance and robustness across varying workloads and network sizes, highlighting PeersimGym’s potential to accelerate practical MARL research in edge computing. The work also provides mechanisms to reduce the reality gap via trace-based workload generation and topology realism, and it releases the codebase to foster broader adoption and collaboration.

Abstract

Task offloading, crucial for balancing computational loads across devices in networks such as the Internet of Things, poses significant optimization challenges, including minimizing latency and energy usage under strict communication and storage constraints. While traditional optimization falls short in scalability; and heuristic approaches lack in achieving optimal outcomes, Reinforcement Learning (RL) offers a promising avenue by enabling the learning of optimal offloading strategies through iterative interactions. However, the efficacy of RL hinges on access to rich datasets and custom-tailored, realistic training environments. To address this, we introduce PeersimGym, an open-source, customizable simulation environment tailored for developing and optimizing task offloading strategies within computational networks. PeersimGym supports a wide range of network topologies and computational constraints and integrates a \textit{PettingZoo}-based interface for RL agent deployment in both solo and multi-agent setups. Furthermore, we demonstrate the utility of the environment through experiments with Deep Reinforcement Learning agents, showcasing the potential of RL-based approaches to significantly enhance offloading strategies in distributed computing settings. PeersimGym thus bridges the gap between theoretical RL models and their practical applications, paving the way for advancements in efficient task offloading methodologies.
Paper Structure (11 sections, 5 equations, 3 figures, 1 table)

This paper contains 11 sections, 5 equations, 3 figures, 1 table.

Figures (3)

  • Figure 1: Simulation Pipeline Overview. Left: PettingZoo API integration, facilitating agent-simulation interaction via Python and RESTful requests for practical task offloading optimization. Right: network topology with worker nodes and connections, enabling task generation and state sharing for RL agent training.
  • Figure 2: General and problem-specific RL state action overview.
  • Figure 3: Evolution of the different metrics with variable $\lambda$ (top) and variable cluster number (bottom), averaging 100 episodes.