Hybrid DQN and Supervised learning based Game Agent for Snake
- Run 'snake_game_human.py' and play the game by yourself
- Run 'agent.py' to see how DQN agent play the game
- Correct Punishment in 'model.py' to [0,0,0] for plain DQN training
- After collect enough data, run 'SL_train.py' to get your own great supervised learning model
- After get a file 'best_model.pt', you can start to try DQN-SL model by run 'agent.py' again!
- change PUNISHMENT in 'model.py' for different weights for each class
[1]. S. Miyashita, X. Lian, X. Zeng, T. Matsubara and K. Uehara, "Developing game AI agent behaving like human by mixing reinforcement learning and supervised learning," 2017 18th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD), Kanazawa, Japan, 2017, pp. 489-494, doi: 10.1109/SNPD.2017.8022767.
[2]. Silver, D., Huang, A., Maddison, C. et al. Mastering the game of Go with deep neural networks and tree search. Nature 529, 484โ489 (2016).
[3]. Jiang, T., & Mai, C. (2020). SnakeAI. Stanford University.
[4]. Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv, 2014.
[5]. Patrickloeber https://github.com/patrickloeber/snake-ai-pytorch/tree/main
[6]. Mnih, V., Kavukcuoglu, K., Silver, D., Graves, A., Antonoglou, I., Wierstra, D. & Riedmiller, M. (2013). Playing Atari with Deep Reinforcement Learning.
[7]. LeCun, Y., Bottou, L., Bengio, Y., & Haffner, P. (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11), 2278-2324. doi: 10.1109/5.726791.