Game Bot

Game Bot

Hello Everyone!! This is Huzaifa Athar,  a student of Software Engineer and a member of the Artificial Intelligence Club’s Technical Team.
I have always had a keen interest in gaming so I tried to build a GAME BOT.  A Game Bot is a reinforcement agent, which will be an NPC (Non-Player Character) in a game. As the name suggests NPCs are characters that you might encounter but are not controlled by real players.

The learning of my NPCs was modeled to that of babies. Just like children first, learn to recognize alphabets, then learn to build words and then abstract meaning out of them,  before they can finally create their own sentences and understand them, I first focused on teaching my NPCs to recognize an enemy and its bullets, then how to protect itself and finally how to defeat the enemy. It is important to base the NPCs on humans because they have to behave as human-like as possible.

For that, I am using the neural network NEAT”. A neural network is a series of algorithms that endeavors to recognize underlying relationships in a set of data through a process that mimics the way the human brain operates. As for NEAT, it works on generation-based learning where each generation has a population of AI and when all of them are terminated based on the best specimen from the previous generation the new generation is created, this process is repeated until we reach our goal.

What is a neural network?
As I said earlier neural network is a network or circuit of neurons, just like our Brain has a complex neural network, when we get some information whether it’s from our eyes ears, or sense of touch, neurons in our brain start sending signals to each other based on past experiences and that is how we understand all the information we are receiving.

Let’s simplify this a bit. When the AI is newborn, its neurons(nodes) are connected to each other at random, for example; if the node gets the visual information: ‘sees a black dot’, it will send a signal to the node it is connected to, for example; “up arrow key” which will move the player up. We will give the AI positive and negative remarks based on the performance, the AI will take the remarks and generate or kill, at random new nodes and connections between already existing nodes. And once this process is repeated enough times, the AI will have a complex network that will be able to take into account, when to move and where to move to.

In the end, I tried to replicate how humans learn everything, from birth till we are adults, the more closely and accurately I was able to replicate the learning process, the more human-like AI, I was able to create.

 

Written By: Huzaifa Athar

Edited By: Syed Sannan Ali

Leave a Reply