An open API service indexing awesome lists of open source software.

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.

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

```