Skip to content

smellslikeml/rl_thermo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Policy Gradients Temperature Control

temperature control

This repo includes resources to implement an agent that learns a policy function in an online manner to specialize temperature control with policy gradients. This method is flexible enough to use various types of appliances (simple heaters, fans, AC units) to keep temperature in a space at a given set point.

Getting Started

The config.ini will contain all of the default variables needed for training and data logging. Update the PATHS section with the appropriate paths if you are modifying from the defaults.

Prerequisites

Installing

This example assumes you are using a BME280 temperature sensor connected via GPIO. You can use any other source of temperature and modify the main.py script accordingly. Pip install the python dependencies:

# Assuming python 3.x as default

$ pip install -r requirements

Run

Simply run the main.py script to learn a policy function in an online fashion.

$ python3 main.py

The utils/ directory contains resources to switch a TP-Link smartplug on/off given the output action by the agent.

Deployment

This minimal implementation can run on embedded devices as small as a Raspberry Pi Zero W.

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details

References

About

Temperature regulation with any appliance using policy gradients

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages