This repo contains code for the paper "A Composable Specification Language for Reinforcement Learning Tasks" (https://arxiv.org/abs/2008.09293). SPECTRL (SPECifying Tasks for Reinforcment Learning) is a tool that allows users to write RL specifications in a logical language and uses the specfication to automatically learn a policy.
- Python 3.5 or a later version
- Numpy
- Pytorch
- Gym
To run examples in the paper, see spectrl/examples/car2d.py and spectrl/examples/cartpole. To run 2d
navigation examples, run:
mkdir data
python3 -m spectrl.examples.car2d -n 0 -d data
The option -d is used to specify the directory to store files (eg. policy_file) generated by the
tool. -n is used to label the output files differently for different runs.