Loading, Please wait...

Asteroids

About the game


Asteroids is as multiplayer, web based game based on the retro game Asteroids. This game is designed to be played with many other players as well as playing against programmed bots and neural networked controlled bots.

The concept of this is to try and prove that neural networks have advanced enough that they can be used to replace traditionally scripted AI, and be more human like, more enjoyable opponents to play against. Providing a greater challenge than just learning how the AI works and then play against its weaknesses.

The game was built using NodeJS as a server, using multiple npm packages including express, socket.io and neurotic. These facilitate the serving of static pages/styles/scripts for the clients that will connect via a web browser. Then, Socket.io handles the socket like communication between the web browser and the node server. This facilitates the multiplayer game code, as the client and server need constant updates from each other.

The reason socket.io was used instead of using raw WebSockets, is that socket.io will revert to using older standards if the web browser does not support WebSockets. This means it will allow the game to be more accessible, on as many browsers as possible.

Further Developments


The original idea for the game was to have the neural networked controlled AI constantly evolving the players that came along, and also learning off the basic programmed AI that was produced. The problem with this, is that while the Neural network would slowly learn, it would begin to regress over time after it had reached a reasonable point. This issue persisted even until I had submitted the project as I couldn't find why it was happening.

The neural network it self would have gotten much better if it was taught in a controlled environment. For virtually teaching the neural network on their own, against one AI. And using evolution, slowly produce a more efficient network. This could slowly increase in difficulty, adding more AI for the network to fight against at once until it was at a point where it would be suitable to place into the full grid with all the other AI and players.

The neural network inputs were very limited and poorly chosen at an early stage. They consisted of the neural network controlled ship position, the nearest ship's position, and the velocities of both of these ships. These could've been reduced to just being the relative positions and velocities reducing the number of inputs by half which would've vastly increased the performance of the network. The performance was the number one factor why the network had such limited inputs.

The libraries and environment used to develop this game were severely underpowered and required heavy modules that all ran on an underpowered dedicated server. This combined meant that the system couldn't handle many players/AI/networks at once, and training the network became a difficult task. Further more having the clients running on the web browser severely limited the client's capabilities as well. If I were to restart this project, I'd preferably build it using C++ and OpenGL for the raw performance it provides.

Favourite Projects

Red Dead Redemption 2

Mechanic Panic

Crazy Maze