pygame implementation of the pneuma env
Find a file
2024-03-14 20:14:16 +02:00
assets Made the game harder, no spells, enemies attack, multiple spawn 2024-03-04 12:25:43 +02:00
config Reverted monster attack range 2024-03-04 15:18:57 +02:00
effects Big update 2024-02-10 18:11:28 +01:00
entities Reenabled fireball 2024-03-14 17:24:32 +02:00
figures Updated adam to reduce plasticity and made the agent more observant, amongst other things 2024-02-29 19:07:31 +02:00
interface Big update 2024-02-10 18:11:28 +01:00
ml/ppo Fixed error for CUDA 2024-03-14 20:14:16 +02:00
utils Updated metrics correctly 2024-03-07 10:58:05 +02:00
.gitignore Updated adam to reduce plasticity and made the agent more observant, amongst other things 2024-02-29 19:07:31 +02:00
__init__.py Big update 2024-02-10 18:11:28 +01:00
args.py Added score_metric and loading options 2024-02-13 11:48:24 +01:00
camera.py Found huge bug, updated some basic stuff 2023-12-14 18:28:45 +01:00
folder_struct.py Big update 2024-02-10 18:11:28 +01:00
game.py Big update 2024-02-10 18:11:28 +01:00
level.py Updated rewards and fixed formatting 2024-03-07 10:27:26 +02:00
LICENSE Major update, made single main file for both multi and single agent, added argsparse, polished everything 2023-11-29 11:53:30 +01:00
main.py Updated metrics correctly 2024-03-07 10:58:05 +02:00
README.md Major update, made single main file for both multi and single agent, added argsparse, polished everything 2023-11-29 11:53:30 +01:00
requirements.txt Added requirements.txt 2023-11-23 16:50:54 +01:00

Pneuma: Reinforcement Learning Platform

Introduction

Pneuma is a Reinforcement Learning platform created as part of a thesis project. It is developed using PyGame and offers a customizable environment for testing and implementing reinforcement learning algorithms.

Installation

To install Pneuma, clone this repository and install the requirements (requirements.txt)

After cloning, you can edit the agents, create your own, and modify pneuma.py (the main file). Additionally, consider editing player.setup_agent() for further customization. Note

  • [] TODO: Separate the update logic from the network logic inside the player.

Usage

To run Pneuma, use the command-line interface with the following options:

  • --no_seed: If set to True, runs the program without a seed. Default is False.
  • --seed [int]: Specifies the seed for the random number generator. Default is 1.
  • --n_episodes [int]: Defines the number of episodes. Default is 300.
  • --ep_length [int]: Sets the length of each episode. Default is 5000.
  • --n_players [int]: Number of players. Default is 1.
  • --chkpt_path [str]: Path for saving/loading agent models. Default is "agents/saved_models".
  • --figure_path [str]: Path for saving figures. Default is "figures".
  • --horizon [int]: Number of steps per update. Default is 200.
  • --show_pg: If True, opens a PyGame window on the desktop. Default is False.
  • --no_load: If True, ignores saved models. Default is False.
  • --gamma [float]: The gamma parameter for PPO. Default is 0.99.
  • --alpha [float]: The alpha parameter for PPO. Default is 0.0003.
  • --policy_clip [float]: The policy clip. Default is 0.2.
  • --batch_size [int]: Size of each batch. Default is 64.
  • --n_epochs [int]: Number of epochs. Default is 10.
  • --gae_lambda [float]: The lambda parameter of the GAE. Default is 0.95.

Example Command

$ python pneuma.py --seed 42 --n_episodes 300 --ep_length 5000 --n_players 2 --no_load

License

Pneuma is licensed under the Mozilla Public License 2.0.