An open API service indexing awesome lists of open source software.

https://github.com/aryaminus/srijana

A C++ and Opengl based game to draw a window leading to snake which runs on neural network to reach it's food within certain iteration for AI along with Keyboard press to move the Snake quads. Youtube:
https://github.com/aryaminus/srijana

ai artificial-intelligence artificial-intelligence-algorithms artificial-neural-networks cpp freeglut game graphics keyboard linux neural-network opengl perspective q-learning

Last synced: about 1 year ago
JSON representation

A C++ and Opengl based game to draw a window leading to snake which runs on neural network to reach it's food within certain iteration for AI along with Keyboard press to move the Snake quads. Youtube:

Awesome Lists containing this project

README

          

# Srijana - OpenGL based 2D Snake game
A C++ and OpenGL based game made for 5th semester Graphics Project and Neural Network used to display snake quad to move towards food in random state with both keyboard press and neural processing to locate food using artificial intelligence AI for automatic playing and score monitoring.

**Currently in beta state**

[![Srijana features](https://i.imgur.com/FDGpiwp.gif)](https://youtu.be/Cpj3XVdsK_g)

**Note:**
Make sure you have opengl, freeglut3-dev & libgl1-mesa-dev

## Installation

Clone the source locally:
```
$ git clone https://github.com/aryaminus/srijana
$ cd srijana
$ make run
```
***else***
```
$ git clone https://github.com/aryaminus/srijana
$ cd srijana
$ g++ main.cpp -lGL -lglut -lGLU -o main
$ ./main
```

***For Codeblocks:***

- Open local source file main.cpp from Srijana directory

- **Before Build & Run**, goto:
```
-> Settings / Compiler / Global Compiler Settings / Linker Settings
```

- in Other linker options:
```
-lGL -lglut -lGLU
```

[![Working Flowchart](https://i.imgur.com/ZA5RDfW.png)](https://i.imgur.com/ZA5RDfW.png)

## Todo
- [x] Fix gluPerspective from glOrtho when moving from welcome() to DrawNeural()
- [x] When clicked User/Play_Neural, resize is needed which needs to be fixed
- [ ] Implementation of better algorithm than Q-learning
- [x] Header to show score in window for DrawUser
- [x] Setup for Keyboard press to navigate snake

## Reference
1. snake
2. snake-unix
3. airplane-game
4. q_snake

-----------------------------------------------------------------------------------------------------------

## Contributing

1. Fork it ()
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

**Enjoy!**