https://github.com/andrewimpellitteri/floor-cleaner-agent
An RL agent that finds an optimal policy of cleaning dirt off a floor with a power washer.
https://github.com/andrewimpellitteri/floor-cleaner-agent
bd3 cfd fluid-dynamics fluid-simulation ppo-agent reinforcement-learning reinforcement-learning-environments rl
Last synced: about 1 month ago
JSON representation
An RL agent that finds an optimal policy of cleaning dirt off a floor with a power washer.
- Host: GitHub
- URL: https://github.com/andrewimpellitteri/floor-cleaner-agent
- Owner: andrewimpellitteri
- Created: 2025-01-18T21:15:00.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-09T17:06:46.000Z (2 months ago)
- Last Synced: 2025-02-09T18:22:47.551Z (2 months ago)
- Topics: bd3, cfd, fluid-dynamics, fluid-simulation, ppo-agent, reinforcement-learning, reinforcement-learning-environments, rl
- Language: Python
- Homepage:
- Size: 28.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cleaning Room RL Agent
This project builds a Reinforcement Learning (RL) agent to find an optimal floor cleaning method using a power washer in a simulated environment. The agent can move, rotate, and spray the washer to clean dirt, with the reward being the inverse of dirt concentration on the floor.
## Features
- **Power Washer Simulation**: Agent can move and rotate to spray dirt.
- **RL Training**: Trains an agent using Proximal Policy Optimization (PPO).
- **Custom Environment**: Built with `gymnasium` for easy integration with RL algorithms.## Dependencies
Install required packages:
```bash
pip install stable-baselines3 torch numpy gymnasium matplotlib
```
## Setup and Usage
1. **Training the Agent**
Run the train_agent() function to train the PPO agent:python train_agent.py
This trains the agent with 4 parallel environments for 1,000,000 timesteps, saving the model as cleaning_agent_final.2. **Evaluating the Agent**
After training, evaluate the agent's performance:```bash
python evaluate_agent.py
```This runs 10 evaluation episodes and prints the average reward.
Feel free to fork and submit pull requests for improvements.
## License
This project is licensed under the MIT License.