https://github.com/imane0x/rl-for-csps
This internship project explores the application of online reinforcement learning, specifically Proximal Policy Optimization (PPO), alongside offline RL using Decision Transformers, to solve the N-Queens problem.
https://github.com/imane0x/rl-for-csps
Last synced: 3 months ago
JSON representation
This internship project explores the application of online reinforcement learning, specifically Proximal Policy Optimization (PPO), alongside offline RL using Decision Transformers, to solve the N-Queens problem.
- Host: GitHub
- URL: https://github.com/imane0x/rl-for-csps
- Owner: imane0x
- Created: 2024-06-25T10:38:31.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-09-19T16:18:41.000Z (9 months ago)
- Last Synced: 2025-01-27T08:42:46.618Z (4 months ago)
- Language: Python
- Homepage:
- Size: 3.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RL-for-CSPs
## Project Overview
This project aims to solve the N-Queens problem using two approaches in reinforcement learning and sequence modeling: Proximal Policy Optimization (PPO) and Decision Transformers. The N-Queens problem involves placing N chess queens on an N×N chessboard so that no two queens threaten each other.## Installation
Dependencies can be installed using the following command:```
conda env create -f conda_env.yml
```## Training
### PPO```
python PPO/train_ppo.py --board_size --timesteps --lr
```
### DT```
python Decision_Transformers/train_dts.py --state_dim --dataset_name --output_dir --epochs --batch_size --learning_rate --weight_decay --optim
```## Evaluation
### PPO```
python PPO/evaluate_ppo.py --model_path --board_size --episodes```
### DT```
python Decision_Transformers/evaluate_dts.py --model_path --states_dim --dataset_name --episodes --max_ep_len --target_return --scale```