Skip to content

Usage

Prepare Community Risk CSV (if applicable) If you're planning to use community risk data from a CSV file, ensure it's placed in the appropriate directory and update the csv_path argument when running the script.

Running the Project

You can run the project in different modes:

  1. Training:
python main.py train --agent_type q_learning --alpha 0.8 --algorithm q_learning
  1. Evaluation:
python main.py eval --agent_type q_learning --alpha 0.8 --run_name your_run_name --csv_path path/to/your/csv --algorithm q_learning
  1. Combined Training and Evaluation:
python main.py train_and_eval --agent_type q_learning --alpha 0.8 --csv_path path/to/your/csv --algorithm q_learning
  1. Hyperparameter Sweep:
python main.py sweep --agent_type q_learning
  1. Multiple Runs:
python main.py multi --agent_type q_learning --alpha_t 0.05 --beta_t 0.9 --num_runs 10
  1. Optuna Optimization:
python main.py optuna --agent_type q_learning

Replace q_learning with dqn if you want to use the DQN algorithm instead.

Troubleshooting

If you encounter any issues during installation or running the project, please check the following:

  1. Ensure all prerequisites are correctly installed.
  2. Verify that you're in the correct conda environment (conda activate campus_gym).
  3. Check that all configuration files are properly set up.
  4. Make sure you have the necessary permissions to read/write in the project directory.

If problems persist, please open an issue on the GitHub repository with details about the error and your environment.