Skip to main content
QUICK REVIEW

[Paper Review] Developing an OpenAI Gym-compatible framework and simulation environment for testing Deep Reinforcement Learning agents solving the Ambulance Location Problem

Michael Allen, Kerry Pearn|arXiv (Cornell University)|Jan 12, 2021
Facility Location and Emergency ManagementBusiness, Management and Accounting13 references5 citations
TL;DR

This paper presents an OpenAI Gym-compatible simulation environment for testing Deep Reinforcement Learning (DRL) agents on the ambulance location problem, using SimPy for discrete event simulation and PyTorch for DRL models. The Bagging Noisy Duelling Deep Q Network achieved the best performance, reducing response times compared to random allocation, though all agents showed performance degradation with extended training.

ABSTRACT

Background and motivation: Deep Reinforcement Learning (Deep RL) is a rapidly developing field. Historically most application has been made to games (such as chess, Atari games, and go). Deep RL is now reaching the stage where it may offer value in real world problems, including optimisation of healthcare systems. One such problem is where to locate ambulances between calls in order to minimise time from emergency call to ambulance on-scene. This is known as the Ambulance Location problem. Aim: To develop an OpenAI Gym-compatible framework and simulation environment for testing Deep RL agents. Methods: A custom ambulance dispatch simulation environment was developed using OpenAI Gym and SimPy. Deep RL agents were built using PyTorch. The environment is a simplification of the real world, but allows control over the number of clusters of incident locations, number of possible dispatch locations, number of hospitals, and creating incidents that occur at different locations throughout each day. Results: A range of Deep RL agents based on Deep Q networks were tested in this custom environment. All reduced time to respond to emergency calls compared with random allocation to dispatch points. Bagging Noisy Duelling Deep Q networks gave the most consistence performance. All methods had a tendency to lose performance if trained for too long, and so agents were saved at their optimal performance (and tested on independent simulation runs). Conclusions: Deep RL agents, developed using simulated environments, have the potential to offer a novel approach to optimise the Ambulance Location problem. Creating open simulation environments should allow more rapid progress in this field.

Motivation & Objective

  • To develop an OpenAI Gym-compatible simulation environment for testing Deep Reinforcement Learning agents on the ambulance location problem.
  • To evaluate the performance of various Deep Q Network-based agents in minimizing ambulance response time.
  • To enable reproducible research and future development of digital twins for real-world emergency medical systems.
  • To explore the feasibility of using DRL for optimizing ambulance dispatch strategies in dynamic, real-world-like scenarios.

Proposed method

  • Built a custom simulation environment using SimPy to model incident generation, ambulance dispatch, travel, and patient transport in a grid-based world.
  • Designed the environment to be compatible with OpenAI Gym, enabling integration with standard DRL training pipelines.
  • Implemented ten distinct DRL agent architectures, including duelling, noisy, prioritized replay, and bagging variants of Deep Q Networks.
  • Used PyTorch to train and evaluate agents on minimizing time from emergency call to ambulance arrival.
  • Configured the environment to vary incident patterns, number of dispatch points, ambulances, and hospitals to simulate different operational scenarios.
  • Trained agents using epsilon-greedy exploration and saved models at peak performance to avoid overfitting and performance degradation.

Experimental results

Research questions

  • RQ1Can a Gym-compatible simulation environment effectively model the ambulance location problem for DRL training and evaluation?
  • RQ2How do different DQN-based architectures (e.g., duelling, noisy, prioritized replay, bagging) compare in reducing ambulance response time?
  • RQ3Does prolonged training lead to performance degradation in DRL agents for ambulance dispatch, and if so, how can it be mitigated?
  • RQ4Can DRL agents outperform random ambulance dispatch allocation in minimizing time-to-scene?
  • RQ5To what extent can this framework be extended to model real-world complexity and serve as a digital twin for operational training?

Key findings

  • All DRL agents significantly reduced ambulance response time compared to random dispatch allocation.
  • The Bagging Noisy Duelling Deep Q Network achieved the most consistent and best performance across test scenarios.
  • Performance degradation was observed in all agents after extended training, indicating a need to save models at optimal performance points.
  • The Bagging Noisy Duelling DQN provided uncertainty estimates through ensemble voting, enhancing reliability in decision-making.
  • The simulation environment successfully supported training and evaluation of diverse DRL agents, enabling direct comparison and reproducibility.
  • The framework is extensible and compatible with existing DRL libraries such as OpenAI Baselines and TensorFlow Agents, enabling broader adoption and integration.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.