ai4co / rl4co

A PyTorch library for all things Reinforcement Learning (RL) for Combinatorial Optimization (CO)
https://rl4.co
MIT License
381 stars 70 forks source link

Major environment refactoring (base version) #169

Closed cbhua closed 4 months ago

cbhua commented 4 months ago

Description

Please refer to the full environment refactor PR: https://github.com/ai4co/rl4co/pull/166.

Motivation and Context

Please refer to the full environment refactor PR: https://github.com/ai4co/rl4co/pull/166.

Types of changes

Compare with the full environment refactor, this base refactor only touches:

  1. Environment structure;
  2. Documentation updates;
  3. Supporting generator;

And as a base refactor, this PR keeps:

  1. All the data generate processes (size, default range, default distribution) are not modified;
  2. All the step, reward calculation, etc logics are not modified;

Overall, this base version PR only works on moving code and doesn't change the logic for consequence. In the future version, we will refactor environments with the guide of the full refactor version step by step.

For more details, please refer to the full environment refactor PR: https://github.com/ai4co/rl4co/pull/166.

Checklist