1Reichman University, 2Technion — Israel Institute of Technology, 3The University of Texas at Austin
Official implementation of TWISTED-RL, a hierarchical framework for robotic knot-tying that combines a high-level topological planner with low-level reinforcement learning policies. The framework enables robots to learn complex knot-tying skills without human demonstrations.
This project uses Conda for environment management.
# Clone the repository
git clone https://github.com/guyfreund/twisted_rl.git
cd twisted_rl
# Create and activate conda environment
conda env create -f server_environment_39_18_04_2025.yml
conda activate twisted_rl-
Run all scripts with the root dir
.../twisted_rlas the working directory. -
It is recommended to run the problem set file to create all relevant problems:
python exploration/mdp/graph/problem_set.py
TWISTED-RL is trained hierarchically across levels of increasing complexity.
To train the TWISTED-RL-C variant, run the following:
python exploration/rl/cleanrl_scripts/sac_algorithm.py \
--problem G0python exploration/rl/cleanrl_scripts/sac_algorithm.py \
--problem G1 \
--replay_buffer_files_path PATH_TO_G0python exploration/rl/cleanrl_scripts/sac_algorithm.py \
--problem G2 \
--replay_buffer_files_path PATH_TO_G1Edit the following to adjust training configuration:
exploration/rl/config/sac.ymlfor training parameters.exploration/rl/environment/exploration_env.yamlfor environment parameters.
To run evaluation of the full TWISTED-RL system:
python system_flow/evaluation_automation.py \
--ablation CEdit system_flow/config/twisted_evaluation.yml to adjust evaluation configuration.
LOW_LEVEL:
RL:
agents:
G0: path/to/G0.pt
G1: path/to/G1.pt
G2: path/to/G2.pt
EVALUATION:
states_type: 3-eval # or easy, medium, hard, 4-evaltwisted_rl/
├── exploration/
│ ├── goal_selector/ # Goal selection strategies
│ ├── initial_state_selector/ # Initial state selection strategies
│ ├── mdp/ # MDP definitions
│ ├── preprocessing/ # Data processing
│ ├── reachable_configurations/ # Reachability graph
│ ├── rl/
│ │ ├── cleanrl_scripts/ # Training scripts
│ │ ├── config/ # Training configs
│ │ ├── environment/ # Custom environments
│ │ ├── replay_buffer/ # Replay buffers
│ │ └── test_scripts/ # Evaluation scripts
│ └── utils/ # Helper functions
├── mujoco_infra/ # MuJoCo simulation wrappers and assets
├── system_flow/
│ ├── config/ # System-level configs
│ ├── high_level_class/ # High-level planners
│ ├── low_level_class/ # Low-level planners
│ └── metrics/ # Evaluation metrics metadata
If you find TWISTED-RL useful in your research, please consider citing our work:
@inproceedings{freund2026twistedrl,
title = {TWISTED-RL: Hierarchical Skilled Agents for Knot-Tying without Human Demonstrations},
author = {Freund, Guy and Jurgenson, Tom and Sudry, Matan and Karpas, Erez},
booktitle = {Proceedings of the IEEE International Conference on Robotics and Automation (ICRA)},
year = {2026}
note = {To appear}
}This repository is licensed under the MIT License. See the LICENSE file for details.