/spectrl_tool

Learning algorithm implementation and experiments in the paper "A Composable Specification Language for Reinforcement Learning Tasks" (https://arxiv.org/abs/2008.09293).

Primary LanguagePython

SPECTRL

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.

Dependencies

  • Python 3.5 or a later version
  • Numpy
  • Pytorch
  • Gym

Examples

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.