This is an implementation of the one-step Q-learning method for a simple two-link microswimmer. It is part of the course PHYS 350 Applications of Classical Mechanics, winter 2022, UBC.
To run the code, follow the steps below:
- Clone the project
git clone ...
. - Go to the project folder and run the python script
python main.py
. - The results are saved in
results/
folder.
There are mainly three model parameters to modify and play around; see main.py
for details.
Have fun!
- Watkins, C.J.C.H. (1989). Learning from delayed rewards.
- Watkins, C.J. & Dayan, P. (1992). Q-learning. Machine learning, 8(3), 279-292.
- Sutton, R.S. & Barto, A.G. (2018). Reinforcement learning: An introduction. MIT press.
- Najafi, A. & Golestanian, R. (2004). Simple swimmer at low Reynolds number: Three linked spheres. Physical Review E, 69(6), 062901.
- Tsang, A.C.H., Tong, P.W., Nallan, S., & Pak, O.S. (2020). Self-learning how to swim at low Reynolds number. Physical Review Fluids, 5(7), 074101.