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.
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.
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 requirementsSimply run the main.py script to learn a policy function in an online fashion.
$ python3 main.pyThe utils/ directory contains resources to switch a TP-Link smartplug on/off given the output action by the agent.
This minimal implementation can run on embedded devices as small as a Raspberry Pi Zero W.
Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details
