Coder Social home page Coder Social logo

shaodaqian / rl-from-ltl Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 496 KB

IJCAI 2023 Sample Efficient Model-free Reinforcement Learning from LTL Specifications with Optimality Guarantees

Python 100.00%
machine-learning reinforcement-learning temporal-logic

rl-from-ltl's Introduction

Sample Efficient Model-free Reinforcement Learning from LTL Specifications with Optimality Guarantees

This repository includes the implementation of our IJCAI 2023 paper, "Sample Efficient Model-free Reinforcement Learning from LTL Specifications with Optimality Guarantees". https://www.ijcai.org/proceedings/2023/0465.pdf

Abstract

Linear Temporal Logic (LTL) is widely used to specify high-level objectives for system policies, and it is highly desirable for autonomous systems to learn the optimal policy with respect to such specifications. However, learning the optimal policy with respect to LTL specifications is not trivial. We present a model-free Reinforcement Learning (RL) approach that efficiently learns an optimal policy for an unknown stochastic system, modelled using Markov Decision Processes (MDPs). We propose a novel and more general product MDP, reward structure and discounting mechanism that, when applied in conjunction with off-the-shelf model-free RL algorithms, efficiently learn the optimal policy that maximizes the probability of satisfying a given LTL specification with optimality guarantees. We also provide improved theoretical results on choosing the key parameters in RL to ensure optimality. To directly evaluate the learned policy, we adopt probabilistic model checker PRISM to compute the probability of the policy satisfying such specifications. Several experiments on various tabular MDP environments across different LTL tasks demonstrate the improved sample efficiency and optimal policy convergence.

Citation

@inproceedings{shao2023ltl,
    title={Sample Efficient Model-free Reinforcement Learning from LTL Specifications with Optimality Guarantees},
    author={Daqian Shao and Marta Kwiatkowska},
    year={2023},
    booktitle={International Joint Conference on Artificial Intelligence (IJCAI)},
}

Dependencies

The followings are the essential tools and libraries to run our RL algorithms:

Basic Usage

This package consists of the LearningAlgo class which contains all the core RL algorithms, the MDP class which constructs the MDP environment with predefined structure and labels, the OmegaAutomaton class that transforms LTL specifications into LDBAs and the PRISM class that builds the PRISM model of the MDP and the current policy and evaluate it using PRISM.

To run experiments, use main.py. The --task option is required and can be used to choose the task from the following: 'probabilistic_gate', 'frozen_lake' and 'office_world'. The --repeats option selects how many repeats of the experiment to perform for plotting the graph, the default is 10. The --save_log flag saves the training log after running the experiments.

$ python main.py --task 'probabilistic_gate' --repeats 10 --save_log
$ python main.py --task 'frozen_lake' --repeats 10 --save_log
$ python main.py --task 'office_world' --repeats 10 --save_log

rl-from-ltl's People

Contributors

shaodaqian avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.