For .venv creation
python -m venv .venv
.\.venv\Scripts\Activate.ps1 // for PowerShell
.\.venv\Scripts\activate.bat // for cmd
Dependencies
pip install -U pip
pip install gymnasium
pip install torch
pip install matplotlib
Run Commands
python blackjack.py -q [question number]
For example to run question 2 (recurrent actor-critic for both lstm and gru), you have to run
python blackjack.py -q 2
The notebook for the multi-agent was run on kaggle.
The images/ and results/ contain the plots and the results of the experiments for question 3. The names of the plots contain the hyperparameters of each one.
- Agent.py : contains the Agent, Actor, Critic and the FNN class required for task 1
- blackjack.py : contains the main for the task 1. There i initialize the environment and run all the expereiments.
- maddpg-drl-assignment: contains the code for task 2. It is a notebook i created and run on kaggle.