BioGym is a spatio-temporal wildlife management RL environment created on the Gymnasium library (formerly OpenAI Gym).
It was created as part of my Master's thesis (TDT4900), which I wrote spring 2023 at NTNU under the superivision of Keith L. Downing. My thesis is available here.
I presented my thesis at the NorwAI Innovate Conference 2023, and also had a poster, which you can see here.
My thesis focused on Deep Reinforcement Learning for Spatio-Temporal Wildlife Management, and my research goal was to:
Explore the use of different deep reinforcement learning (DRL) algorithms on the task of spatio-temporal wildlife management, with the aim of maintaining a diverse and stable ecosystem.
To do this, I created a spatio-temporal wildlife management simulation, based on a tri-trophic predator-prey model. This was then wrapped as a Gymnasium environment, so that it followed the standard API of the library. This made it possible to "plug-and-play" with RL algorithms from Stable Baselines3. It also makes it easier for those interested to work with this RL environment.
I trained and tested three different RL algorithms on the RL environment (DQN, A2C and PPO), which gives a higher reward for more biodiversity. Different metrics were used to measure biodiversity. The RL agent had the possibility to remove or add population of one of the three species at each timestep.
Below is an overview of the system designed to investigate the applicability of DRL on a spatio-temporal wildlife management simulation:
![Wildlife Environment Overview](https://private-user-images.githubusercontent.com/6755688/347389783-c09b5a9d-a3b9-40df-8eba-bbbd0c34d916.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNzU3NDUsIm5iZiI6MTcyNDI3NTQ0NSwicGF0aCI6Ii82NzU1Njg4LzM0NzM4OTc4My1jMDliNWE5ZC1hM2I5LTQwZGYtOGViYS1iYmJkMGMzNGQ5MTYuanBnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjFUMjEyNDA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDYzNDJjY2QzNDEwYjA0Nzc3Y2I1ZGZhMzE5ODQyM2E0YjhmOTk4ZWUzMDU5MWU5YjFjMzNmNzRkNmQwOGZmMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.Od_7ShVpDZcMB8miYBzWAxm10p896iYwcH_CiZSnDME)
While all RL algorithms were able to improve with training, PPO standed out with stable performance and steady increase in performance. Below is one of the results gathered when training the algorithms on BioGym:
![DRL algorithm preformance on a 2x2 grid with 10x action multiplier - Equal training time](https://private-user-images.githubusercontent.com/6755688/347391284-b044c80a-a2de-420b-8caa-cd26411ae6ab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNzU3NDUsIm5iZiI6MTcyNDI3NTQ0NSwicGF0aCI6Ii82NzU1Njg4LzM0NzM5MTI4NC1iMDQ0YzgwYS1hMmRlLTQyMGItOGNhYS1jZDI2NDExYWU2YWIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjFUMjEyNDA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWZhYmRhNmE5YjNiOWMzMmVhYTQzZTgxNWQ4NzJmMjQ5ZThkMjJkMTU4ZWQ5YWNlMGY3NTNjMDZkNTU4ZGFmZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.eY2ndlSvfzD2TMmOUcik1C_nssTpmNYbP2IYdQ7YW7I)
Interestingly, the RL algorithms employed quite different policies. Some would always remove population of one species, while others both removed and added populations. In my thesis I hypothesize how the policy each algorithm learns are connected to the algorithm's design.
For details on research background and goal, related work, research process, and results - please take a look at my thesis.