Giter Club home page Giter Club logo

rl-verification-project's Introduction

RL-verification-project

Class project for CSCI 699: Safe-Learning Enabled Autonomous Systems Spring 2024

Project Overview

This project develops and evaluates a reinforcement learning model for managing classroom attendance during an ongoing epidemic. The model aims to balance the dual objectives of minimizing infection risks and maximizing in-person educational activities. The project employs PyTorch for model development and the Z3 theorem prover for verification of the learned policies.

Dependencies

  • Python 3.8+
  • PyTorch
  • tqdm
  • matplotlib
  • numpy
  • z3-solver
  • pandas

Key Components

  1. Model Definition (Model class): A neural network model defined using PyTorch. It predicts policies based on the current state, which includes community risk and the number of infected individuals.

  2. Infection Dynamics (get_infected_students_apprx_sir function): Simulates the number of new infections based on current policies and epidemiological parameters.

  3. Policy Evaluation (get_label function): Generates labels for training by evaluating the consequences of different allowed attendance levels on infection spread.

  4. Training Loop (train function): Executes the training process over a specified number of epochs, adjusting model weights based on observed rewards and the effectiveness of actions taken under various simulated conditions.

  5. Verification (verify function): Uses the Z3 solver to check if the learned model adheres to desired safety conditions under high-risk scenarios.

  6. Visualization (visualize_model_behavior function): Visualizes the model's behavior over a range of inputs to assess policy consistency and effectiveness.

Setup and Running

Installation

Install the required packages using pip:

pip install torch tqdm matplotlib numpy z3-solver pandas

rl-verification-project's People

Contributors

eondula avatar

Watchers

 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.