Research Article

Research on the Application of Q-learning in Braitenberg Car

Jinyu Liu*
University of Shanghai for Science and Technology

* Corresponding author: [email protected]

Abstract

Addressing the issues of insufficient behavioral stability in Braitenberg vehicles within complex light fields and obstacle-laden environments, this paper adopts tabular Q-learning to learn phototaxis and obstacle avoidance strategies. The vehicle constructs discrete states based on the intensity of left and right light sensors and collision flags, utilizing actions including moving forward, turning left, turning right, and stopping. Reward shaping is employed to encourage approaching the light source while penalizing collisions and ineffective idling. The strategy employs anϵ-greedy approach, with decay applied to both the learning rate and exploration rate during training, while a discount factor balances long-term returns. Moderate domain randomization is used during training to close the gap between simulation and reality, and safety shielding is used in the early stages to keep high-risk actions to a minimum. Experiments conducted in a two-dimensional grid environment with random obstacles demonstrate that the algorithm converges within thousands of steps, significantly reducing the average number of collisions per episode and markedly improving the success rate of phototaxis. This paper provides a minimal reproducible implementation and key hyperparameter settings, offering a concise and effective baseline for low-cost mobile robot teaching and Braitenberg behavioral research.

Keywords: Q-Learning; Braitenberg Vehicles; Phototaxis and Obstacle Avoidance; Reinforcement Learning; Simulation-to-Reality Transfer
Published: December 31, 2025
DOI: 10.54254/2755-2721/2026.TJ30958
Volume: ACE Vol.218
pp. 63-68
Download PDF

References

  1. Alshiekh, M., Bloem, R., Ehlers, R., Könighofer, B., Niekum, S., & Topcu, U. (2018). Safe reinforcement learning via shielding. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence (AAAI-18) (pp. 2669–2678). AAAI Press.
  2. Braitenberg, V. (1986). Vehicles: Experiments in synthetic psychology. MIT Press.
  3. Chu, J., Deng, X., & Yue, Q. (2024). Autonomous path planning for search-and-rescue robots based on Q-learning. Journal of Nanjing University of Aeronautics & Astronautics, 56(2), 364–374. https: //doi.org/10.16356/j.1005-2615.2024.02.020
  4. Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., … Hassabis, D. (2015). Human-level control through deep reinforcement learning. Nature, 518(7540), 529–533. https: //doi.org/10.1038/nature14236
  5. Shaikh, D., & Rañó, I. (2020). Braitenberg vehicles as computational tools for research in neuroscience. Frontiers in Bioengineering and Biotechnology, 8, 565963. https: //doi.org/10.3389/fbioe.2020.565963
  6. Sutton, R. S., & Barto, A. G. (2018). Reinforcement learning: An introduction (2nd ed.). MIT Press.
  7. Tian, X., & Dong, X. (2024). Obstacle-avoidance path planning for mobile robots based on improved DQN. Journal of Chinese Inertial Technology, 32(4). https: //doi.org/10.13695/j.cnki.12-1222/O3.2024.04.012
  8. Tobin, J., Fong, R., Ray, A., Schneider, J., Zaremba, W., & Abbeel, P. (2017). Domain randomization for transferring deep neural networks from simulation to the real world. arXiv preprint arXiv: 1703.06907. Presented at the IROS 2017 Workshop.
  9. Watkins, C. J. C. H., & Dayan, P. (1992). Q-learning. Machine Learning, 8(3), 279–292. https: //doi.org/10.1007/BF00992698
  10. Zhao, J., Pei, Z., Jiang, B., Lu, N., Zhao, F., & Chen, S. (2024). Visual obstacle avoidance for UAV virtual pipelines based on deep reinforcement learning. Acta Automatica Sinica, 50(11), 2245–2258. https: //doi.org/10.16383/j.aas.c230728
  11. Zhou, Z., Yu, S., Yu, J., Duan, J., Chen, L., & Chen, C. L. P. (2023). T-DQN intelligent obstacle-avoidance algorithm for unmanned surface vehicles. Acta Automatica Sinica, 49(8), 1645–1655. https: //doi.org/10.16383/j.aas.c210080