GithubHelp home page GithubHelp logo

smartsnack's Introduction

SmartSnack

Hybrid DQN and Supervised learning based Game Agent for Snake

Guidence

  • 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

Reference

[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.

smartsnack's People

Contributors

anniepan8215 avatar ariiees avatar

Watchers

 avatar

Forkers

ariiees

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.